1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-12-27 03:10:26 +00:00

Fixed track adding in database view

This commit is contained in:
jcorporation 2018-06-25 23:48:41 +01:00
parent c178705e12
commit 0a9a089f02

View File

@ -854,14 +854,14 @@ function parseListTitles(obj) {
album.append(titleList);
$('#card'+id+' > img').on({
click: function() {
sendAPI({"cmd":"MPD_API_ADD_TRACK", "data": { "track": decodeURI($(this).attr('uri'))}});
sendAPI({"cmd":"MPD_API_ADD_TRACK", "data": { "uri": decodeURI($(this).attr('uri'))}});
showNotification('"'+decodeURI($(this).attr('data-album'))+'" added','','','success');
}
});
$('#tbl'+id+' > tbody > tr').on({
click: function() {
sendAPI({"cmd":"MPD_API_ADD_TRACK", "data": { "track": decodeURI($(this).attr('uri'))}});
sendAPI({"cmd":"MPD_API_ADD_TRACK", "data": { "uri": decodeURI($(this).attr('uri'))}});
showNotification('"' + $('td:nth-last-child(1)', this).text() + '" added','','','success');
}
});