Code:
{"id" : 5,
"jsonrpc" : "2.0",
"result" : {
"end" : 3,
"items" : [
{
"fanart" : "special://masterprofile/Thumbnails/Video/Fanart/7735abc0.tbn",
"file" : "D:/someMusic/someAlbum/someFile.flac",
"label" : ""
},{
"fanart" : "special://masterprofile/Thumbnails/Video/Fanart/7735abc0.tbn",
"file" : "D:/someMusic/someAlbum/someFile.flac",
"label" : "someFile.flac"
},{
"fanart" : "special://masterprofile/Thumbnails/Video/Fanart/7735abc0.tbn",
"file" : "D:/someMusic/someAlbum/somefile.flac",
"label" : "D:/someMusic/someAlbum/someFile.flac"
}
],
"start" : 0,
"total" : 3
}
}
What you see is the reply of JSONRPC command:
Code:
{"jsonrpc":"2.0", "method":"AudioPlaylist.GetItems", "id":5}
All three items should be equal as they point to the same file - just added by different commands.
As you can see, they are not. Comparing each other, I get quite different "label" parts.
First item is result of the JSONRPC command:
Code:
{"jsonrpc":"2.0", "method":"AudioPlaylist.Add", "params": {"file": "D:/someMusic/someAlbum/someFile.flac"}, "id":1}
Second item is result of the xHTTP command:
Code:
command=AddToPlayList(D:/someMusic/someAlbum/;0;[Music];1)
where directory D:/someMusic/someAlbum/ contains the file of interest.
Third item is result of the xHTTP command:
Code:
command=AddToPlayList(D:/someMusic/someAlbum/someFile.flac;0;[Music];1)
BMHO the only correct version is the
second one.
Further, command:
Code:
{"jsonrpc":"2.0", "method":"AudioPlaylist.Add", "params": {"file": "D:/someMusic/someAlbum/"}, "id":1}
Does not add contents of directory (as expected), just directory itself:
Code:
{"id" : 5,
"jsonrpc" : "2.0",
"result" : {
"end" : 1,
"items" : [
{
"fanart" : "special://masterprofile/Thumbnails/Video/Fanart/477af51b.tbn",
"file" : "D:/someMusic/someAlbum/",
"label" : ""
}
],
"start" : 0,
"total" : 1
}
}
Any suggestions?