mirror of
https://github.com/krateng/maloja.git
synced 2025-04-16 16:52:18 +03:00
Smol fixes
This commit is contained in:
parent
0be122afb6
commit
8fcc1ae847
@ -92,7 +92,9 @@ def get_image_from_cache(track_id=None,artist_id=None,album_id=None):
|
||||
elif row.localproxyurl:
|
||||
return {'type':'localurl','value':row.localproxyurl}
|
||||
else:
|
||||
return {'type':'url','value':row.url} # returns None as value if nonexistence cached
|
||||
return {'type':'url','value':row.url or None}
|
||||
# value none means nonexistence is cached
|
||||
# for some reason this can also be an empty string, so use or None here to unify
|
||||
return None # no cache entry
|
||||
|
||||
def set_image_in_cache(url,track_id=None,artist_id=None,album_id=None,local=False):
|
||||
@ -260,7 +262,7 @@ def resolve_image(artist_id=None,track_id=None,album_id=None):
|
||||
elif album_id:
|
||||
result = thirdparty.get_image_album_all((entity['artists'],entity['albumtitle']))
|
||||
|
||||
result = {'type':'url','value':result}
|
||||
result = {'type':'url','value':result or None}
|
||||
set_image_in_cache(artist_id=artist_id,track_id=track_id,album_id=album_id,url=result['value'])
|
||||
finally:
|
||||
with image_resolve_controller_lock:
|
||||
|
@ -8,7 +8,7 @@
|
||||
of {{ links.link(filterkeys.get('track')) }}
|
||||
by {{ links.links(filterkeys["track"]["artists"]) }}
|
||||
{% elif filterkeys.get('album') is not none %}
|
||||
of {{ links.link(filterkeys.get('album')) }}
|
||||
from {{ links.link(filterkeys.get('album')) }}
|
||||
by {{ links.links(filterkeys["album"]["artists"]) }}
|
||||
{% endif %}
|
||||
{{ limitkeys.timerange.desc(prefix=True) }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user