mirror of
https://github.com/krateng/maloja.git
synced 2025-04-21 02:57:36 +03:00
Added .gif support because I like to watch the world burn
This commit is contained in:
parent
2fee52f28c
commit
b8e4158336
5
images/.gitignore
vendored
5
images/.gitignore
vendored
@ -1 +1,6 @@
|
||||
cache
|
||||
*.jpg
|
||||
*.jpeg
|
||||
*.png
|
||||
*.gif
|
||||
!default.jpg
|
||||
|
4
images/artists/.gitignore
vendored
4
images/artists/.gitignore
vendored
@ -1,4 +0,0 @@
|
||||
*.png
|
||||
*.jpg
|
||||
*.jpeg
|
||||
!default.jpg
|
4
images/tracks/.gitignore
vendored
4
images/tracks/.gitignore
vendored
@ -1,4 +0,0 @@
|
||||
*.png
|
||||
*.jpg
|
||||
*.jpeg
|
||||
!default.jpg
|
@ -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")
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user