1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Properly separated servers

This commit is contained in:
Krateng
2018-12-19 15:28:10 +01:00
parent 08de19459c
commit dace8f1c44
6 changed files with 80 additions and 45 deletions

View File

@ -123,11 +123,14 @@ def getArtistInfo(artist):
imgurl
except NameError:
imgurl = lastfm_data["artist"]["image"][2]["#text"]
_thread.start_new_thread(cacheImage,(imgurl,"info/artists_cache",filename))
if imgurl == "":
imgurl = "/info/artists/default.jpg"
else:
_thread.start_new_thread(cacheImage,(imgurl,"info/artists_cache",filename))
try:
desc
except NameError:
desc = lastfm_data["artist"]["bio"]["summary"]
desc = lastfm_data["artist"]["bio"]["summary"].split("(1) ")[-1]
with open(filepath_cache + ".txt","w") as descfile:
descfile.write(desc)
# this feels so dirty