From 00532d04477db293983b156a6bdd521d90c23606 Mon Sep 17 00:00:00 2001 From: "restyled-io[bot]" <32688539+restyled-io[bot]@users.noreply.github.com> Date: Wed, 4 May 2022 02:43:29 +0300 Subject: [PATCH] Restyle Replace nginx with flask server (#50) --- server/app/imgserver/__init__.py | 4 ++-- server/app/lib/albumslib.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/app/imgserver/__init__.py b/server/app/imgserver/__init__.py index 333c100e..96999d00 100644 --- a/server/app/imgserver/__init__.py +++ b/server/app/imgserver/__init__.py @@ -47,7 +47,7 @@ def send_artist_image(imgpath: str): return {"msg": "Not found"}, 404 -@app.route('/p/') +@app.route("/p/") 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) diff --git a/server/app/lib/albumslib.py b/server/app/lib/albumslib.py index 0dcd0db9..3c673486 100644 --- a/server/app/lib/albumslib.py +++ b/server/app/lib/albumslib.py @@ -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"]