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:
parent
86715614c9
commit
f8e8837d3c
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user