mirror of
https://github.com/krateng/maloja.git
synced 2025-04-22 19:40:28 +03:00
Fixed scrobbling from track page
This commit is contained in:
parent
83fcb6cf36
commit
771a5ba3aa
maloja/web/jinja
@ -32,7 +32,7 @@
|
||||
{% endif %}
|
||||
|
||||
<p class="stats">
|
||||
{% if adminmode %}<button type="button" onclick="scrobble('{{ encodedtrack }}')">Scrobble now</button>{% endif %}
|
||||
{% if adminmode %}<button type="button" onclick="scrobbleThisTrack()">Scrobble now</button>{% endif %}
|
||||
<a href="{{ mlj_uri.create_uri("/scrobbles",filterkeys) }}">{{ info['scrobbles'] }} Scrobbles</a>
|
||||
</p>
|
||||
|
||||
|
@ -6,8 +6,13 @@
|
||||
{% block scripts %}
|
||||
<script src="/statselect.js"></script>
|
||||
<script>
|
||||
function scrobble(encodedtrack) {
|
||||
neo.xhttprequest('/apis/mlj_1/newscrobble?nofix&' + encodedtrack,data={},method="POST").then(response=>{window.location.reload()});
|
||||
function scrobbleThisTrack() {
|
||||
var payload = {
|
||||
"artists":{{ info.track.artists | tojson }},
|
||||
"title":{{ info.track.title | tojson }},
|
||||
"nofix": true
|
||||
}
|
||||
neo.xhttprequest("/apis/mlj_1/newscrobble",data=payload,method="POST",callback=notifyCallback,json=true).then(response=>{window.location.reload()});
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user