Skip to content

Commit

Permalink
Revert "update tagger testfiles"
Browse files Browse the repository at this point in the history
This reverts commit a75c364.
  • Loading branch information
azuline committed Apr 20, 2024
1 parent 5ecac39 commit 28f30d1
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions rose/audiotags.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,19 @@ def _get_paired_frame(x: str) -> str | None:
return None

return AudioTags(
id=_get_tag(m.tags, ["TXXX:ROSEID"]),
release_id=_get_tag(m.tags, ["TXXX:ROSERELEASEID"]),
id=_get_tag(m.tags, ["TXXX:ROSEID"], first=True),
release_id=_get_tag(m.tags, ["TXXX:ROSERELEASEID"], first=True),
title=_get_tag(m.tags, ["TIT2"]),
releaseyear=_parse_year(_get_tag(m.tags, ["TDRC", "TYER"])),
compositionyear=_parse_year(_get_tag(m.tags, ["TXXX:COMPOSITIONDATE"])),
compositionyear=_parse_year(_get_tag(m.tags, ["TXXX:COMPOSITIONDATE"], first=True)),
tracknumber=tracknumber,
tracktotal=tracktotal,
discnumber=discnumber,
disctotal=disctotal,
release=_get_tag(m.tags, ["TALB"]),
genre=_split_tag(_get_tag(m.tags, ["TCON"], split=True)),
label=_split_tag(_get_tag(m.tags, ["TPUB"], split=True)),
catalognumber=_get_tag(m.tags, ["TXXX:CATALOGNUMBER"]),
catalognumber=_get_tag(m.tags, ["TXXX:CATALOGNUMBER"], first=True),
releasetype=_normalize_rtype(_get_tag(m.tags, ["TXXX:RELEASETYPE"], first=True)),
releaseartists=parse_artist_string(main=_get_tag(m.tags, ["TPE2"], split=True)),
trackartists=parse_artist_string(
Expand Down Expand Up @@ -273,7 +273,7 @@ def _write_tag_with_description(name: str, value: str | None) -> None:
keep_fields = [f for f in m.tags.getall(key) if getattr(f, "desc", None) != desc]
m.tags.delall(key)
if value:
frame = getattr(mutagen.id3, key)(desc=desc, text=value)
frame = getattr(mutagen.id3, key)(desc=desc, text=[value])
m.tags.add(frame)
for f in keep_fields:
m.tags.add(f)
Expand Down
Binary file modified testdata/Tagger/track1.flac
Binary file not shown.
Binary file modified testdata/Tagger/track2.m4a
Binary file not shown.
Binary file modified testdata/Tagger/track3.mp3
Binary file not shown.
Binary file modified testdata/Tagger/track4.vorbis.ogg
Binary file not shown.
Binary file modified testdata/Tagger/track5.opus.ogg
Binary file not shown.
2 changes: 1 addition & 1 deletion testdata/Tagger/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def write_tag_with_description(f: Any, name: str, value: str | None) -> None:
keep_fields = [f for f in f.tags.getall(key) if getattr(f, "desc", None) != desc]
f.tags.delall(key)
if value:
frame = getattr(mutagen.id3, key)(desc=desc, text=value)
frame = getattr(mutagen.id3, key)(desc=desc, text=[value])
f.tags.add(frame)
for x in keep_fields:
f.tags.add(x)
Expand Down

0 comments on commit 28f30d1

Please sign in to comment.