mirror of
https://github.com/krateng/maloja.git
synced 2025-07-09 03:04:07 -04:00
Fixed scrobbling from track page
This commit is contained in:
parent
83fcb6cf36
commit
771a5ba3aa
@ -32,7 +32,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<p class="stats">
|
<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>
|
<a href="{{ mlj_uri.create_uri("/scrobbles",filterkeys) }}">{{ info['scrobbles'] }} Scrobbles</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -6,8 +6,13 @@
|
|||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="/statselect.js"></script>
|
<script src="/statselect.js"></script>
|
||||||
<script>
|
<script>
|
||||||
function scrobble(encodedtrack) {
|
function scrobbleThisTrack() {
|
||||||
neo.xhttprequest('/apis/mlj_1/newscrobble?nofix&' + encodedtrack,data={},method="POST").then(response=>{window.location.reload()});
|
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>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user