Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import os, glob, eyed3
for file in glob.glob("*.mp3"):
filename = os.path.basename(file)
if " - " in filename:
artist, track = filename.split(' - ')
audiofile = eyed3.load("./" + filename)
audiofile.tag.artist = unicode(artist)
audiofile.tag.title = unicode(track.split('.mp3')[0])
os.rename(filename, track)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.