I have the following python script in a folder with a mp3 file:
import os
import eyed3
def track(file):
tag = eyed3.load(file)
tag.tag.comment = u"teststring"
tag.tag.genre = u"Pop"
tag.tag.save()
for fn in os.listdir('.'):
print fn[-3:]
if fn[-3:] == 'mp3':
track(fn)
The 'genre' is set or changed correctly, but my comment is just adding some garbage. I added a 'Test' in winamp to the comment, and after I run my script and output the ID3 info from the commandline, I see this:
ys3(01).mp3 [ 3.86 MB ]
-------------------------------------------------------------------------------
Time: 03:02 MPEG1, Layer III [ ~177 kb/s @ 48000 Hz - Joint stereo ]
-------------------------------------------------------------------------------
ID3 v2.3:
title: WANDERERS FROM YS - ?
artist:
album:
track: genre: Pop (id 13)
Comment: [Description: ] [Lang: eng]
Test
Comment: [Description: ÿþÿ] [Lang: eng]
þ
-------------------------------------------------------------------------------
Am I passing the 'Comment' in the wrong way?