Kodi Community Forum
Play specific playlist item by pressing corresponding numeral key on IR remote - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
---- Thread: Play specific playlist item by pressing corresponding numeral key on IR remote (/showthread.php?tid=121751)



Play specific playlist item by pressing corresponding numeral key on IR remote - AussieFries - 2012-02-02

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?


- spiff - 2012-02-02

PlayMedia(path_to_playlist,playoffset=<1 based index>) if it's in a file.

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


- AussieFries - 2012-02-02

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>


- spiff - 2012-02-02

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.


- Montellese - 2012-02-02

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.


- AussieFries - 2012-02-02

Thanks again!

I guess this topic should be moved to XBMC General Help and Support


RE: Play specific playlist item by pressing corresponding numeral key on IR remote - AussieFries - 2012-05-15

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>


This forum uses Lukasz Tkacz MyBB addons.