diff --git a/maloja/apis/native_v1.py b/maloja/apis/native_v1.py
index 7cd66f2..2a53876 100644
--- a/maloja/apis/native_v1.py
+++ b/maloja/apis/native_v1.py
@@ -61,7 +61,7 @@ def get_scrobbles_external(**keys):
offset = (k_amount.get('page') * k_amount.get('perpage')) if k_amount.get('perpage') is not math.inf else 0
result = result[offset:]
if k_amount.get('perpage') is not math.inf: result = result[:k_amount.get('perpage')]
-
+
return {"list":result}
@@ -326,3 +326,11 @@ def add_picture(b64,artist:Multi=[],title=None):
def newrule(**keys):
tsv.add_entry(data_dir['rules']("webmade.tsv"),[k for k in keys])
#addEntry("rules/webmade.tsv",[k for k in keys])
+
+
+@api.post("settings")
+@authenticated_api
+def settings(**keys):
+ from .. import globalconf
+ print(keys)
+ globalconf.malojaconfig.update(keys)
diff --git a/maloja/globalconf.py b/maloja/globalconf.py
index 0a85537..8274f7b 100644
--- a/maloja/globalconf.py
+++ b/maloja/globalconf.py
@@ -228,7 +228,7 @@ malojaconfig = Configuration(
"cache_database_short":(tp.Boolean(), "Use volatile Database Cache", True),
"cache_database_perm":(tp.Boolean(), "Use permanent Database Cache", True),
"db_cache_entries":(tp.Integer(), "Maximal Cache entries", 10000),
- "db_max_memory":(tp.Integer(), "RAM Percentage Theshold", 75)
+ "db_max_memory":(tp.Integer(max=100,min=20), "RAM Percentage Theshold", 75)
},
"Fluff":{
"scrobbles_gold":(tp.Integer(), "Scrobbles for Gold", 250),
@@ -250,7 +250,7 @@ malojaconfig = Configuration(
"Database":{
"invalid_artists":(tp.Set(tp.String()), "Invalid Artists", ["[Unknown Artist]","Unknown Artist","Spotify"]),
"remove_from_title":(tp.Set(tp.String()), "Remove from Title", ["(Original Mix)","(Radio Edit)","(Album Version)","(Explicit Version)","(Bonus Track)"]),
- "delimiters_feat":(tp.Set(tp.String()), "Delimiters featuring", ["ft.","ft","feat.","feat","featuring","Ft.","Ft","Feat.","Feat","Featuring"]),
+ "delimiters_feat":(tp.Set(tp.String()), "Featuring Delimiters", ["ft.","ft","feat.","feat","featuring","Ft.","Ft","Feat.","Feat","Featuring"]),
"delimiters_informal":(tp.Set(tp.String()), "Informal Delimiters", ["vs.","vs","&"]),
"delimiters_formal":(tp.Set(tp.String()), "Formal Delimiters", [";","/"])
},
@@ -261,10 +261,12 @@ malojaconfig = Configuration(
"charts_display_tiles":(tp.Boolean(), "Display Chart Tiles", False),
"discourage_cpu_heavy_stats":(tp.Boolean(), "Discourage CPU-heavy stats", False),
"use_local_images":(tp.Boolean(), "Use Local Images", True),
- "local_image_rotate":(tp.Integer(), "Use Local Images", 3600),
+ "local_image_rotate":(tp.Integer(), "Local Image Rotate", 3600),
"timezone":(tp.Integer(), "UTC Offset", 0),
"time_format":(tp.String(), "Time Format", "%d. %b %Y %I:%M %p")
}
- }
+ },
+ configfile=data_dir['settings']("settings.ini"),
+ save_endpoint="/apis/mlj_1/settings"
)
diff --git a/maloja/server.py b/maloja/server.py
index 6559a88..85214d7 100644
--- a/maloja/server.py
+++ b/maloja/server.py
@@ -88,8 +88,10 @@ css = generate_css()
#####
def clean_html(inp):
- if settings.get_settings("DEV_MODE"): return inp
- else: return html_minify(inp)
+ return inp
+
+ #if settings.get_settings("DEV_MODE"): return inp
+ #else: return html_minify(inp)
diff --git a/maloja/web/jinja/abstracts/admin.jinja b/maloja/web/jinja/abstracts/admin.jinja
index 01270ca..2098ea3 100644
--- a/maloja/web/jinja/abstracts/admin.jinja
+++ b/maloja/web/jinja/abstracts/admin.jinja
@@ -35,12 +35,12 @@
Database Maintenance
{% else %}
Database Maintenance
- {% endif %}
+ {% endif %}
diff --git a/maloja/web/jinja/abstracts/base.jinja b/maloja/web/jinja/abstracts/base.jinja
index 255e93e..2ea6362 100644
--- a/maloja/web/jinja/abstracts/base.jinja
+++ b/maloja/web/jinja/abstracts/base.jinja
@@ -54,7 +54,7 @@
-
+