Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Support for XBMC2 plugin (formerly XBMCRepeat)

Questions and comments specific to a particular plugin should go here.
kuelblaz
Posts: 2
Joined: Sat Mar 30, 2013 5:25 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by kuelblaz »

OK, I'm rather new to XMBC. I have been using EG for a while to capture RS232 inputs from my remote setup and running FooBar2K and Media Browser. Switched to XMBC becuase I'm tired of the decreasing Media Browser support. So now I'm figuring out XMBC.
I loaded up the XMBC2 plugin, but I believe I am missing something basic, because it doesnt launch XMBC from the \remote\startup or \uncat\start (?) commands. I've been trying to find some basic install info to make sure I have everything needed, but no luck other than this forum. Folks here seem to have no prob running, so I'm left with something I've overlooked. I dont get any error messages at all. EG log shows the 'startup' action initiated, but nothing happens
Sys info is:
Win7 SP1 64bit, build 7601
XMBC 12.1 Git:20130317-0d373cc (Compiled Mar 17 2013)
EG version is 0.4.1r1610
plugin version unk (is what is loaded through plugin selection in EG)
I have disabled firewall to test functions - no change
loopback pings ok

Anyway, I'd appreciate any suggestions ... Thanks!
K.
Biff
Experienced User
Posts: 56
Joined: Mon Mar 25, 2013 11:06 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Biff »

I think it's possible to create it using JSON-RPC. Specifically "Experimental\JSONRPC\Player.Seek". I'll see if I can make a command for you, when I have time. You would need to first get the current position then add your desired seek time.
Ah, OK, many thanks jonib.
That is something you need to ask the XBMC developers.
I understand, there just doesn't exist this option, strange.
With JSON-RPC it might be possible to do this, I'll have to look into it.
Thank you very much.
Do you mean to show/activate the XBMC window? or something else?
Yes, I would say, show the XBMC window, so just bring it on top, press the key and independently of what you see (which program is on top / visible), now the XBMC window comes to the top. But as I see with foobar (this is the action: "Foobar2000: Show" and back with "Foobar2000: Hide"), when you show foobar you cannot access it yet by other keys, you have to click into the window before (which action could do this?). Edit:...and it doesn't seem to work always, sometimes foobar appears, sometimes it doesn't.
Is there an action to bring the video opened (currently watched and paused) in XBMC on top (in fulls screen mode, if not already being in)?

So the video is playing in the background with the XBMC homescreen/filelist showing and you want the video fully visible again?
That could be an option, also, what I meant was: suppose you watch a video, you pause it, bring foobar on top and play a piece of music and I then want to go on watching the video, so I would press one key and just could go watching. And, yes, all the same, what XBMC does at the moment, if it shows a file list or a menu or the "Home" window or the skin settings, if there would be a key you could press and it always brings this full screen video on top and you could go watching on the video, that would be good.
You can use "XBMC2\Buttons\Remote\Dispaly" or "XBMC2\Actions\Media Playing\Fullscreen".
Yes, I had tried some actions before, which might do it, but I cannot get it working: the system tray (the Windows bar at the bottom) stays (or comes to) on top also, so the video (screen) is covered by this bar.
Last edited by Biff on Sat Mar 30, 2013 7:28 pm, edited 2 times in total.
Biff
Experienced User
Posts: 56
Joined: Mon Mar 25, 2013 11:06 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Biff »

The advantage (if I see it right) - by the way - if you could bring programs to the top by a key would be, you could assign more than one action to a key, if EG could treat differently global and none global functions like it is done with foobar: a global key always invokes a function independently whether the program is on top (visible) or not and a none global functions only invokes the function when a program is visible / on top. So you could start playing with the same key foobar (when it is on top) or XBMC (when it is on top).
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

kuelblaz wrote:I loaded up the XMBC2 plugin, but I believe I am missing something basic, because it doesnt launch XMBC from the \remote\startup or \uncat\start (?) commands.
There is no function to start XBMC within the XBMC2 plugin, and I'm not sure it's needed as you can use EventGhosts "System\Start application" action or any normal way you can start XBMC and then detect and activate the XBMC2 actions.
I've been trying to find some basic install info to make sure I have everything needed, but no luck other than this forum.
The first post in this thread(and the thread itself) is the only documentation for the XBMC2 plugin. I'll try to make some proper documentation when I have finished the next version of the plugin.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

Biff wrote:
Do you mean to show/activate the XBMC window? or something else?
Yes, I would say, show the XBMC window, so just bring it on top, press the key and independently of what you see (which program is on top / visible), now the XBMC window comes to the top.
I use "Add action:Window\Find a window" and "Add action:Window\Bring to front" in a macro to bring the XBMC windows in front.
You can use "XBMC2\Buttons\Remote\Dispaly" or "XBMC2\Actions\Media Playing\Fullscreen".
Yes, I had tried some actions before, which might do it, but I cannot get it working: the system tray (the Windows bar at the bottom) stays (or comes to) on top also, so the video (screen) is covered by this bar.
Those actions only work in XBMC and don't effect other windows.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
kuelblaz
Posts: 2
Joined: Sat Mar 30, 2013 5:25 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by kuelblaz »

