Play specific playlist item by pressing corresponding numeral key on IR remote
#1
I mainly use XBMC for playing radio streams that are defined in a .pls playlist file.

I don't want to turn on tv or tablet/phone to switch radio streams.

Currently the only supported remote actions are SkipNext and SkipPrevious.

Problem: if playlist entry number 2 is playing and you want to play entry 8 instead, you have to press (and count) the skip button 6 times.

So I would like to be able to play entry number 8 just by pressing button number 8 on the IR remote.

Can this be done?
Reply
#2
PlayMedia(path_to_playlist,playoffset=<1 based index>) if it's in a file.

Playlist.PlayOffset(0 based index) if it's already loaded.
Reply
#3
spiff Wrote:PlayMedia(path_to_playlist,playoffset=<1 based index>) if it's in a file.

Playlist.PlayOffset(0 based index) if it's already loaded.

Thanks Spiff!

My playlist is autoloaded on startup so my XML file should look like this?

<keymap>
<global>

<remote>
<1>Playlist.PlayOffset1</1>
<2>Playlist.PlayOffset2</2>
<3>Playlist.PlayOffset3</3>
<4>Playlist.PlayOffset4</4>
<5>Playlist.PlayOffset5</5>
<6>Playlist.PlayOffset6</6>
<7>Playlist.PlayOffset7</7>
<8>Playlist.PlayOffset8</8>
<9>Playlist.PlayOffset9</9>
</remote>

</global>
</keymap>
Reply
#4
no. the parantheses were litteral.

and there are no 0, 1, etc keys, they are called 'one,'two' etc.

finally, as i said, it's a zero-based offset. that means it starts counting from 0.
Reply
#5
You need "(" and ")" around your offset numbers and they have to start at 0 i.e. 0 is the first entry (as it is in most programming languages). Furthermore IIRC <1>, <2> etc won't work, it needs to be <one>, <two> etc.

So that would result in
Code:
<one>Playlist.PlayOffset(0)</one>
and so on.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#6
Thanks again!

I guess this topic should be moved to XBMC General Help and Support
Reply
#7
I have assigned numeric buttons 0-9 on the IR remote to playlists but I would like to assign more.

Does XBMC support 2-digit input? Would below example work?

<ten>PlayMedia(D:\playlists\music\Radio.m3u,playoffset=10)</ten>
Reply

Logout Mark Read Team Forum Stats Members Help
Play specific playlist item by pressing corresponding numeral key on IR remote0