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

Consistency of custom track images

This commit is contained in:
Krateng 2019-04-02 11:39:20 +02:00
parent 3cf37aff90
commit bafd2f2d93

View File

@ -399,7 +399,7 @@ track_cache = caching.Cache.create(name="track_cache",maxage=cacheage,maxage_neg
def getTrackImage(artists,title,fast=False):
obj = (frozenset(artists),title)
filename = "-".join([re.sub("[^a-zA-Z0-9]","",artist) for artist in artists]) + "_" + re.sub("[^a-zA-Z0-9]","",title)
filename = "-".join([re.sub("[^a-zA-Z0-9]","",artist) for artist in sorted(artists)]) + "_" + re.sub("[^a-zA-Z0-9]","",title)
if filename == "": filename = str(hash(obj))
filepath = "images/tracks/" + filename