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

Fixed search response failure for manual scrobbling

This commit is contained in:
Chris Newton 2023-03-07 11:04:53 +11:00
parent 93bbaac0e3
commit 94ae453133

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)