mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 04:23:01 +00:00
Restyle Save complete albums to the db for faster startup (#38)
This commit is contained in:
@@ -3,16 +3,18 @@ This module contains all the Flask Blueprints and API routes. It also contains a
|
||||
that are used through-out the app. It handles the initialization of the watchdog,
|
||||
checking and creating config dirs and starting the re-indexing process using a background thread.
|
||||
"""
|
||||
from typing import List
|
||||
from typing import Set
|
||||
|
||||
from typing import List, Set
|
||||
|
||||
from app import models, instances
|
||||
from app import functions, helpers, prep
|
||||
from app import functions
|
||||
from app import helpers
|
||||
from app import instances
|
||||
from app import models
|
||||
from app import prep
|
||||
from app.lib import albumslib
|
||||
from app.lib import folderslib
|
||||
from app.lib import playlistlib
|
||||
|
||||
|
||||
DB_TRACKS = instances.tracks_instance.get_all_tracks()
|
||||
VALID_FOLDERS: Set[str] = set()
|
||||
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -32,4 +32,4 @@ def get_sample_track():
|
||||
"""
|
||||
|
||||
return instances.tracks_instance.get_song_by_album("Legends Never Die",
|
||||
"Juice WRLD")
|
||||
"Juice WRLD")
|
||||
|
||||
Reference in New Issue
Block a user