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

Merge pull request #202 from christophernewton/master

Fixed search response failure for manual scrobbling
This commit is contained in:
krateng 2023-03-07 16:54:51 +01:00 committed by GitHub
commit 37210995fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,14 +126,14 @@ function searchresult_manualscrobbling() {
console.log(tracks); console.log(tracks);
for (let t of tracks) { for (let t of tracks) {
track = document.createElement("span"); track = document.createElement("span");
trackstr = t["artists"].join(", ") + " - " + t["title"]; trackstr = t.track["artists"].join(", ") + " - " + t.track["title"];
tracklink = t["link"]; tracklink = t["link"];
track.innerHTML = "<a href='" + tracklink + "'>" + trackstr + "</a>"; track.innerHTML = "<a href='" + tracklink + "'>" + trackstr + "</a>";
row = document.createElement("tr") row = document.createElement("tr")
col1 = document.createElement("td") col1 = document.createElement("td")
button = document.createElement("button") button = document.createElement("button")
button.innerHTML = "Scrobble!" button.innerHTML = "Scrobble!"
button.onclick = function(){ scrobble(t["artists"],t["title"])}; button.onclick = function(){ scrobble(t.track["artists"],t.track["title"])};
col2 = document.createElement("td") col2 = document.createElement("td")
row.appendChild(col1) row.appendChild(col1)
col1.appendChild(button) col1.appendChild(button)