diff --git a/catalog/book/models.py b/catalog/book/models.py index 93b86a8b..e96eda58 100644 --- a/catalog/book/models.py +++ b/catalog/book/models.py @@ -198,7 +198,7 @@ class Edition(Item): imprint = jsondata.CharField(_("imprint"), null=True, blank=True, max_length=500) def get_localized_subtitle(self) -> str | None: - return self.localized_title[0]["text"] if self.localized_subtitle else None + return self.localized_subtitle[0]["text"] if self.localized_subtitle else None @property def display_subtitle(self) -> str | None: diff --git a/catalog/sites/google_books.py b/catalog/sites/google_books.py index 89d26859..46a9efbb 100644 --- a/catalog/sites/google_books.py +++ b/catalog/sites/google_books.py @@ -40,7 +40,9 @@ def scrape(self): pub_house = ( b["volumeInfo"]["publisher"] if "publisher" in b["volumeInfo"] else None ) - language = b["volumeInfo"]["language"] if "language" in b["volumeInfo"] else [] + language = ( + b["volumeInfo"]["language"].lower() if "language" in b["volumeInfo"] else [] + ) pages = b["volumeInfo"]["pageCount"] if "pageCount" in b["volumeInfo"] else None if "mainCategory" in b["volumeInfo"]: diff --git a/catalog/templates/item_base.html b/catalog/templates/item_base.html index d32d0e89..8a4d4655 100644 --- a/catalog/templates/item_base.html +++ b/catalog/templates/item_base.html @@ -198,20 +198,18 @@

-

- {% if item.display_subtitle %}{{ item.display_subtitle }}{% endif %} - {% if item.orig_title and item.orig_title != item.display_title %} -

- {{ item.orig_title }} - - {% if item.season_number %}Season {{ item.season_number }}{% endif %} - -

- {% endif %} - {% if item.parent_item %} - {% trans 'part of' %} {{ item.parent_item.type.label }}: {{ item.parent_item.display_title }} - {% endif %} -

+ {% if item.display_subtitle %}

{{ item.display_subtitle }}

{% endif %} + {% if item.orig_title and item.orig_title != item.display_title %} +

+ {{ item.orig_title }} + + {% if item.season_number %}Season {{ item.season_number }}{% endif %} + +

+ {% endif %} + {% if item.parent_item %} + {% trans 'part of' %} {{ item.parent_item.type.label }}: {{ item.parent_item.display_title }} + {% endif %} {% if item.author or item.translator %}

diff --git a/compose.yml b/compose.yml index 221fc82b..f1a083c1 100644 --- a/compose.yml +++ b/compose.yml @@ -188,7 +188,7 @@ services: neodb-worker: <<: *neodb-service - command: neodb-manage rqworker-pool --num-workers ${NEODB_RQ_WORKER_NUM:-4} --with-scheduler import export mastodon fetch crawl ap cron + command: neodb-manage rqworker --with-scheduler import export mastodon fetch crawl ap cron depends_on: migration: condition: service_completed_successfully