Questions and comments specific to a particular plugin should go here.
-
jachin99
- Experienced User
- Posts: 651
- Joined: Sat Feb 13, 2016 8:39 pm
Post
by jachin99 » Sat Apr 25, 2020 9:42 pm
I'm not sure I understand either. I found the update actions button in the plugin settings and clicked it. I restarted eventghost but I didn't get any manually added actions category. Then I opened the init_py file, and added this code at I think line 240. Is there something else I need to add?
Code: Select all
("ChapterorBigStepBack", "ChapterorBigStepBack", "Backwards Chapter Navigation", "chapterorbigstepback"),
I tried updating actions, and restarting Evenghost again but I'm still not seeing chapterorbigstepback under the fullscreen video actions, or any manually added actions.
-
jonib
- Plugin Developer
- Posts: 1344
- Joined: Thu Mar 26, 2009 9:33 pm
- Location: Sweden
Post
by jonib » Sun Apr 26, 2020 12:59 am
jachin99 wrote: ↑Sat Apr 25, 2020 9:42 pm
I'm not sure I understand either. I found the update actions button in the plugin settings and clicked it. I restarted eventghost but I didn't get any manually added actions category.
And you didn't get any error in the log?
Edit: Do you have a
C:\Users\(username)\AppData\Roaming\EventGhost\plugins\XBMC2\actions.dat file, it should be created when updating the actions.
Edit2: If you didn't get the actions.dat file, I have attached my file to put in there.
jonib
-
Attachments
-
- actions.dat.zip
- Unpack this to C:\Users\(username)\AppData\Roaming\EventGhost\plugins\XBMC2
- (1.34 KiB) Downloaded 48 times
-
jachin99
- Experienced User
- Posts: 651
- Joined: Sat Feb 13, 2016 8:39 pm
Post
by jachin99 » Sun Apr 26, 2020 2:33 am
I got an error in the log when there are chapter markers I believe. I unblocked and added your actions.dat file to my appdata folder but I'm still not getting the manually added category shown in your screenshot. I'm not sure what the issue is, and the only thing I can think of that might be different is that I added the ZWave plugin, which I think modifies some of eventghost's core files but I'm not sure if that would break something like this.
Edit: As a workaround for now I use NextScene, and PreviousScene, which appears to work fine for this particular script but I would still like to find out why my actions aren't updating.
-
jonib
- Plugin Developer
- Posts: 1344
- Joined: Thu Mar 26, 2009 9:33 pm
- Location: Sweden
Post
by jonib » Sun Apr 26, 2020 5:54 am
jachin99 wrote: ↑Sun Apr 26, 2020 2:33 am
I got an error in the log when there are chapter markers I believe. I unblocked and added your actions.dat file to my appdata folder but I'm still not getting the manually added category shown in your screenshot.
Hopefully my workaround in this post works as I really don't want to debug this, as I'm rebuilding the plugin anyway.
I'm not sure what the issue is, and the only thing I can think of that might be different is that I added the ZWave plugin, which I think modifies some of eventghost's core files but I'm not sure if that would break something like this.
I'm not familiar with this but I don't think that is the problem, but I don't know for sure.
Edit: As a workaround for now I use NextScene, and PreviousScene, which appears to work fine for this particular script but I would still like to find out why my actions aren't updating.
Try this command instead it uses JSON-RPC to send the "chapterorbigstepback" action.
Code: Select all
eg.plugins.XBMC2.JSONRPC(u'Input.ExecuteAction', u'["chapterorbigstepback"]')
jonib
-
jachin99
- Experienced User
- Posts: 651
- Joined: Sat Feb 13, 2016 8:39 pm
Post
by jachin99 » Mon Apr 27, 2020 6:13 pm
Thanks Jonib!! I'll use that format to send any commands that aren't in the plugin from here on out.
-
jachin99
- Experienced User
- Posts: 651
- Joined: Sat Feb 13, 2016 8:39 pm
Post
by jachin99 » Sun May 17, 2020 1:20 am
Jonib, I'm getting an error on line two from this script when I check to see if video or live TV is the topmost window.
Code: Select all
result = eg.plugins.XBMC2.JSONRPC(u'XBMC.GetInfoBooleans', u'[["VideoPlayer.IsFullScreen"]]', u'[["Window.IsTopMost(FullScreenVideo)"]]', True)
if result["VideoPlayer.IsFullScreen"] and result["Window.IsTopMost(FullScreenVideo)"]:
eg.plugins.XBMC2.SmallStepBack()
print("ITWORKS")
#DialogSeekBar.xml
#DialogFullScreenInfo
#Check this condition also Window.IsTopMost(FullScreenLiveTV)
#Check this condition also Window.IsActive(FullScreenLiveTV)
#Check this condition also Window.IsVisible(FullScreenLiveTV)
#Check this condition also Window.IsTopMost(FullScreenVideo)
#Check Window.Is(name) useful to check if a shared xml or dialogue is in use
else:
eg.plugins.XBMC2.Back()
print("Nope")
I don't see anything obvious to me that might be missing or wrong though its still giving me this error
Code: Select all
21:17:57 Traceback (most recent call last):
21:17:57 Python script "76", line 2, in <module>
21:17:57 if result["VideoPlayer.IsFullScreen"] and result["Window.IsTopMost(FullScreenVideo)"]:
21:17:57 KeyError: 'Window.IsTopMost(FullScreenVideo)'
-
jonib
- Plugin Developer
- Posts: 1344
- Joined: Thu Mar 26, 2009 9:33 pm
- Location: Sweden
Post
by jonib » Sun May 17, 2020 1:43 am
jachin99 wrote: ↑Sun May 17, 2020 1:20 am
Jonib, I'm getting an error on line two from this script when I check to see if video or live TV is the topmost window.
You might need to use "Window.IsTopMost" in the if test,
print the result to see what it should be. I'll try it later if you can't figure it out.
edit: Useless code deleted
jonib
-
jonib
- Plugin Developer
- Posts: 1344
- Joined: Thu Mar 26, 2009 9:33 pm
- Location: Sweden
Post
by jonib » Wed May 20, 2020 1:21 am
jachin99 wrote: ↑Sun May 17, 2020 1:20 am
Jonib, I'm getting an error on line two from this script when I check to see if video or live TV is the topmost window.
This code seems to work, my first idea was totally wrong.

