diff --git a/server.py b/server.py index bd4599c..2c4838d 100755 --- a/server.py +++ b/server.py @@ -132,7 +132,7 @@ def static(name): @webserver.route("/") def static_html(name): - linkheaders = ["; rel=preload; as=style"] + linkheaders = ["; rel=preload; as=style"] keys = removeIdentical(FormsDict.decode(request.query)) with open("website/" + name + ".html") as htmlfile: diff --git a/utilities.py b/utilities.py index e55c1a4..a7213f8 100644 --- a/utilities.py +++ b/utilities.py @@ -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) diff --git a/website/common/header.html b/website/common/header.html index 2f0c4a3..ce572c1 100644 --- a/website/common/header.html +++ b/website/common/header.html @@ -1,3 +1,3 @@ - + diff --git a/website/maloja.css b/website/css/maloja.css similarity index 100% rename from website/maloja.css rename to website/css/maloja.css