mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03: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.
|
||||
|
||||
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).
|
||||
|
@ -78,9 +78,6 @@ NAME = None
|
||||
|
||||
[Misc]
|
||||
|
||||
EXPERIMENTAL_FEATURES = no
|
||||
USE_PYHP = no #not recommended at the moment
|
||||
USE_JINJA = no #overwrites pyhp preference
|
||||
FEDERATION = yes #does nothing yet
|
||||
USE_JINJA = no
|
||||
SKIP_SETUP = no
|
||||
LOGGING = true
|
||||
|
@ -247,12 +247,9 @@ def normalize_name(name):
|
||||
# an api key now ONLY permits scrobbling tracks, no other admin tasks
|
||||
def api_key_correct(request):
|
||||
args = request.query
|
||||
print(dict(args))
|
||||
if "key" in args:
|
||||
apikey = args["key"]
|
||||
print(args)
|
||||
del args["key"]
|
||||
print(args)
|
||||
elif "apikey" in args:
|
||||
apikey = args["apikey"]
|
||||
del args["apikey"]
|
||||
|
@ -261,7 +261,7 @@ def static_html(name):
|
||||
template = jinjaenv.get_template(name + '.jinja')
|
||||
|
||||
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
|
||||
|
||||
|
||||
@ -306,7 +306,7 @@ def static_html(name):
|
||||
|
||||
|
||||
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
|
||||
|
||||
except:
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
<div class="footer">
|
||||
<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>
|
||||
<a href="/"><span style="font-weight:bold;">Maloja</span></a>
|
||||
|
Loading…
Reference in New Issue
Block a user