diff --git a/catalog/book/models.py b/catalog/book/models.py index 3741c3a7..75e23205 100644 --- a/catalog/book/models.py +++ b/catalog/book/models.py @@ -118,7 +118,7 @@ class BookFormat(models.TextChoices): HARDCOVER = "hardcover", _("Hardcover") EBOOK = "ebook", _("eBook") AUDIOBOOK = "audiobook", _("Audiobook") - GRAPHICNOVEL = "graphicnovel", _("GraphicNovel") + # GRAPHICNOVEL = "graphicnovel", _("GraphicNovel") WEB = "web", _("Web Fiction") OTHER = "other", _("Other") diff --git a/locale/zh_Hans/LC_MESSAGES/django.po b/locale/zh_Hans/LC_MESSAGES/django.po index 8e76c984..53e82511 100644 --- a/locale/zh_Hans/LC_MESSAGES/django.po +++ b/locale/zh_Hans/LC_MESSAGES/django.po @@ -63,7 +63,7 @@ msgstr "图像小说" #: catalog/book/models.py:122 msgid "Web Fiction" -msgstr "网络小说" +msgstr "网络作品" #: catalog/book/models.py:123 catalog/game/models.py:31 msgid "Other" @@ -88,10 +88,8 @@ msgid "translator" msgstr "译者" #: catalog/book/models.py:186 catalog/templates/edition.html:27 -#, fuzzy -#| msgid "books to read" msgid "book format" -msgstr "想读的书" +msgstr "格式" #: catalog/book/models.py:193 catalog/templates/edition.html:33 msgid "publishing house" diff --git a/locale/zh_Hant/LC_MESSAGES/django.po b/locale/zh_Hant/LC_MESSAGES/django.po index 0c22285c..c550a751 100644 --- a/locale/zh_Hant/LC_MESSAGES/django.po +++ b/locale/zh_Hant/LC_MESSAGES/django.po @@ -63,7 +63,7 @@ msgstr "圖像小說" #: catalog/book/models.py:122 msgid "Web Fiction" -msgstr "網絡小說" +msgstr "網絡作品" #: catalog/book/models.py:123 catalog/game/models.py:31 msgid "Other" @@ -88,10 +88,8 @@ msgid "translator" msgstr "譯者" #: catalog/book/models.py:186 catalog/templates/edition.html:27 -#, fuzzy -#| msgid "books to read" msgid "book format" -msgstr "想讀的書" +msgstr "格式" #: catalog/book/models.py:193 catalog/templates/edition.html:33 msgid "publishing house" diff --git a/mastodon/models/mastodon.py b/mastodon/models/mastodon.py index e6012016..37b3d176 100644 --- a/mastodon/models/mastodon.py +++ b/mastodon/models/mastodon.py @@ -249,6 +249,10 @@ def _get_scopes(server_version: str) -> str: ) +def _force_recreate_app(server_version): + return re.match(r".+(Sharkey|Firefish).+", server_version or "") + + def create_app(domain_name, server_version): url = "https://" + domain_name + API_CREATE_APP payload = { @@ -442,7 +446,8 @@ def get_or_create_fediverse_application(login_domain): if not app: app = MastodonApplication.objects.filter(api_domain__iexact=domain).first() if app: - if " Firefish " in app.server_version: + if _force_recreate_app(app.server_version): + logger.warning(f"Force recreate app for {login_domain}") data = create_app(app.api_domain, app.server_version).json() app.app_id = data["id"] app.client_id = data["client_id"] diff --git a/neodb-takahe b/neodb-takahe index 7ea6cb12..f606441c 160000 --- a/neodb-takahe +++ b/neodb-takahe @@ -1 +1 @@ -Subproject commit 7ea6cb122ccec55c2d5b6f719bd578f8ac31a322 +Subproject commit f606441c73db2567b440dbf776d64973218ba539