Last active
          January 3, 2021 19:16 
        
      - 
      
 - 
        
Save ZachSaucier/f51e608ac75e8ed6e96cd54a9ec103b0 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
ZachSaucier revised this gist
Jan 3, 2021 . 1 changed file with 8 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,11 +5,16 @@ filename = os.path.basename(file) if " - " in filename: artist, track = filename.split(' - ') if "".__eq__(track): track = artist artist = "" audiofile = eyed3.load("./" + filename) audiofile.initTag() if not "".__eq__(artist): audiofile.tag.artist = artist audiofile.tag.title = track.split('.mp3')[0] audiofile.tag.save() os.rename(filename, track)  - 
        
ZachSaucier revised this gist
Jan 27, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ audiofile = eyed3.load("./" + filename) audiofile.initTag() audiofile.tag.artist = unicode(artist) audiofile.tag.title = unicode(track.split('.mp3')[0]) audiofile.tag.save()  - 
        
ZachSaucier revised this gist
Jan 27, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,8 +8,8 @@ audiofile = eyed3.load("./" + filename) audiofile.initTag() audiofile.tag.artist = unicode("utf-8") audiofile.tag.title = unicode(track.split('.mp3')[0]) audiofile.tag.save() os.rename(filename, track)  - 
        
ZachSaucier revised this gist
Nov 16, 2019 . 1 changed file with 3 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,13 +4,12 @@ for file in glob.glob("*.mp3"): filename = os.path.basename(file) if " - " in filename: artist, track = filename.split(' - ') audiofile = eyed3.load("./" + filename) audiofile.initTag() audiofile.tag.artist = artist audiofile.tag.title = track.split('.mp3')[0] audiofile.tag.save() os.rename(filename, track)  - 
        
ZachSaucier created this gist
Nov 16, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ import os, glob, eyed3 os.chdir("./") for file in glob.glob("*.mp3"): filename = os.path.basename(file) if " - " in filename: artist = filename.split(' - ')[0] track = filename.split(' - ')[1].split('.mp3')[0] audiofile = eyed3.load("./" + filename) audiofile.initTag() audiofile.tag.artist = artist audiofile.tag.title = track audiofile.tag.save() os.rename(filename, track + '.mp3')