2013-10-08, 11:04
Hi,
I faced this problem for a while but I haven't found out the solution:
I use JSONRPC to retrieve all song of audio library, and then display them on a ListView (an Android View).
Requirement is when click on any item of the listview, XBMC will play the coresponding song.
What I have tried:
- When get all song from AudioLibrary, I sorted them by their songid, then I add them to the audio playlist, using method Playlist.Add
- Every song I get (that have been sorted in the previous step) will be displayed to the screen in a listview.
- If you click on any item (row), I use method Player.Open:
{"jsonrpc":"2.0","id":"playsong","method":"Player.Open","params":{"item":{"playlistid":0,"position"OS}}}
where POS is a variable I pass from the selected song.
I know that the order of the song in the listview is not similar to the order of songs in the playlist.
Can you suggest a solution to solve this?
Thanks.
I faced this problem for a while but I haven't found out the solution:
I use JSONRPC to retrieve all song of audio library, and then display them on a ListView (an Android View).
Requirement is when click on any item of the listview, XBMC will play the coresponding song.
What I have tried:
- When get all song from AudioLibrary, I sorted them by their songid, then I add them to the audio playlist, using method Playlist.Add
- Every song I get (that have been sorted in the previous step) will be displayed to the screen in a listview.
- If you click on any item (row), I use method Player.Open:
{"jsonrpc":"2.0","id":"playsong","method":"Player.Open","params":{"item":{"playlistid":0,"position"OS}}}
where POS is a variable I pass from the selected song.
I know that the order of the song in the listview is not similar to the order of songs in the playlist.
Can you suggest a solution to solve this?
Thanks.