XBMC Remote Play

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
erolosty Offline
Junior Member
Posts: 24
Joined: Nov 2010
Reputation: 0
Post: #1
[Image: Bfjj2.png]

I'm very much not a C++ coder, and wanted to add this entirely using python but have found that its not possible. I want this feature so I can use XBMC as a remote for XBMC. I want to do most of the heavy lifting (Zero Conf finding local peers, calling JSON RPC) in python, and return the list of XBMCs to xbmc-proper. When the button is clicked I'd like the URI to be passed down to the script to invoke Remote Play.

I'm thinking:

Code:
<advancedsettings>
<contextmenu>

<additionalitemhandler>myscript.py</additionalitemhandler>
<!--  possibly someday also <additionalitemhandler>somebodyelsesscript.py</additionalitemhandler>-->


</contextmenu>
</advancedsettings>

I'd like someone more C literate to pair with me to implement this feature. Or to start a thread of "ooo I'd like that" which might draw attention from the core team to make this a first class citizen (as opposed to an addon) integrated into the GUI settings as a Service etc.

Thoughts very welcome.

Thanks,
Losty


http://forum.xbmc.org/showthread.php?tid=136804
find quote
phil65 Offline
Skilled Skinner
Posts: 4,456
Joined: Mar 2009
Reputation: 56
Location: Cologne, Germany
Post: #2
can perhaps be done by editing skin code

Code:
<control type="grouplist" id="996">
            <posx>0</posx>
            <posy>0</posy>
            <width>462</width>
            <height max="1080">auto</height>
            <itemgap>0</itemgap>
            <control type="button" id="2007">
                <posx>0</posx>
                <posy>0</posy>
                <height>58</height>
                <width>462</width>
                <texturenofocus>dialogs/context_nofocus.png</texturenofocus>
                <texturefocus>dialogs/shutdown_focus.png</texturefocus>
                <font>Font_Reg19</font>
                <label>Your Label</label>
                <visible>Container.Content(songs) | Container.Content(movies) | Container.Content(episodes)</visible>
                <onclick>RunScript(...)</onclick>
            </control>
        </control>

in DialogContextMenu.xml.
(This post was last modified: 2012-08-13 18:09 by phil65.)
find quote
erolosty Offline
Junior Member
Posts: 24
Joined: Nov 2010
Reputation: 0
Post: #3
Thanks for the response phil65,

I hope it will turn out to be this easy (might not have time until the weekend), do you happen to know if the above can pass any information about the currently selected item down to RunScript()? Can it be RunScript(item) or will it be static if coded into the script?

I've started working on the other side of the problem and found that (if i can get item about the currently selected item) all I really need (for a functional but inelegant solution) is to call:

XBMC.PlayMedia($PATH,"resume") remotely. Currently testing using d4rk@xbmc.org's script but have previously called BuiltIns from wget so might go for simpler solution.

All info very much encouraged.

Thanks
Losty
find quote