Restyle Save complete albums to the db for faster startup (#38)

This commit is contained in:
restyled-io[bot]
2022-04-21 10:25:56 +03:00
committed by GitHub
parent d98cc0547e
commit d1c83ef8b6
15 changed files with 82 additions and 76 deletions
+8 -6
View File
@@ -1,16 +1,14 @@
"""
Contains all the artist(s) routes.
"""
from flask import Blueprint
import urllib
from app import instances
from app import cache
from app import helpers
from app import instances
from flask import Blueprint
artist_bp = Blueprint("artist", __name__, url_prefix="/")
from app import cache
@artist_bp.route("/artist/<artist>")
@@ -53,4 +51,8 @@ def get_artist_data(artist: str):
return albums_with_count
return {"artist": artist_obj, "songs": songs, "albums": get_artist_albums()}
return {
"artist": artist_obj,
"songs": songs,
"albums": get_artist_albums()
}