The parameters to XBMC.GetInfoBooleans need to be in the same list not separate like your code.
Code: Select all
result = eg.plugins.XBMC2.JSONRPC(u'XBMC.GetInfoBooleans', u'[["VideoPlayer.IsFullScreen", "Window.IsTopMost(fullscreenvideo)"]]', True)
if result["VideoPlayer.IsFullScreen"] and result["Window.IsTopMost(fullscreenvideo)"]:
eg.plugins.XBMC2.SmallStepBack()
print("ITWORKS")
#DialogSeekBar.xml
#DialogFullScreenInfo
#Check this condition also Window.IsTopMost(FullScreenLiveTV)
#Check this condition also Window.IsActive(FullScreenLiveTV)
#Check this condition also Window.IsVisible(FullScreenLiveTV)
#Check this condition also Window.IsTopMost(FullScreenVideo)
#Check Window.Is(name) useful to check if a shared xml or dialogue is in use
else:
eg.plugins.XBMC2.Back()
print("Nope")
jonib
-
jachin99
- Experienced User
- Posts: 651
- Joined: Sat Feb 13, 2016 8:39 pm
Post
by jachin99 » Fri May 22, 2020 3:20 am
Jonib, I think I have botched this all up, and I once again need to rethink things. Using the back button on my remote is probably not the most wise choice I can make as I need to check to see if countless OSDs are present before I my script issues a back command. It never seems to work correctly regardless of what I check for, and I think I would be better to use different key in a new way. Instead I would like to use the previous chapter or rewind key because my users already know the button is used to navigate backwards, and it those keys are still easy to reach on my remote.
I think I would like the previous chapter button(Or if that doesn't work out, the rewind button) to jump back 7 seconds if pressed once. If pressed twice I would like the the button to perform its normal function. I'm thinking the rewind button would be good for this because I already script the functionality of the previous chapter button and I like to keep things simple. So i want my script to command kodi to jump back seven seconds if the rewind button is pressed once, and I want kodi to just normally rewind if the button is pressed twice within .75 seconds. I tried setting this up via the EG plugin jump if double event but that doesn't ship with an else statement. I looked in the EG plugins to see if I could construct the script on my own but there is a little too much there for me to digest. Do you think we could script that? I hope I'm making some sense here.
-
jonib
- Plugin Developer
- Posts: 1344
- Joined: Thu Mar 26, 2009 9:33 pm
- Location: Sweden
Post
by jonib » Fri May 22, 2020 3:45 am
jachin99 wrote: ↑Fri May 22, 2020 3:20 am
So i want my script to command kodi to jump back seven seconds if the rewind button is pressed once, and I want kodi to just normally rewind if the button is pressed twice within .75 seconds.
This should definitely be possible.
I tried setting this up via the EG plugin jump if double event but that doesn't ship with an else statement.
I have not used this so don't know if it is suitable.
This seems like a more generic EventGhost "problem" might be good to ask in the
general forum. If I needed to solve this for me I would program my remote to send different codes for single and double press.
If I have time tomorrow I'll see if I can get any good ideas, seems like it should be simple.
jonib
-
jachin99
- Experienced User
- Posts: 651
- Joined: Sat Feb 13, 2016 8:39 pm
Post
by jachin99 » Wed Jun 03, 2020 2:50 am
Jonib, with some help from KG, I got the double press thing figured out. This might be everything I need to get my remote working the way I would like. For anyone who reads this I essentially had to break a few keys in Kodi's keymap.xml files, and map them via EG. I learned that Kodi will search ALL XML files in the program files folder I believe as well as the userdata folder to look for the binding for a particular key. It will use the keybinding in the last XML file it finds so I had to dig through ALL of those XML files, and comment out the keys I wanted to use in EG.
-
jonib
- Plugin Developer
- Posts: 1344
- Joined: Thu Mar 26, 2009 9:33 pm
- Location: Sweden
Post
by jonib » Thu Jun 04, 2020 2:26 pm
jachin99 wrote: ↑Wed Jun 03, 2020 2:50 am
Jonib, with some help from KG, I got the double press thing figured out. This might be everything I need to get my remote working the way I would like. For anyone who reads this I essentially had to break a few keys in Kodi's keymap.xml files, and map them via EG. I learned that Kodi will search ALL XML files in the program files folder I believe as well as the userdata folder to look for the binding for a particular key. It will use the keybinding in the last XML file it finds so I had to dig through ALL of those XML files, and comment out the keys I wanted to use in EG.
Thanks for letting me know. Kodi keymap.xml handling is something I would like to have in the plugin.
I have been working on the new plugin indirectly for now via
KodiLib it's slow going but it is going.

when I get to the plugin the development will be here
KodiEventGhost. If anyone is interested or want to help.
jonib