Created
March 17, 2016 13:14
-
-
Save tyrelsouza/b4a70f6602e9fa53e90d to your computer and use it in GitHub Desktop.
Fix ID3 Shadowrun Chronicles from Humble Bundle
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from mutagen.id3 import ID3, TALB, TPE1, TDRC, TCOM, TIT2 | |
fnames = (u"01 Alexander Guski - Digital Destiny.mp3", | |
u"02 Andrew Carroll - Shadowrun Chronicles.mp3", | |
u"03 Akpomuje Garreis - Arcology is reopening.mp3", | |
u"04 Carlos Martin - Epic.mp3", | |
u"05 Carlos Martin - Drums of War.mp3", | |
u"06 GÇry Montet - The Awakening of the Sixth World.mp3", | |
u"07 Ian Dorsch - GhostDance.mp3", | |
u"08 Ffejtastick - Junk Data.mp3", | |
u"09 Alexander Guski - Running the Shadows.mp3", | |
u"10 Carlos Martin - Shadowrun.mp3", | |
u"11 GÇry Montet - Meet Mr. Johnson.mp3", | |
u"12 Walter Machado - Night Ride.mp3", | |
u"13 Akpomuje Garreis - Floor Beacon.mp3", | |
u"14 Sven Goldbach - Demo.mp3", | |
u"15 Andrew Carroll - Post Apocalyptic Level.mp3", | |
u"16 Carlos Martin - Atmosphere Shadow.mp3", | |
u"17 Akpomuje Garreis - Entpuppung.mp3") | |
for fname in fnames: | |
tags = ID3(fname) | |
artist_song = fname[2:] | |
artist = artist_song.split("-")[0].rstrip() | |
song = artist_song.split("-")[1].lstrip()[:-4] | |
print artist, song | |
tags["TIT2"] = TIT2(encoding=3, text=song) | |
tags["TALB"] = TALB(encoding=3, text=u'Shadowrun Chronicles') | |
tags["TPE1"] = TPE1(encoding=3, text=u'Shadowrun Chronicles') | |
tags["TDRC"] = TDRC(encoding=3, text=u'2015') | |
tags["TCOM"] = TCOM(encoding=3, text=artist) | |
tags.save(fname) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pip install mutagen
too lazy to do pathing, so make sure this in the same directory as your files.
run it!