Skip to content

Commit

Permalink
none string??
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed Aug 16, 2024
1 parent 79f7bf4 commit 4123257
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rose-py/rose/audiotags.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,11 @@ def _write_tag_with_description(name: str, value: str | None) -> None:
except (KeyError, IndexError):
prev_disctotal = 1
try:
# Not sure why they can be a None string, but whatever...
if self.tracknumber == "None":
self.tracknumber = None
if self.discnumber == "None":
self.discnumber = None
m.tags["trkn"] = [(int(self.tracknumber or "0"), prev_tracktotal)]
m.tags["disk"] = [(int(self.discnumber or "0"), prev_disctotal)]
except ValueError as e:
Expand Down

0 comments on commit 4123257

Please sign in to comment.