eyeD3 is a Python module and command line program for processing ID3 tags. Information about mp3 files (i.e bit rate, sample frequency, play time, etc.) is also provided. The formats supported are ID3v1 (1.0/1.1) and ID3v2 (2.3/2.4).
Sorry if this is rather nooby question. Not doing this very long yet.
Love your id3 tagging tool, it does work properly but I'm trying to get some return value out of the save function, just to make sure it worked properly but it's not returning a boolean as I'd expect:
returns: NameError: name 'save_audio' is not defined
import eyed3
audiofile = eyed3.load("/path/test-song.mp3")
audiofile.tag.artist = "Token Entry"
audiofile.tag.album = "Free For All Comp LP"
audiofile.tag.album_artist = "Various Artists"
audiofile.tag.title = "The Edge"
audiofile.tag.track_num = 3
if audiofile.tag.save():
print("All good")
else:
print("not good")
returns: not good
I'm sure I'm missing something obvious? I mean I guess I could use try, except and if return is not some exception I'm just gonna continue but just wonder if this was designed this way on purpose. :-/
Hey there nicfit!
Sorry if this is rather nooby question. Not doing this very long yet. Love your id3 tagging tool, it does work properly but I'm trying to get some return value out of the save function, just to make sure it worked properly but it's not returning a boolean as I'd expect:
import eyed3 audiofile = eyed3.load("/path/test-song.mp3") audiofile.tag.artist = "Token Entry" audiofile.tag.album = "Free For All Comp LP" audiofile.tag.album_artist = "Various Artists" audiofile.tag.title = "The Edge" audiofile.tag.track_num = 3 save_audio = audiofile.tag.save() print(save_audio)
returns: NameError: name 'save_audio' is not defined
import eyed3 audiofile = eyed3.load("/path/test-song.mp3") audiofile.tag.artist = "Token Entry" audiofile.tag.album = "Free For All Comp LP" audiofile.tag.album_artist = "Various Artists" audiofile.tag.title = "The Edge" audiofile.tag.track_num = 3 if audiofile.tag.save(): print("All good") else: print("not good")
returns: not good
I'm sure I'm missing something obvious? I mean I guess I could use try, except and if return is not some exception I'm just gonna continue but just wonder if this was designed this way on purpose. :-/
Thanks for your help! Carlos