mirror of
https://github.com/krateng/maloja.git
synced 2025-08-07 09:01:26 -04:00
Some cleanup
This commit is contained in:
parent
379ee49f1c
commit
3a4769cfb2
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
Simple self-hosted music scrobble database to create personal listening statistics. No recommendations, no social network, no nonsense.
|
Simple self-hosted music scrobble database to create personal listening statistics. No recommendations, no social network, no nonsense.
|
||||||
|
|
||||||
You can check [my own Maloja page](https://maloja.krateng.ch) to see what it looks like.
|
You can check [my own Maloja page](https://maloja.krateng.ch) to see what it looks like (it's down fairly often because I use it as staging environment, that doesn't reflect the stability of the Maloja software!).
|
||||||
|
|
||||||
|
|
||||||
> **IMPORTANT**: With the update 2.0, Maloja has been refactored into a Python package and the old update script no longer works. If you're still on version 1, see [below](#update).
|
> **IMPORTANT**: With the update 2.0, Maloja has been refactored into a Python package and the old update script no longer works. If you're still on version 1, see [below](#update).
|
||||||
|
@ -78,9 +78,6 @@ NAME = None
|
|||||||
|
|
||||||
[Misc]
|
[Misc]
|
||||||
|
|
||||||
EXPERIMENTAL_FEATURES = no
|
USE_JINJA = no
|
||||||
USE_PYHP = no #not recommended at the moment
|
|
||||||
USE_JINJA = no #overwrites pyhp preference
|
|
||||||
FEDERATION = yes #does nothing yet
|
|
||||||
SKIP_SETUP = no
|
SKIP_SETUP = no
|
||||||
LOGGING = true
|
LOGGING = true
|
||||||
|
@ -247,12 +247,9 @@ def normalize_name(name):
|
|||||||
# an api key now ONLY permits scrobbling tracks, no other admin tasks
|
# an api key now ONLY permits scrobbling tracks, no other admin tasks
|
||||||
def api_key_correct(request):
|
def api_key_correct(request):
|
||||||
args = request.query
|
args = request.query
|
||||||
print(dict(args))
|
|
||||||
if "key" in args:
|
if "key" in args:
|
||||||
apikey = args["key"]
|
apikey = args["key"]
|
||||||
print(args)
|
|
||||||
del args["key"]
|
del args["key"]
|
||||||
print(args)
|
|
||||||
elif "apikey" in args:
|
elif "apikey" in args:
|
||||||
apikey = args["apikey"]
|
apikey = args["apikey"]
|
||||||
del args["apikey"]
|
del args["apikey"]
|
||||||
|
@ -261,7 +261,7 @@ def static_html(name):
|
|||||||
template = jinjaenv.get_template(name + '.jinja')
|
template = jinjaenv.get_template(name + '.jinja')
|
||||||
|
|
||||||
res = template.render(**LOCAL_CONTEXT)
|
res = template.render(**LOCAL_CONTEXT)
|
||||||
log("Generated page {name} in {time:.5f}s (Jinja)".format(name=name,time=clock.stop()),module="debug")
|
log("Generated page {name} in {time:.5f}s (Jinja)".format(name=name,time=clock.stop()),module="debug_performance")
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
@ -306,7 +306,7 @@ def static_html(name):
|
|||||||
|
|
||||||
|
|
||||||
response.set_header("Link",",".join(linkheaders))
|
response.set_header("Link",",".join(linkheaders))
|
||||||
log("Generated page {name} in {time:.5f}s (Python+HTML)".format(name=name,time=clock.stop()),module="debug")
|
log("Generated page {name} in {time:.5f}s (Python+HTML)".format(name=name,time=clock.stop()),module="debug_performance")
|
||||||
return html
|
return html
|
||||||
|
|
||||||
except:
|
except:
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div>
|
<div>
|
||||||
<span>Get your own Maloja scrobble server on <a target="_blank" rel="noopener noreferrer" href="https://github.com/krateng/maloja">GitHub</a></span>
|
<span>Get your own Maloja scrobble server on <a target="_blank" rel="noopener noreferrer" href="https://pypi.org/project/malojaserver/">PyPI</a></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a href="/"><span style="font-weight:bold;">Maloja</span></a>
|
<a href="/"><span style="font-weight:bold;">Maloja</span></a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user