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
|
pass
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def get_artwork_id(id):
|
def get_artwork_tags(artist, album):
|
||||||
artist, album = libsaria.sources.get_attrs(id, "artist", "album")
|
|
||||||
cached = cache[artist]
|
cached = cache[artist]
|
||||||
file = cached.get("%s.jpg" % album, lfm_cache_album, artist, album)
|
file = cached.get("%s.jpg" % album, lfm_cache_album, artist, album)
|
||||||
return file
|
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):
|
def get_artwork(filepath):
|
||||||
id = file_to_id(filepath)
|
id = file_to_id(filepath)
|
||||||
if id == None:
|
if id == None:
|
||||||
|
|
Loading…
Reference in New Issue