mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 13:03:02 +00:00
Restyle Replace nginx with flask server (#50)
This commit is contained in:
@@ -47,7 +47,7 @@ def send_artist_image(imgpath: str):
|
|||||||
return {"msg": "Not found"}, 404
|
return {"msg": "Not found"}, 404
|
||||||
|
|
||||||
|
|
||||||
@app.route('/p/<imgpath>')
|
@app.route("/p/<imgpath>")
|
||||||
def send_playlist_image(imgpath: str):
|
def send_playlist_image(imgpath: str):
|
||||||
fpath = join(PLAYLIST_PATH, imgpath)
|
fpath = join(PLAYLIST_PATH, imgpath)
|
||||||
exists = path.exists(fpath)
|
exists = path.exists(fpath)
|
||||||
@@ -57,9 +57,9 @@ def send_playlist_image(imgpath: str):
|
|||||||
|
|
||||||
return {"msg": "Not found"}, 404
|
return {"msg": "Not found"}, 404
|
||||||
|
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
# Return Fallback images instead of JSON
|
# Return Fallback images instead of JSON
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run(threaded=True, port=9877)
|
app.run(threaded=True, port=9877)
|
||||||
|
|||||||
@@ -148,7 +148,6 @@ def create_album(track) -> models.Album:
|
|||||||
"artist": track["albumartist"],
|
"artist": track["albumartist"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
album_tracks = get_album_tracks(album["album"], album["artist"])
|
album_tracks = get_album_tracks(album["album"], album["artist"])
|
||||||
|
|
||||||
album["date"] = album_tracks[0]["date"]
|
album["date"] = album_tracks[0]["date"]
|
||||||
|
|||||||
Reference in New Issue
Block a user