mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
load settings from db, use api to change settings
+ add route to get all settings + add route to set any setting + add untested migration to add settings into settings db + compress json in api responses using FlaskCompress + serve gziped assets if browser accepts encoded files + misc
This commit is contained in:
@@ -8,7 +8,7 @@ import time
|
||||
from typing import Optional
|
||||
|
||||
from app.models import Album, Playlist, Track
|
||||
from app.settings import Db
|
||||
from app import settings
|
||||
|
||||
|
||||
def tuple_to_track(track: tuple):
|
||||
@@ -88,10 +88,10 @@ class SQLiteManager:
|
||||
if self.test_db_path:
|
||||
db_path = self.test_db_path
|
||||
else:
|
||||
db_path = Db.get_app_db_path()
|
||||
db_path = settings.Db.get_app_db_path()
|
||||
|
||||
if self.userdata_db:
|
||||
db_path = Db.get_userdata_db_path()
|
||||
db_path = settings.Db.get_userdata_db_path()
|
||||
|
||||
self.conn = sqlite3.connect(
|
||||
db_path,
|
||||
|
||||
Reference in New Issue
Block a user