Kodi Community Forum

Full Version: Harmony One Keymap for ToggleWatched (+ Notification?)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I posted this in the general XBMC forums and realized the Mac's Harmony remote setup is very different, so I'm posting here now instead. I'm trying to make a simple button on my Harmony One mapped to the ToggleWatched command. This can either be via one of the standard buttons (like the + key at the bottom) or via an an additional touch screen button. The problem is, I have absolutely no idea how to make this happen. I've gone through all the Wikis and can't figure out the Harmony One key identifiers (or OBC numbers). Or is this something I can do via the Harmony remote software instead (or both)?

Secondly, I'd love to have this key send both the ToggleWatched command AND a notification saying "This episode has been marked as watched" - is this even possible? That's just an extra thing I'd like to have happen. The main thing is getting ToggleWatched working with a Harmony button. I'd really, really appreciate the help... Thank you so much!
I have the + mapped to watched

Ill post the XML config for you
That's awesome! What are the odds? Thanks in advance!
Not tested.

Create a Python script and put these contents in it

Code:
import xbmc
xbmc.executebuiltin( "ToggleWatched" )
xbmc.executebuiltin( "Notification(Notification,Episode marked as watched)" )

Save it somewhere as script.py

Then in your joystick.Harmony.xml, under your user data/keymaps dir put

Code:
<keymap>
  <MyVideoLibrary>
    <joystick name="Harmony">
      <button id="45">XBMC.RunScript(/path/to/script.py)</escape>
    </joystick>
  </MyVideoLibrary>
</keymap>

If you are happy with being able to mark episode as watched the small Enter key in the bottom right corner by default marks things watched if i remember correctly. Naturally you have to check that this key is programmed to send Enter command in the Plex Player profile.

Button ID 45 = clear/plus sign, 46 = enter, so use 46 if you want to replace the default behaviour.
Thank you both so much! This is awesome!