Skip to content

Commit

Permalink
Add source id to metadata if it exists the ComicInfo note
Browse files Browse the repository at this point in the history
  • Loading branch information
bpepple committed Nov 28, 2024
1 parent d346ccd commit 3419d88
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion darkseid/comicinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@
Basic,
Credit,
ImageMetadata,
InfoSources,
Links,
Metadata,
Notes,
Publisher,
Role,
Series,
)
from darkseid.utils import list_to_string, xlate
from darkseid.utils import get_issue_id_from_note, list_to_string, xlate


class ComicInfo:
Expand Down Expand Up @@ -368,6 +369,10 @@ def get_age_rating(age_text: str) -> AgeRatings | None:
md.alternate_count = xlate(get("AlternateCount"), True)
md.comments = xlate(get("Summary"))
md.notes = get_note(xlate(get("Notes")))
if md.notes is not None and md.notes.comic_rack is not None:
src = get_issue_id_from_note(md.notes.comic_rack)
if src is not None:
md.info_source = [InfoSources(src["source"], src["id"], True)]
# Cover Year
tmp_year = xlate(get("Year"), True)
tmp_month = xlate(get("Month"), True)
Expand Down

0 comments on commit 3419d88

Please sign in to comment.