Closed MatthiasHerp closed 4 years ago
audiofile.tag.GRP1 = "Grouptag"
is not a thing. Just like GRP1 :) Which is a Apple "extension", so eyeD3 is not really provide any helpers.
This should will work though: audiofile.tag.frame_set[b"GRP1"] = GRP1("GroupName")
GRP1 extends from TextFrame, so there SHOULD only be one frame of this type per tag.
@nicfit thanks for the quick response. I tried your code but it didn't work although there was no error message. Is there any other package/subpackage your code would require to run? Since at the moment I only import as follows:
import eyed3 from eyed3.id3 import apple GRP1 = apple.GRP1
Or do you have any other idea?
Otherwise its not such a big deal. I tried your comment and genre changing code examples and it worked without a problem. Since I'm only writing a code to download and automatically sort music, I can also tag tracks by adding special genres or comments.
Thanks a lot for your help :)
@MatthiasHerp ,indeed. The code I gave adds the GRP1, but not with the right data. Try this:
grp1 = GRP1()
grp1.text = "GroupName123"
audiofile.tag.frame_set[b"GRP1"] = grp1
audiofile.tag.save()
audiofile = eyed3.load("sample.mp3")
print(audiofile.tag.frame_set[b"GRP1"][0].text)
A future release will support the more terse:
audiofile.tag.frame_set[b"GRP1"] = GRP1(text="GroupName123')
@nicfit , thanks for the response. I just tried your code and it works :)
This is a great help to my project :) (automated downloader for tracks I save in spotify that adds them in the right iTunes Playlist)
I tried to use your package to change the Grouping of mp3s. But the Grouping didn't change even though I didn't get an error. Changing the Album Name worked.
My Code: MP3_Tag_Edit.txt
Thansk for the help. Probably a basic thing since I m new to python :)