mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
More work on new settings
This commit is contained in:
parent
09e484021c
commit
e597ba8504
@ -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)
|
||||
|
@ -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"
|
||||
|
||||
)
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
||||
|
@ -35,12 +35,12 @@
|
||||
<span style="opacity:0.5;">Database Maintenance</span>
|
||||
{% else %}
|
||||
<a href="/admin_issues">Database Maintenance</a>
|
||||
{% endif %}<!-- |
|
||||
{% endif %} |
|
||||
{% if page=='admin_settings' %}
|
||||
<span style="opacity:0.5;">Settings</span>
|
||||
{% else %}
|
||||
<a href="/admin_settings">Settings</a>
|
||||
{% endif %} -->
|
||||
{% endif %}
|
||||
</span>
|
||||
<br/><br/>
|
||||
<span id="notification"></span>
|
||||
|
@ -54,7 +54,7 @@
|
||||
<span><input id="searchinput" placeholder="Search for an artist or track..." oninput="search(this)" onblur="clearresults()" /></span>
|
||||
</div>
|
||||
|
||||
<span id="resultwrap" class="hide">
|
||||
<div id="resultwrap" class="hide">
|
||||
<div class="searchresults">
|
||||
<span>Artists</span>
|
||||
<table class="searchresults_artists" id="searchresults_artists">
|
||||
@ -64,7 +64,7 @@
|
||||
<table class="searchresults_tracks" id="searchresults_tracks">
|
||||
</table>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="/admin_overview"><div title="Server Administration" id="settingsicon">
|
||||
|
Loading…
Reference in New Issue
Block a user