mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
misc refactors and docstrings addition
This commit is contained in:
@@ -1,15 +1,24 @@
|
||||
from typing import List
|
||||
"""
|
||||
This module contains all the Flask Blueprints and API routes. It also contains all the globals list
|
||||
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, Set
|
||||
|
||||
from app import models, instances
|
||||
from app import functions, helpers, prep
|
||||
from app.lib import albumslib
|
||||
from app.lib import folderslib
|
||||
|
||||
|
||||
DB_TRACKS = instances.songs_instance.get_all_songs()
|
||||
VALID_FOLDERS: Set[str] = set()
|
||||
|
||||
ALBUMS: List[models.Album] = []
|
||||
TRACKS: List[models.Track] = []
|
||||
PLAYLISTS: List[models.Playlist] = []
|
||||
|
||||
FOLDERS: List[models.Folder] = []
|
||||
|
||||
@helpers.background
|
||||
def initialize() -> None:
|
||||
@@ -17,9 +26,11 @@ def initialize() -> None:
|
||||
Runs all the necessary setup functions.
|
||||
"""
|
||||
functions.start_watchdog()
|
||||
albumslib.create_everything()
|
||||
prep.create_config_dir()
|
||||
albumslib.create_everything()
|
||||
folderslib.run_scandir()
|
||||
functions.reindex_tracks()
|
||||
|
||||
|
||||
initialize()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user