1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-10-26 03:17:40 +00:00

First code for new jsonrpc api

This commit is contained in:
jcorporation
2018-06-14 23:57:57 +01:00
parent 96a7b8a5c9
commit 3df104e72d
4 changed files with 68 additions and 1 deletions

View File

@@ -856,7 +856,8 @@ function parseListDBtags(obj) {
' </div>'+
'</div></div>';
$('#BrowseDatabaseAlbumCards').append(card);
$.ajax({url: "/api", mimeType: "text/plain", contentType:"text/plain", method: "POST", data: "MPD_API_GET_ARTISTALBUMTITLES," + obj.searchstr + ","+obj.data[item].value}).done(function( data ) {
$.ajax({url: "/jsonrpc", contentType:"application/json", method: "POST",
data: JSON.stringify({"cmd":"MPD_API_GET_ARTISTALBUMTITLES", "data": { "albumartist": obj.searchstr, "album": obj.data[item].value}})}).done(function( data ) {
var obj = JSON.parse(data);
parseListTitles(obj);
});