mirror of
https://github.com/krateng/maloja.git
synced 2025-07-09 03:04:07 -04:00
Merge branch 'feature-albums' into next_minor_version
This commit is contained in:
commit
c0ccb716c5
0
maloja/data_files/state/images/albums/dummy
Normal file
0
maloja/data_files/state/images/albums/dummy
Normal file
@ -110,6 +110,7 @@ def incoming_scrobble(rawscrobble,fix=True,client=None,api=None,dbconn=None):
|
|||||||
proxy_scrobble_all(scrobbledict['track']['artists'],scrobbledict['track']['title'],scrobbledict['time'])
|
proxy_scrobble_all(scrobbledict['track']['artists'],scrobbledict['track']['title'],scrobbledict['time'])
|
||||||
|
|
||||||
dbcache.invalidate_caches(scrobbledict['time'])
|
dbcache.invalidate_caches(scrobbledict['time'])
|
||||||
|
dbcache.invalidate_entity_cache() # because album info might have changed
|
||||||
|
|
||||||
#return {"status":"success","scrobble":scrobbledict}
|
#return {"status":"success","scrobble":scrobbledict}
|
||||||
return scrobbledict
|
return scrobbledict
|
||||||
@ -153,6 +154,11 @@ def rawscrobble_to_scrobbledict(rawscrobble, fix=True, client=None):
|
|||||||
if 'album_artists' not in scrobbleinfo:
|
if 'album_artists' not in scrobbleinfo:
|
||||||
scrobbleinfo['album_artists'] = scrobbleinfo.get('track_artists')
|
scrobbleinfo['album_artists'] = scrobbleinfo.get('track_artists')
|
||||||
|
|
||||||
|
# New plan, do this further down
|
||||||
|
# NONE always means there is simply no info, so make a guess or whatever the options say
|
||||||
|
# various artists always needs to be specified via []
|
||||||
|
# TODO
|
||||||
|
|
||||||
# processed info to internal scrobble dict
|
# processed info to internal scrobble dict
|
||||||
scrobbledict = {
|
scrobbledict = {
|
||||||
"time":scrobbleinfo.get('scrobble_time'),
|
"time":scrobbleinfo.get('scrobble_time'),
|
||||||
|
@ -220,8 +220,8 @@ def jinja_page(name):
|
|||||||
res = template.render(**loc_context)
|
res = template.render(**loc_context)
|
||||||
except TemplateNotFound:
|
except TemplateNotFound:
|
||||||
abort(404,f"Not found: '{name}'")
|
abort(404,f"Not found: '{name}'")
|
||||||
except (ValueError, IndexError):
|
#except (ValueError, IndexError):
|
||||||
abort(404,"This Artist or Track does not exist")
|
# abort(404,"This Artist or Track does not exist")
|
||||||
|
|
||||||
if malojaconfig["DEV_MODE"]: jinja_environment.cache.clear()
|
if malojaconfig["DEV_MODE"]: jinja_environment.cache.clear()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user