2012-03-05, 00:08
Sorry I'ts me once again ;-)
I am looking for a way to retrieve music playlists. Since there seems no way to do this through the api I was trying to get the playlists using Files.GetDirectory from special://musicplaylists like below and the parsing the files myself. Unfortunately the returned filetype is always "directory"
Request
Response
I am looking for a way to retrieve music playlists. Since there seems no way to do this through the api I was trying to get the playlists using Files.GetDirectory from special://musicplaylists like below and the parsing the files myself. Unfortunately the returned filetype is always "directory"
Request
Code:
curl -d "{\"jsonrpc\": \"2.0\", \"method\": \"Files.GetDirectory\", \"params\" : { \"directory\" : \"special://musicplaylists\" }, \"id\" : 1 }" http://192.168.1.40:6666/jsonrpc | python -mjson.tool
Response
Code:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"files": [
{
"file": "special://profile/playlists/music/arabic.xsp",
"filetype": "directory",
"label": "arabic",
"type": "unknown"
},
{
"file": "special://profile/playlists/music/hip-hop.xsp",
"filetype": "directory",
"label": "hip-hop",
"type": "unknown"
},
{
"file": "special://profile/playlists/music/aaa.xsp",
"filetype": "directory",
"label": "pop-rock",
"type": "unknown"
},
{
"file": "special://profile/playlists/music/Queue.m3u",
"filetype": "directory",
"label": "Queue.m3u",
"type": "unknown"
},
{
"file": "special://profile/playlists/music/rhythmbox/",
"filetype": "directory",
"label": "rhythmbox",
"type": "unknown"
},
{
"file": "special://profile/playlists/music/salsa.xsp",
"filetype": "directory",
"label": "salsa",
"type": "unknown"
},
{
"file": "special://profile/playlists/music/test/",
"filetype": "directory",
"label": "test",
"type": "unknown"
}
],
"limits": {
"end": 7,
"start": 0,
"total": 7
}
}
}