Skip to content

Commit

Permalink
Fix bug where existing ComicInfo.xml doesn't have a Notes element. (
Browse files Browse the repository at this point in the history
  • Loading branch information
bpepple authored Apr 6, 2024
1 parent bf56c66 commit 736021b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metrontagger/talker.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ def _get_source_id(md: Metadata) -> tuple[InfoSource, int | None]:
source: InfoSource = InfoSource.unknown
id_: int | None = None

# If `Notes` element doesn't exist let's bail.
if md.notes is None:
return source, id_

lower_notes = md.notes.lower()
if "metrontagger" in lower_notes:
source = InfoSource.metron
Expand Down

0 comments on commit 736021b

Please sign in to comment.