HTTP API PlayListNext() problem
#1
Sad 
Hi.

I am trying to use the HTTP API, and I am only partially successful.

This works, and plays the selected file:
Code:
http://10.0.0.64//xbmcCmds/xbmcHttp?command=PlayFile&parameter=smb://musikk/slottet/mp3/Covenant/Northern%20Lights/Covenant_03_Bullet.mp3

This works, it adds the song to the playlist:
Code:
http://10.0.0.64//xbmcCmds/xbmcHttp?command=AddToPlaylist&parameter=smb://musikk/slottet/mp3/Covenant/Northern%20Lights/Covenant_03_Bullet.mp3;0;music;1

This works, it shows the song:
Code:
http://10.0.0.64//xbmcCmds/xbmcHttp?command=GetPlaylistContents&parameter=0

These work, I set the current playlist to 0 (music playlist) and verify it:
Code:
http://10.0.0.64//xbmcCmds/xbmcHttp?command=SetCurrentPlaylist&parameter=0
http://10.0.0.64//xbmcCmds/xbmcHttp?command=GetCurrentPlaylist

No However, neither of these work, the song isn't played:
Code:
http://10.0.0.64//xbmcCmds/xbmcHttp?command=PlayNext
http://10.0.0.64//xbmcCmds/xbmcHttp?command=PlayListNext
If I run a GetCurrentPlaylist after issuing PlayNext or PlayListNext, it returns -1. I've tried doing a SetPlaylistSong(0) first as well, without any luck.

No Also, adding a folder with AddToPlaylist does not work:
Code:
http://10.0.0.64//xbmcCmds/xbmcHttp?command=AddToPlaylist&parameter=smb://musikk/slottet/mp3/Covenant/Northern%20Lights/;0;music;1

Any ideas?
Reply
#2
I can verify the same results, I also get this odd behavior, only thing I find to work is get use the webgui to "select" one of the items already in the playlist, this select command seems to be relevant to the form though, so it can only be used through the form

It would be nice if someone could clear up how to start playing the playlist once you've added items to it via HTTP API commands, because two of us haven't been able to.
Spread the knowledge, nothing else.Image
Reply
#3
Are you running the latest release? It is working fine for me...I'll write what I did to see if maybe I'm misunderstanding you though.

1--I started fresh and went into music and added a bunch of songs to a blank playlist.

2--I sent the command
Code:
http://192.168.15.105/xbmcCmds/xbmcHttp?command=GetCurrentPlaylist
and got the response 0 (which I assume is playlist 0 since I don't have any others saved)

3--I sent the command
Code:
http://192.168.15.105/xbmcCmds/xbmcHttp?command=PlayListNext
and it went to the next song on the list

4--I sent the command
Code:
http://192.168.15.105/xbmcCmds/xbmcHttp?command=PlayListPrev
and it went back to the previous song on the list

5--I sent the command
Code:
http://192.168.15.105/xbmcCmds/xbmcHttp?command=GetCurrentPlaylist
and still got the response 0
Reply
#4
plex Wrote:It would be nice if someone could clear up how to start playing the playlist once you've added items to it via HTTP API commands, because two of us haven't been able to.

Also, just to be clear, I did cue the songs via HTTP API too. If you have been adding songs to the playlist with nothing playing then you want to send the following command to start the playlist from the beginning

Code:
http://192.168.15.105/xbmcCmds/xbmcHttp?command=SetPlaylistSong&parameter=1
Reply
#5
OK, I got this to work:

Code:
http://10.0.0.64//xbmcCmds/xbmcHttp?command=Action(13)  // ACTION_STOP
http://10.0.0.64//xbmcCmds/xbmcHttp?command=ClearPlaylist(0)  // clears the playlist
http://10.0.0.64/xbmcCmds/xbmcHttp?command=AddToPlaylist(smb://mnt/music/Covenant;0;[music];1) // Adds all music in this dir to the playlist 0 (= the music playlist)
http://10.0.0.64//xbmcCmds/xbmcHttp?command=PlayListNext  // starts playing
Reply

Logout Mark Read Team Forum Stats Members Help
HTTP API PlayListNext() problem0