SetPlaylistSong?
#1
hi,

i've coded a telnet interface to xbmc which lets me request mp3s
and control playback through a commandline interface. i've just
added a feature that lists the current playlist content and marks the
currently playing file:

request: all dead or alive 1984
playing all tracks matching ['dead', 'or', 'alive', '1984']:

1. dead_or_alive-you_spin_me_round-au-cds-1984/01-you_spin_me_round.mp3
2. dead_or_alive-you_spin_me_round-au-cds-1984/02-you_spin_me_round_(performance_mix).mp3
3. dead_or_alive-you_spin_me_round-au-cds-1984/03-please_save_me_(push_mix).mp3

request: n
currently playing dead_or_alive-you_spin_me_round-au-cds-1984/02-you_spin_me_round_(performance_mix).mp3

request: pl
playlist:

1. dead_or_alive-you_spin_me_round-au-cds-1984/01-you_spin_me_round.mp3
*** 2. dead_or_alive-you_spin_me_round-au-cds-1984/02-you_spin_me_round_(performance_mix).mp3
3. dead_or_alive-you_spin_me_round-au-cds-1984/03-please_save_me_(push_mix).mp3

request:

now i want to add a function that lets me type the playlist
index number, move to that position in the playlist and start
playing the track. after some searching it appears there is no
python method that can do this (only methods to go to the
previous/next songs in the playlist), but there's a httpapi
function called setplaylistsong that should do this. i've tried:

xbmc.executehttpapi('xbmc.setplaylistsong('+request+')')

where request is a number matching one of the items on the
playlist. i get the following in the log:

28-01-2006 08:04:10 debug httpapi start command: xbmc.setplaylistsong paras: xbmc.setplaylistsong; 1

try again,

28-01-2006 08:06:36 debug httpapi start command: xbmc.setplaylistsong paras: xbmc.setplaylistsong; 2

but nothing happens, it just keeps playing the current song.

any ideas?? am i calling the method incorrectly or is there
another (ideally python) method that could do this?
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
Reply
#2
does it work from your pc from a web browser
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
Reply

Logout Mark Read Team Forum Stats Members Help
SetPlaylistSong?0