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:
mungai-njoroge
2023-08-24 15:52:09 +03:00
parent e3a61c109b
commit 71cab5f5ea
22 changed files with 437 additions and 163 deletions
+3 -2
View File
@@ -1,13 +1,14 @@
import re
from app.enums.album_versions import AlbumVersionEnum
from app.settings import get_flag, ParserFlags
def split_artists(src: str, custom_seps: set[str] = {}):
def split_artists(src: str):
"""
Splits a string of artists into a list of artists.
"""
separators = {",", ";", "/"}.union(custom_seps)
separators = get_flag(ParserFlags.ARTIST_SEPARATORS)
for sep in separators:
src = src.replace(sep, "߸")