Set position in current playlist
#1
hi! i want to start playing from the 5th (example) item in a playlist. i don’t understand how to set this position. i’ve looked at http://www.xbmcscripts.com/downloads/doc...l#playlist , searched this forum and the web. i read something about player.playselected() but i can’t get it to work and there were no example code. any help would be mush appreciated, thanks!
Reply
#2
it should be as simple as this

import xbmc

xbmc.player().playselected(5);


i just tried it, it seems to be broken to me. anyone else got it working? (if not, perhaps we found a bug to report in)

anyway, you can also use httpapi to set playlist position:
xbmc.executehttpapi('setplaylistsong(8)')

if you like to se other commands in httpapi: write this in your browser:
http://yourxboxip/xbmccmds/xbmchttp?command=help



Reply
#3
when executing your example the first item of the playlist is started, not the 5th!? there is no errors (white button). any ideas?
Reply
#4
did you use the httpapi as i said?
Reply
#5
just tested xbmc.executehttpapi('setplaylistsong(8)') and it works fine! the 9th item is played (but this may be correct). thanks for your help Smile !

it was the first code that didn’t work. what do we do about the possible playselected() bug?
Reply
#6
i posted a forum message about the bug, but one should perhaps post it to sourceforge later.

yes, it seems the position 0 is the first song.

:d



Reply
#7
hi, i have been trying to get this to work for a while with no success, i have tried both ways. it also seems that if you load a playlist and jump to a specific track, xbmc wont play the next track in the playlist when it finishes the one that it is on....

i am currently writing a script for my car that will save the playlist, playlist position and time into the track every 10 seconds. when you restart the xbox, i want it to continue from where it left off. it mostly works except that when you reboot the xbox the playlist starts again from the beginning, even though it reloads the playlist like it should. any help on this would be great.
Reply
#8
edit: deleted, information worked, but was not correct.



For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#9
bananajim, the python command got fixed by jmarshall.
i can confirm that it's working.

Quote:31-05-2006 fixed: [ 1496367 ] playselected pos in playlist.
Reply

Logout Mark Read Team Forum Stats Members Help
Set position in current playlist0