aa_spec doesnt apply anymore. albumArt has the new path calculation
authorIvan Frade <ivan.frade@gmail.com>
Fri, 1 Jul 2011 15:01:05 +0000 (18:01 +0300)
committerIvan Frade <ivan.frade@gmail.com>
Fri, 1 Jul 2011 15:01:05 +0000 (18:01 +0300)
src/qml/aa_spec.py [deleted file]

diff --git a/src/qml/aa_spec.py b/src/qml/aa_spec.py
deleted file mode 100644 (file)
index cc01fb8..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-import os
-import hashlib
-import unicodedata
-import string
-
-COVERS_LOCATION = os.getenv ("HOME") + "/.cache/media-art/"
-THUMBS_LOCATION = os.getenv ("HOME") + "/.thumbnails/cropped/"
-
-# Hardcoded locations for testing in scratchbox 
-#
-#COVERS_LOCATION = "/home/user/.cache/media-art/"
-#THUMBS_LOCATION = "/home/user/.thumbnails/cropped/"
-
-# Do this only once...
-import albumArt
-
-album_art_func = albumArt.get_albumart_path
-
-def getCoverArtFileName (album):
-    return album_art_func (None, album.encode ("utf-8"), "album")
-    
-def getCoverArtThumbFileName (album):
-    artFile = getCoverArtFileName (album)
-    if not artFile.startswith ("file://"):
-        artFile = "file://" + artFile
-    md5 = hashlib.md5 (artFile)
-    thumbFile = THUMBS_LOCATION + md5.hexdigest() + ".jpeg"
-    return thumbFile
-
-def get_thumb_filename_for_path (path):
-    if not path.startswith ("file://"):
-        path = "file://" + path
-    md5 = hashlib.md5 (path)
-    thumbnail = THUMBS_LOCATION + md5.hexdigest () + ".jpeg"
-    return thumbnail
-
-if __name__ == "__main__":
-    import sys
-    from optparse import OptionParser
-
-    parser = OptionParser()
-    parser.add_option ("-a", "--artist", dest="artist", type="string",
-                       help="ARTIST to look for", metavar="ARTIST")
-    parser.add_option ("-b", "--album", dest="album", type="string",
-                       help="ALBUM to look for", metavar="ALBUM")
-
-    (options, args) = parser.parse_args ()
-    print options
-    if (not options.artist and not options.album):
-        parser.print_help ()
-        sys.exit (-1)
-
-    print "Album art        :", getCoverArtFileName (options.album)
-    print "Thumbnail (album):", getCoverArtThumbFileName (options.album)
-    print "Thumbnail (path) :", get_thumb_filename_for_path (getCoverArtFileName(options.album))