Restyle Replace nginx with flask server (#50)

This commit is contained in:
restyled-io[bot]
2022-05-04 02:43:29 +03:00
committed by GitHub
parent 43fc33640d
commit 00532d0447
2 changed files with 2 additions and 3 deletions
+2 -2
View File
@@ -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)
-1
View File
@@ -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"]