diff --git a/bookwyrm/books_manager.py b/bookwyrm/books_manager.py index 37a31766..461017a0 100644 --- a/bookwyrm/books_manager.py +++ b/bookwyrm/books_manager.py @@ -50,7 +50,7 @@ def get_or_create_connector(remote_id): books_url='https://%s/book' % identifier, covers_url='https://%s/images/covers' % identifier, search_url='https://%s/search?q=' % identifier, - priority=3 + priority=2 ) return load_connector(connector_info) diff --git a/bookwyrm/templates/search_results.html b/bookwyrm/templates/search_results.html index bd5096fe..14e5fbbd 100644 --- a/bookwyrm/templates/search_results.html +++ b/bookwyrm/templates/search_results.html @@ -1,32 +1,66 @@ {% extends 'layout.html' %} {% block content %} +{% with book_results|first as local_results %}

Matching Books

- {% for result_set in book_results %} - {% if result_set.results %} -
- {% if not result_set.connector.local %} -

- Results from {% if result_set.connector.name %}{{ result_set.connector.name }}{% else %}{{ result_set.connector.identifier }}{% endif %} -

- {% endif %} - - {% for result in result_set.results %} -
-
- {% csrf_token %} - - -
-
+
+ {% if not local_results.results %} +

No books found for "{{ query }}"

+ {% else %} + + {% endif %}
+ + {% if book_results|slice:":1" and local_results.results %} +
+

+ Didn't find what you were looking for? +

+ + + +
{% endif %} - {% endfor %} - {% if not book_results %} -

No books found for "{{ query }}"

- {% endif %} + + +

Matching Users

@@ -42,4 +76,5 @@ {% endfor %}
+{% endwith %} {% endblock %} diff --git a/init_db.py b/init_db.py index ef11f8c5..a7a45c20 100644 --- a/init_db.py +++ b/init_db.py @@ -76,4 +76,5 @@ Connector.objects.create( books_url='https://openlibrary.org', covers_url='https://covers.openlibrary.org', search_url='https://openlibrary.org/search?q=', + priority=3, )