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

Added .gif support because I like to watch the world burn

This commit is contained in:
Krateng 2019-03-28 19:25:45 +01:00
parent 2fee52f28c
commit b8e4158336
5 changed files with 12 additions and 8 deletions

5
images/.gitignore vendored
View File

@ -1 +1,6 @@
cache
*.jpg
*.jpeg
*.png
*.gif
!default.jpg

View File

@ -1,4 +0,0 @@
*.png
*.jpg
*.jpeg
!default.jpg

View File

@ -1,4 +0,0 @@
*.png
*.jpg
*.jpeg
!default.jpg

View File

@ -93,6 +93,7 @@ def dynamic_image():
@webserver.route("/images/<pth:re:.*\\.jpeg>")
@webserver.route("/images/<pth:re:.*\\.jpg>")
@webserver.route("/images/<pth:re:.*\\.png>")
@webserver.route("/images/<pth:re:.*\\.gif>")
def static_image(pth):
small_pth = pth.split(".")
small_pth.insert(-1,"small")

View File

@ -384,6 +384,9 @@ def getTrackImage(artists,title,fast=False):
elif os.path.exists(filepath + ".jpeg"):
imgurl = "/" + filepath + ".jpeg"
return imgurl
elif os.path.exists(filepath + ".gif"):
imgurl = "/" + filepath + ".gif"
return imgurl
try:
@ -444,6 +447,9 @@ def getArtistImage(artist,fast=False):
elif os.path.exists(filepath + ".jpeg"):
imgurl = "/" + filepath + ".jpeg"
return imgurl
elif os.path.exists(filepath + ".gif"):
imgurl = "/" + filepath + ".gif"
return imgurl
try: