2011-11-30, 09:51
jimk72 Wrote:Might have bug.
If I use
{"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"file":"special://profile/playlists/music/playlist.m3u"}},"id":1}
It loads into the playlistid 1? the playlist contains only 3 songs.
but if I do
{"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"file":"special://profile/playlists/music/playlist.xsp"}},"id":1}
A smart playlist of only songs, It loads it into playlistid 0.
Getplaylists displays:
{"id":3,"jsonrpc":"2.0","result":[{"playlistid":0,"type":"audio"},{"playlistid":1,"type":"video"},{"playlistid":2,"type":"picture"}]}
Active player returns:
{"id":1,"jsonrpc":"2.0","result":[{"playerid":0,"type":"audio"}]}
for both of the above.
There is no way to tell if playlist 1 or playlist 0 is playing? Which you need to know if you want to use playlist.add
It's not really a bug because that's how XBMC works. If it has to create a playlist from multiple files it (by default) creates a video playlist unless there is some specific meta data that can be retrieved that specifies it as a music playlist (which is possible with smart playlists). This logic/implementation is far from perfect and I don't really know why it is done this way but that's how it is.
If you want to know the playlistid of the playlist used by a player you can use Player.GetProperties and retrieve the "playlistid" property.