Created
January 15, 2015 21:46
-
-
Save Filirom1/006d3ef0ba0ab6076292 to your computer and use it in GitHub Desktop.
re-tag mp3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import eyed3 | |
import os | |
import glob; | |
for filename in glob.glob('/dir/to/mp3/**/**/*.mp3'): | |
try: | |
print(filename) | |
audiofile = eyed3.load(filename) | |
audiofile.tag.setTextFrame('TCOM', audiofile.tag.album_artist or audiofile.tag.artist) | |
print(audiofile.tag.getTextFrame('TCOM')); | |
audiofile.tag.save() | |
except: | |
print("Exception") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment