Skip to content

Commit

Permalink
Fix a bug in the rename function (#154)
Browse files Browse the repository at this point in the history
Missed updating the darkseid metadata
  • Loading branch information
bpepple authored Nov 24, 2024
1 parent 73e1249 commit 93bf53d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metrontagger/filerenamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def determine_name(self: FileRenamer, filename: Path) -> str | None:
issue_str = IssueString(md.issue).as_string(pad=self.issue_zero_padding)
new_name = self.replace_token(new_name, issue_str, "%issue%")

new_name = self.replace_token(new_name, md.issue_count, "%issuecount%")
new_name = self.replace_token(new_name, md.series.issue_count, "%issuecount%")
new_name = self.replace_token(
new_name, md.cover_date.year if md.cover_date else "Unknown", "%year%"
)
Expand All @@ -269,7 +269,7 @@ def determine_name(self: FileRenamer, filename: Path) -> str | None:
new_name = self.replace_token(new_name, md.alternate_series, "%alternateseries%")
new_name = self.replace_token(new_name, md.alternate_number, "%alternatenumber%")
new_name = self.replace_token(new_name, md.alternate_count, "%alternatecount%")
if md.publisher and md.publisher.imprint:
if md.publisher is not None and md.publisher.imprint is not None:
new_name = self.replace_token(new_name, md.publisher.imprint.name, "%imprint%")

if md.series:
Expand Down

0 comments on commit 93bf53d

Please sign in to comment.