Get artwork by (artist, album)

This makes it easier to find artwork using (artist, album) as a key.
This will probably be the best way to use artwork in the web interface.
This commit is contained in:
Bryan Schumaker 2010-11-16 23:01:19 -05:00
parent 86715614c9
commit f8e8837d3c
1 changed files with 5 additions and 2 deletions

View File

@ -62,12 +62,15 @@ def lfm_cache_album(file, artist, album):
pass
return False
def get_artwork_id(id):
artist, album = libsaria.sources.get_attrs(id, "artist", "album")
def get_artwork_tags(artist, album):
cached = cache[artist]
file = cached.get("%s.jpg" % album, lfm_cache_album, artist, album)
return file
def get_artwork_id(id):
artist, album = libsaria.sources.get_attrs(id, "artist", "album")
return get_artwork_tags(artist, album)
def get_artwork(filepath):
id = file_to_id(filepath)
if id == None: