Created
September 26, 2011 19:30
-
-
Save holtbp/1243165 to your computer and use it in GitHub Desktop.
Turntable FM Cache File type converter
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
import os, glob, shutil, sys | |
path = os.environ['LOCALAPPDATA'] + "/Google/Chrome/User Data/Default/Cache/" | |
listing = os.listdir(path) | |
for infile in listing: | |
if "f_" in infile: | |
abs_path = path + infile | |
statinfo = os.stat(abs_path) | |
if statinfo.st_size > 1000000: #checking to see if the file > 1MB | |
print 'Checking ' + infile + ' | Name: ' + repr(statinfo.st_size) + ' | Size: ' + repr(statinfo.st_size) | |
print statinfo | |
if not "mp3" in infile: | |
newfile = abs_path + '.mp3' | |
print 'Renaming: ' + newfile | |
os.rename(abs_path, newfile) | |
abs_path = newfile | |
infile += ".mp3" | |
#TODO: Set this value for destination directory | |
dest = "" | |
if "mp3" in infile: | |
try: | |
shutil.move(abs_path, dest) | |
except: | |
print "Unexpected error:", sys.exc_info()[0] |
Yeah, don't worry about it man. I was able to change the directories, but
since they use Amazon streaming now I may resort to direct recording..
which blows since that throws ID3 tags out the window.
It's funny.. the only time I contemplate buying the music, there's no
reliable way.
Thanks anyway man.
…On Mar 15, 2012 1:49 AM, "holtbp" < ***@***.***> wrote:
Sorry I wasn't able to get you a Mac version before TTFM switched to
streaming.
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/1243165
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry I wasn't able to get you a Mac version before TTFM switched to streaming.