diff --git a/metrontagger/talker.py b/metrontagger/talker.py index 5584310..e3fe1df 100644 --- a/metrontagger/talker.py +++ b/metrontagger/talker.py @@ -603,7 +603,14 @@ def map_ratings(rating: str) -> AgeRatings: md = Metadata() - alt_info_source = [InfoSources("Comic Vine", resp.cv_id)] if resp.cv_id else [] + alt_info_source = [ + info_source + for info_source in [ + InfoSources("Comic Vine", resp.cv_id) if resp.cv_id else None, + InfoSources("Grand Comics Database", resp.gcd_id) if resp.gcd_id else None, + ] + if info_source is not None + ] md.info_source = [InfoSources("Metron", resp.id, True)] + alt_info_source # NOQA: RUF005 md.series = Series( name=resp.series.name, diff --git a/poetry.lock b/poetry.lock index 498ef94..a70f983 100644 --- a/poetry.lock +++ b/poetry.lock @@ -24,13 +24,13 @@ files = [ [[package]] name = "certifi" -version = "2024.8.30" +version = "2024.12.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, - {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, + {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, + {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, ] [[package]] @@ -445,17 +445,17 @@ restructuredtext = ["rst2ansi"] [[package]] name = "mokkari" -version = "3.4.0" +version = "3.5.0" description = "Python wrapper for Metron API" optional = false python-versions = "<4.0,>=3.10" files = [ - {file = "mokkari-3.4.0-py3-none-any.whl", hash = "sha256:5bf5930cf1c871a0fb6f6d22f94f0ee2092224846832d1ef62a0a7faddf371d4"}, - {file = "mokkari-3.4.0.tar.gz", hash = "sha256:5caff5856883855e70ff299b795501829469c898f550a8de3124fcffcebcff35"}, + {file = "mokkari-3.5.0-py3-none-any.whl", hash = "sha256:dba6b81a0d307f85f65edd0a4ec42478ef3eb2afaa4921950de441d1deea59b7"}, + {file = "mokkari-3.5.0.tar.gz", hash = "sha256:6b253d2efa3728146de5bd3e5aea9415a34c1d348b58e809a0fbbad802ef5994"}, ] [package.dependencies] -pydantic = ">=2.5.3,<3.0.0" +pydantic = ">=2.10.3,<3.0.0" ratelimit = ">=2.2.1,<3.0.0" requests = ">=2.26.0,<3.0.0" @@ -970,13 +970,13 @@ testing = ["covdefaults (>=2.3)", "pytest (>=8.3.3)", "pytest-cov (>=5)", "pytes [[package]] name = "pyright" -version = "1.1.390" +version = "1.1.391" description = "Command line wrapper for pyright" optional = false python-versions = ">=3.7" files = [ - {file = "pyright-1.1.390-py3-none-any.whl", hash = "sha256:ecebfba5b6b50af7c1a44c2ba144ba2ab542c227eb49bc1f16984ff714e0e110"}, - {file = "pyright-1.1.390.tar.gz", hash = "sha256:aad7f160c49e0fbf8209507a15e17b781f63a86a1facb69ca877c71ef2e9538d"}, + {file = "pyright-1.1.391-py3-none-any.whl", hash = "sha256:54fa186f8b3e8a55a44ebfa842636635688670c6896dcf6cf4a7fc75062f4d15"}, + {file = "pyright-1.1.391.tar.gz", hash = "sha256:66b2d42cdf5c3cbab05f2f4b76e8bec8aa78e679bfa0b6ad7b923d9e027cadb2"}, ] [package.dependencies] @@ -1564,4 +1564,4 @@ docs = ["Sphinx", "elementpath (>=4.4.0,<5.0.0)", "jinja2", "sphinx-rtd-theme"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "c01088378ff2b27750f7c57609823780aa217e81e0a6d568328a3bf7037cad43" +content-hash = "9e817a97078d7b2baca995901992edf70ca59fefd74ca598cb96fc71be0265bf" diff --git a/pyproject.toml b/pyproject.toml index 650b129..bd66b39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ keywords = ["comics", "comic", "metadata", "tagging", "tagger"] [tool.poetry.dependencies] python = "^3.10" -mokkari = "^3.4.0" +mokkari = "^3.5.0" questionary = "^2.0.1" pyxdg = "^0.28" imagehash = "^4.3.1"