Hi.
Thanks to all the support I received here, I was able to get an old Jolly Click 1:1 IR remote control connected to my Raspberry (3b).
Since it has more than 40 buttons there is plenty of room for making certain buttons do useful stuff for me.
This is what I implemented:
1. Channel down plays the next video in the current directory
2. Channel up plays the previous video
3. One button will now toggle the "watched status" of the currently selected video
1 & 2 I find quite helpful when binge-watching a series
3 is for "quickly" setting videos to "watched". I regularly delete watched videos with a script. So this help me mark those videos without actually having watched them til the end, which sometimes happens with YT videos.
/storage/.kodi/userdata/scripts/skiponeback.py
import xbmc
xbmc.executebuiltin('Action(Stop)')
xbmc.executebuiltin('Action(UP)')
xbmc.executebuiltin('Action(Play)')
/storage/.kodi/userdata/scripts/skiptonext.py
import xbmc
xbmc.executebuiltin('Action(Stop)')
xbmc.executebuiltin('Action(Down)')
xbmc.executebuiltin('Action(Play)')
/storage/.kodi/userdata/scripts/togglewatched.py
import xbmc
xbmc.executebuiltin('Notification(Toggle Watched Status,Pleas wait…,5000)')
xbmc.executebuiltin('Action(ToggleWatched)')
The notification is for me to see, that the button was registered. Sometimes it takes some time for the system to actually get the status changed.
/storage/.kodi/userdata/keymaps/keymap.xml
<keymap>
<global>
<remote>
<guide>ToggleDebug</guide>
</remote>
</global>
<videos>
<remote>
<blue>runScript(/storage/.kodi/userdata/scripts/togglewatched.py)</blue>
</remote>
</videos>
<fullscreenvideo>
<remote>
<pageplus>runScript(/storage/.kodi/userdata/scripts/skiponeback.py)</pageplus>
<pageminus>runScript(/storage/.kodi/userdata/scripts/skiptonext.py)</pageminus>
</remote>
</fullscreenvideo>
</keymap>
Display More