Created
August 21, 2012 19:36
-
-
Save intijk/3418600 to your computer and use it in GitHub Desktop.
Modify your id3 v2 info
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
#!/usr/bin/env python2 | |
import pyid3lib | |
import sys | |
if len(sys.argv) < 2 or len(sys.argv) > 3: | |
sys.exit('Usage: %s filename' % sys.argv[0]) | |
print("Modify file:\n" + sys.argv[1]) | |
f=pyid3lib.tag(sys.argv[1]) | |
#Title | |
print("") | |
print("Title:") | |
print('Current: %s' % f.title) | |
mtitle=raw_input("") | |
if len(mtitle)>0: | |
f.title=mtitle | |
#Artist | |
print('Artist:') | |
print('Current: %s' % f.artist) | |
martist=raw_input("") | |
if len(martist)>0: | |
f.artist=martist | |
#Album | |
print('Album:') | |
print('Current: %s' % f.album) | |
malbum=raw_input("") | |
if len(malbum)>0: | |
f.album=malbum | |
f.update() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment