mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Fixed wrong caching of artists
This commit is contained in:
parent
ecd6594290
commit
4d9a35e3eb
@ -132,7 +132,7 @@ def static(name):
|
||||
|
||||
@webserver.route("/<name>")
|
||||
def static_html(name):
|
||||
linkheaders = ["</maloja.css>; rel=preload; as=style"]
|
||||
linkheaders = ["</css/maloja.css>; rel=preload; as=style"]
|
||||
keys = removeIdentical(FormsDict.decode(request.query))
|
||||
|
||||
with open("website/" + name + ".html") as htmlfile:
|
||||
|
@ -273,7 +273,7 @@ def cache_track(artists,title,result):
|
||||
def cache_artist(artist,result):
|
||||
cachedArtists[artist] = result
|
||||
day = datetime.date.today().toordinal()
|
||||
cachedArtists[artist] = day
|
||||
cachedArtistsDays[artist] = day
|
||||
|
||||
def track_from_cache(artists,title):
|
||||
try:
|
||||
@ -455,11 +455,13 @@ def getArtistImage(artist,fast=False):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
# do we have an api key?
|
||||
apikey = settings.get_settings("LASTFM_API_KEY")
|
||||
if apikey is None: return "" # DO NOT CACHE THAT
|
||||
|
||||
|
||||
|
||||
# fast request only retuns cached and local results, generates redirect link for rest
|
||||
if fast: return "/image?artist=" + urllib.parse.quote(artist)
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
<meta name="description" content='Maloja is a self-hosted music scrobble server.' />
|
||||
<link rel="stylesheet" href="maloja.css" />
|
||||
<link rel="stylesheet" href="css/maloja.css" />
|
||||
<script src="javascript/search.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user