KristoforMaynard / music-tag

Simple interface to edit audio file metadata
MIT License
108 stars 16 forks source link

Year not saved with id3v1 #10

Open jiujitsu opened 3 years ago

jiujitsu commented 3 years ago

To reproduce:

mp3 = music_tag.load_file(mp3_path)

mp3['title'] = 'Title'
mp3['artist'] = 'Artist'
mp3['album'] = 'Album Name'
mp3['tracknumber'] = 2
mp3['genre'] = 'Pop'
mp3['year'] = 2021

# https://mutagen.readthedocs.io/en/latest/user/id3.html v1=2 tells mutagen to enable v1 tags
mp3.save(v1=2)

Then the output of eyeD3 </path/to/file> -v1 is:

ID3 v1.1:
title: Title
artist: Artist
album: Album Name
track: 2        genre: Pop (id 13)

So it is perfect except it is missing the year.

KristoforMaynard commented 3 years ago

This might be more an issue for mutagen, but it could also be due to my tenuous understanding of the different year tags in the different versions of ID3. Anyone more knowledgeable about this, please feel free to chime in.

ganeshh123 commented 1 year ago

Same issue with me, the "Year" tag is applied correctly and shows in Windows Explorer: image

But in an Application like MusicBee, the "Year" is empty but the value is actually present as "Original Year": image image

The "Year" also doesn't show correctly in a lot of Android Music Players, I guess the tagging format doesn't work with newer players.

uuupah commented 1 week ago

i know that the original question was for id3v1 but i'm getting the same issue with id3v2.4. did some fiddling and found that reordering this line to setter=('TYER', 'TDOR', 'TDAT', 'TDRC'), sets the year to the TYER instead of TDOR which musicbee, windows explorer and media player all seem to recognise. this obviously isn't the final answer, but i was wondering if anyone with a better understanding of how this setter row is used could weigh in? i was assuming that the setter would set all of these tags to the specified year but that's clearly not the case. does it just attempt the first one and try the second if it fails etc?

i'm going to go for more of a dig into the functionality later and hopefully figure it out but just thought i would check if theres anyone who could save me the trouble.