Created
July 10, 2012 12:46
-
-
Save alwalker/3083046 to your computer and use it in GitHub Desktop.
mp3 tagger
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 os | |
import eyeD3 | |
trackNo = 1 | |
listing = os.listdir(".") | |
for infile in listing: | |
maxt = listing.count | |
title = " ".join(" ".join(str(infile).split(' ')[1:]).split('.')[:-1]) | |
print title | |
tag = eyeD3.Tag() | |
tag.link(infile) | |
tag.header.setVersion(eyeD3.ID3_V2_3) | |
tag.setArtist("Total War") | |
tag.setGenre(24) | |
tag.setAlbum("Total War Eras") | |
tag.setTrackNum((trackNo, maxt)) | |
trackNo = trackNo + 1 | |
tag.update() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment