mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
add json config and its manager class
+ rewrite logic to prevent removing last admin role + handle showing users on login and enabling guest
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
Prepares the server for use.
|
||||
"""
|
||||
|
||||
from dataclasses import asdict
|
||||
from app.db.sqlite.settings import load_settings
|
||||
from app.setup.files import create_config_dir
|
||||
from app.setup.sqlite import run_migrations, setup_sqlite
|
||||
@@ -9,6 +10,7 @@ from app.store.albums import AlbumStore
|
||||
from app.store.artists import ArtistStore
|
||||
from app.store.tracks import TrackStore
|
||||
from app.utils.generators import get_random_str
|
||||
from app.config import UserConfig
|
||||
|
||||
|
||||
def run_setup():
|
||||
@@ -22,6 +24,10 @@ def run_setup():
|
||||
# settings table is empty
|
||||
pass
|
||||
|
||||
# setup config file
|
||||
config = UserConfig()
|
||||
config.setup_config_file()
|
||||
|
||||
instance_key = get_random_str()
|
||||
|
||||
# INFO: Load all tracks, albums, and artists into memory
|
||||
|
||||
Reference in New Issue
Block a user