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