Skip to content

Commit

Permalink
Add gcd_id to metadata (#168)
Browse files Browse the repository at this point in the history
* Add gcd_id to metadata if available
* Update deps
  • Loading branch information
bpepple authored Dec 18, 2024
1 parent 400e12c commit 3e5d7d0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
9 changes: 8 additions & 1 deletion metrontagger/talker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
22 changes: 11 additions & 11 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3e5d7d0

Please sign in to comment.