Thanks jonib ... As I suspected, operator error
Biff
Experienced User
Posts: 56
Joined: Mon Mar 25, 2013 11:06 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Biff »

I use "Add action:Window\Find a window" and "Add action:Window\Bring to front" in a macro to bring the XBMC windows in front.
That works, great, and as I see you have to use this order. Edit: It doesn't work always, when I have in XBMC the starting menu opened the video just goes on playing, but it doesn't get in full screen view.
Those actions only work in XBMC and don't effect other windows.
I am not sure to understand, using these actions always let the system tray appear in front on my system as it seems.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: XBMC2: SmallStepForward not available?

Post by jonib »

Biff wrote:"XBMC2: SmallStepBack:" is available in EG, but (something like) XBMC2: SmallStepForward doesn't seem to be. Is there a way to create such a function?
Try the below code, just copy it and paste it in EventGhost. It will create a macro where you paste it.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1600">
    <Macro Name="XBMC2: SmallStepForward" Expanded="True">
        <Action Name="XBMC2: SmallStepForward">
            EventGhost.PythonScript(u'SkipTime = {"seconds": 5}\n\nplayerid = eg.plugins.XBMC2.JSONRPC(u\'Player.GetActivePlayers\', u\'\', False)[0][\'playerid\']\n\nTestTime = eg.plugins.XBMC2.JSONRPC(u\'Player.GetProperties\', "["+str(playerid)+u",[\'time\']]", False)[\'time\']\n\nTestTime[\'seconds\'] += SkipTime[\'seconds\']\n\nif TestTime[\'seconds\'] > 59:\n    TestTime[\'seconds\'] -= 60\n    TestTime[\'minutes\'] += 1\n\neg.plugins.XBMC2.JSONRPC(u\'Player.Seek\', "["+str(playerid)+u","+str(TestTime)+"]", False)')
        </Action>
    </Macro>
</EventGhost>
It's a Python script that uses XBMCs JSON-RPC commands Player.GetActivePlayers, Player.GetProperties and Player.Seek to find out the position in the video file and then add 5 seconds. You can edit it if you want a different time.

jonib
Last edited by jonib on Sun Mar 31, 2013 12:46 am, edited 1 time in total.
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

Biff wrote:It doesn't work always, when I have in XBMC the starting menu opened the video just goes on playing, but it doesn't get in full screen view.
What settings did you use in "Find a window"? as I only have the "Program:" checked with XBMC.exe and it works always. It won't make XBMC fullscreen if it's in a smaller window.
Those actions only work in XBMC and don't effect other windows.
I am not sure to understand, using these actions always let the system tray appear in front on my system as it seems.
For me they don't have any effect on anything but the XBMC window.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Biff
Experienced User
Posts: 56
Joined: Mon Mar 25, 2013 11:06 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Biff »

Many thanks, jonib,

Great.

Sorry for my bad understanding, where have I to paste it in EG? Just pasting it somewhere in EG doesn't seem to work. May be create a macro by context menu?
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

Biff wrote:Sorry for my bad understanding, where have I to paste it in EG? Just pasting it somewhere in EG doesn't seem to work. May be create a macro by context menu?
Anywhere you can put a macro. I think you need to select the code manually and not use the "Select all" link (If you did) then paste somewhere in your EventGhost config tree.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Biff
Experienced User
Posts: 56
Joined: Mon Mar 25, 2013 11:06 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Biff »

What settings did you use in "Find a window"?
Here "Find Window: XBMC.exe" I have the default settings left untouched.
Image
It won't make XBMC fullscreen if it's in a smaller window.
OK, I wouldn't have thought so.
For me they don't have any effect on anything but the XBMC window.
Yes, actually the same for me, but the system tray covers XBMC.
Biff
Experienced User
Posts: 56
Joined: Mon Mar 25, 2013 11:06 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Biff »

jonib wrote:
Biff wrote:Sorry for my bad understanding, where have I to paste it in EG? Just pasting it somewhere in EG doesn't seem to work. May be create a macro by context menu?
Anywhere you can put a macro. I think you need to select the code manually and not use the "Select all" link (If you did)
Exactly that I did, unbelievable, and the copy confirmation sound sounded.

Yes, now I was able to add it, really easily done...but I am not sure, something doesn't seem to be OK:

Image
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

Biff wrote:Here "Find Window: XBMC.exe" I have the default settings left untouched.
Uncheck "Window name:" and "Window class:" you don't need them.
For me they don't have any effect on anything but the XBMC window.
Yes, actually the same for me, but the system tray covers XBMC.
Are you using the Fullscreen or Window option in XBMCs Video output settings? I use "Display mode: Full screen" and "Use a fullscreen window rather than true fullscreen" and when XBMC is in focus I only see XBMCs window.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

Biff wrote:Yes, now I was able to add it, really easily done...but I am not sure, something doesn't seem to be OK:
Copy it again, I had to fix the internal plugin name as mine is "XBMC" and yours is probably "XBMC2".

Edit: If you are using XBMC 12 (Frodo) or newer you need to update the XBMC plugin in the EventGhost dir\Plugins\XBMCRepeat with this one, as the one included in EventGhost don't support using JSON-RPC with Frodo.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Post Reply