1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Implemented scrobbling via POST

This commit is contained in:
Krateng
2018-11-30 13:39:12 +01:00
parent 5b0436e256
commit 75a70a10b7
3 changed files with 37 additions and 8 deletions

View File

@@ -211,8 +211,8 @@ function scrobble(artist,title,seconds) {
artiststring = encodeURIComponent(artist)
titlestring = encodeURIComponent(title)
var xhttp = new XMLHttpRequest();
xhttp.open("GET","http://localhost:42010/db/newscrobble?artist=" + artiststring + "&title=" + titlestring + "&duration=" + seconds,true);
xhttp.send()
xhttp.open("POST","http://localhost:42010/db/newscrobble",true);
xhttp.send("artist=" + artiststring + "&title=" + titlestring + "&duration=" + seconds)
}
function setUpdate() {