mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Fixed GET scrobbling
This commit is contained in:
parent
c312608f2d
commit
22172d8b57
@ -5,7 +5,7 @@ author = {
|
||||
"email":"maloja@krateng.dev",
|
||||
"github": "krateng"
|
||||
}
|
||||
version = 2,9,9
|
||||
version = 2,9,10
|
||||
versionstr = ".".join(str(n) for n in version)
|
||||
links = {
|
||||
"pypi":"malojaserver",
|
||||
|
@ -195,9 +195,16 @@ def compare_external(**keys):
|
||||
|
||||
|
||||
@api.get("newscrobble")
|
||||
def get_post_scrobble(*args,**kwargs):
|
||||
def get_post_scrobble(artist:Multi,**keys):
|
||||
"""DEPRECATED. Use the equivalent POST method instead."""
|
||||
return post_scrobble(*args,**kwargs)
|
||||
artists = artist
|
||||
title = keys.get("title")
|
||||
album = keys.get("album")
|
||||
duration = keys.get("seconds")
|
||||
time = keys.get("time")
|
||||
if time is not None: time = int(time)
|
||||
|
||||
return incoming_scrobble(artists,title,album=album,duration=duration,time=time)
|
||||
|
||||
@api.post("newscrobble")
|
||||
@authenticated_api_with_alternate(api_key_correct)
|
||||
|
@ -7,7 +7,7 @@
|
||||
<script src="/rangeselect.js"></script>
|
||||
<script>
|
||||
function scrobble(encodedtrack) {
|
||||
neo.xhttprequest('/api/newscrobble?' + encodedtrack).then(response=>{window.location.reload()});
|
||||
neo.xhttprequest('/apis/mlj_1/newscrobble?' + encodedtrack,method="POST").then(response=>{window.location.reload()});
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user