2006-01-28, 10:08
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?
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?