2015-04-08, 12:48
say I put iplayer into favourites and want to access Iplayer
press favourites, locate iplayer, hover over iplayer, press enter.
but what if I could do this
press favourites, press 1 (this could be any key on your remote). THATS IT
this is how to
after you added favourites, you'll need to download the favourites.xml folder (in openelec its in xbmc./storage/.xbmc/userdata)
now create a file and call it
and place this inside the file
now from favourites take out the code that performs the action of opening iplayer
place this code in 1.py (like so)
save file and place inside userdata folder (same place where you got favourites.xml)
Now create a file call it remote.xml (might have to call it keyboard.xml if kodi recognises your remote as keyboard
place this code inside remote.xml (if you named it keyboard.xml, where ever you see remote in the code replace with keyboard
place this inside keymaps (/storage/.xbmc/userdata/keymaps)
you'll need to restart for it to work (only once needed)
now when you press favourites you got iplayer on speed dial number 1.
you could speed dial with any remote button on your remote, so in theory you could almost double the number of remote keys.
you can add more things into favourites and then map them for speed dial.
let me know what you think (P.S. the code was provided by Spoyser, thanks bud)
EDIT I'm still on Gotham so I'm not sure if you have to replace "xbmc" with "kodi" in the python script (for 1.py) also you could just map direcctly the action to a key but the beauty of doing it like this is you don't use up keys rather you have added keys to your remote
EDIT 2 each new button you assign as a speed dial, you'll need to create new python script files, so for example if I speed dialled button 2 I would need a new file for that (2.py) and for button 3 (3.py) etc
press favourites, locate iplayer, hover over iplayer, press enter.
but what if I could do this
press favourites, press 1 (this could be any key on your remote). THATS IT
this is how to
after you added favourites, you'll need to download the favourites.xml folder (in openelec its in xbmc./storage/.xbmc/userdata)
Code:
<favourites>
<favourite name="iPlayer" thumb="/storage/.xbmc/addons/plugin.video.iplayer/icon.png">ActivateWindow(10025,"plugin://plugin.video.iplayer/?content_type=video",return)</favourite>
</favourites>
now create a file and call it
Code:
1.py
Code:
import xbmc
xbmc.executebuiltin("Action(Back)")
cmd = ''
cmd = cmd.replace('&', '&')
cmd = cmd.replace('"', '"')
xbmc.executebuiltin(cmd)
now from favourites take out the code that performs the action of opening iplayer
Code:
ActivateWindow(10025,"plugin://plugin.video.iplayer/?content_type=video",return)
place this code in 1.py (like so)
Code:
import xbmc
xbmc.executebuiltin("Action(Back)")
cmd = 'ActivateWindow(10025,"plugin://plugin.video.iplayer/?content_type=video",return)'
cmd = cmd.replace('&', '&')
cmd = cmd.replace('"', '"')
xbmc.executebuiltin(cmd)
save file and place inside userdata folder (same place where you got favourites.xml)
Now create a file call it remote.xml (might have to call it keyboard.xml if kodi recognises your remote as keyboard
place this code inside remote.xml (if you named it keyboard.xml, where ever you see remote in the code replace with keyboard
Code:
<keymap>
<Favourites>
<remote>
<one>RunScript(/storage/.xbmc/userdata/1.py)</one>
</remote>
</Favourites>
</keymap>
place this inside keymaps (/storage/.xbmc/userdata/keymaps)
you'll need to restart for it to work (only once needed)
now when you press favourites you got iplayer on speed dial number 1.
you could speed dial with any remote button on your remote, so in theory you could almost double the number of remote keys.
you can add more things into favourites and then map them for speed dial.
let me know what you think (P.S. the code was provided by Spoyser, thanks bud)
EDIT I'm still on Gotham so I'm not sure if you have to replace "xbmc" with "kodi" in the python script (for 1.py) also you could just map direcctly the action to a key but the beauty of doing it like this is you don't use up keys rather you have added keys to your remote
EDIT 2 each new button you assign as a speed dial, you'll need to create new python script files, so for example if I speed dialled button 2 I would need a new file for that (2.py) and for button 3 (3.py) etc