Author Topic: Send2: send playing media from one XBMC to another  (Read 15592 times)

0 Members and 1 Guest are viewing this topic.

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Send2: send playing media from one XBMC to another
« on: January 09, 2015, 02:52:06 PM »
 ::banana UPDATE: now have send2 and pull from, and have a group for either Sql or MySql   ::banana 
NOTE: MySql is an advanced Database setup if you are not sure which group to use then use "Send2 & Pull From With out MySql" Below

UPDATE: Now works with file paths and urls, (thanks for the idea jitterjames) i tested it on a handful of streaming add-ons and all of them except youtube would resume where you left off, for personal media both XBMC'S need to have access to the file through network file share, the media does not have to be in your library though


I got the idea for this from the XBMC/KODI FORUM SendTo script http://forum.kodi.tv/showthread.php?tid=147178

this is used to send media or pull media (movies,episodes, and music) from one XBMC to another XBMC

simply say:
"Send to the Living Room" (or "Pull from the Living Room")

  • it will find the path to either the file or url that is being played
  • then do a stepback on the media (same as pushing left, in case it doesn't pause due to timing)
  • then stop the video
  • connects to the receiving xbmc
  • sends the stop command to stop playing media (if any)
  • resumes playing the sent media on the receiving xbmc, then pauses it
  • connects back to the sending xbmc
  • then goes to the home screen(on the sending xbmc)


Make sure to change the IP, port numbers, username and password to match System>>Services>>Webserver in xbmc on the XJson.SetConnection Actions


Send2 & Pull From (Advanced)
this one is used with MySql
Attached Below


Send2 & Pull From  With OUT MySql
if you are not sure then use this one
Attached Below


all of these commands use the same payload XML, I attached an example (xbmcIPs.xml) of what it should look like, you only need the last digits of your XBMC IP's (192.168.1.***) and what you want to call that device in the phrase field, the xbmcIPs.xml goes into your xbmc payload folder

NOTE: depending on the speed of your network you may have to adjust the vc.pause time, so the pause command gets sent at the right time

 
« Last Edit: March 28, 2016, 02:29:23 PM by PegLegTV »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: SendTo: send playing media from one XBMC to another
« Reply #1 on: January 09, 2015, 10:19:36 PM »
Wow. Very cool idea.

I guess this will only work if your multiple XBMCs are sharing a mysql database though? Otherwise they would not have matching ids.

I wonder if you could still swing it without using ids?

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #2 on: January 09, 2015, 10:27:33 PM »
I'm using a MySQL setup, however according to the link i shared, where i got the idea from, he claims his doesn't require a MySQL or path substitution to use his
"both must have access to the original source. MySQL and path subsititution are not necessary"

i don't understand python that well but from what i saw in his code it looked to me as if we where using similar xjson commands,

as for the ids im not sure if it would be possible if i get some extra time ill see what i can figure out

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #3 on: January 10, 2015, 12:17:26 AM »
Just got done testing it with out MySql and the way i have the command built it has to be added to library in order for it to get the right info, so i added a source to 2 of my computers that does not have a MySql server running on them and used the same network share paths and tried it... and it seems to work with out MySQL 

as for doing it with out the id i would imagine it would need the file path of the video and would still have to be shared over the network, I'm a newbie to python and xjson commands but i will see what i can figure out on how to get the file path from the now playing media  ;D
« Last Edit: April 07, 2015, 01:38:55 PM by PegLegTV »

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #4 on: January 10, 2015, 02:32:45 AM »
updated the command in the first post, it can now send url's from add-ons and media that both xbmc's have access to through file shares, personal media does not have to be in the library for this to work

http://voxcommando.com/forum/index.php?topic=1954.msg16839#msg16839


thanks for the idea jitterjames  8)
« Last Edit: January 13, 2015, 03:50:50 PM by PegLegTV »

keithj69

  • $upporter
  • Sr. Member
  • *****
  • Posts: 113
  • Karma: 7
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #5 on: January 15, 2015, 01:00:36 PM »
getting my kodi environment setup and i love this idea.  Thanks.

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #6 on: January 15, 2015, 01:29:24 PM »
getting my kodi environment setup and i love this idea.  Thanks.

no problem,   :D

I'm working on adding it into my good night command so if previous command was pause then send to the bedroom else send Pandora,

NOTE: depending on the speed of your network you may have to adjust the vc.pause time, so the pause command gets sent at the right time
 

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #7 on: January 23, 2015, 07:54:56 PM »
After A LOT of testing  :bonk

I've found how to get it to pause every time when I send local media (media on my pc's)
still working on getting it to pause every time I send a url,

if it doesn't pause for you when you send a url, you can adjust the vc.pause that's in the logical command

I changed the command to use a payload.xml instead (my wife and kids fell in love with it and I had to add a command for all of my xbmc's 9 in total)


New Send to:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.0.1.0-->
<command id="225" name="New Send To" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Player.GetActivePlayers</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <params>
      <param>"playerid": (.*?),</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Player.GetItem</param>
      <param>"playerid":{Match.1},  "properties": ["file"]</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.ParseTokens</cmdType>
    <params>
      <param>"item": {"file":"{item.file}"}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.SetVar</cmdType>
    <params>
      <param>send2</param>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Btn.KB</cmdType>
    <params>
      <param>left</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>600</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Btn.KB</cmdType>
    <params>
      <param>x</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>5500</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.SetConnection</cmdType>
    <params>
      <param>192.168.1.{1}</param>
      <param>5680</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Btn.KB</cmdType>
    <params>
      <param>x</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>2000</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Player.Open</param>
      <param>{LastResult} , "options":{ "resume":true }</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)Contains(B)</ifType>
    <ifParams>{var.send2}&amp;&amp;{"file":"http</ifParams>
    <then>
      <action>
        <cmdType>VC.Pause</cmdType>
        <params>
          <param>1000</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>XJson.Raw</cmdType>
        <params>
          <param>Player.PlayPause</param>
          <param>"playerid":{Match.1},"play":false</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>XJson.Raw</cmdType>
        <params>
          <param>Player.PlayPause</param>
          <param>"playerid":{Match.1},"play":false</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <action>
    <cmdType>XJson.SetConnection</cmdType>
    <params>
      <param>192.168.1.140</param>
      <param>5680</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>GUI.ActivateWindow</param>
      <param>"window": "home"</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Send to, Going to</phrase>
  <phrase optional="true">the</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\xbmcIPs.xml</payloadFromXML>
</command>

after you copy/paste this group you will need to edit the "xbmcIPs.xml" you will need the last digits of your IP's (192.168.1.***) in the value field
and the phrase you want in the phrase field
you will need to edit the IP on the xjson.setconnection action at the bottom of the command to the host PC's IP

Hiryu

  • Contributor
  • ***
  • Posts: 53
  • Karma: 2
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #8 on: February 13, 2015, 01:13:32 PM »
PegLegTV --  thank you so much for sharing -- this is really awesome.  I installed this last night and got it to work for the most part. 

The part that worked for me is that VC was able to send the video from my PC to my Mac and Fire TV installations.  However, I have a few kinks in the system.
First, it is sending the video and pausing it, but not at the time stamp of where the movie played up to on the PC (host).  Secondly, I'm getting "Results.RegEx:"name".*?"(.*)" error: no matches found.  I'm still trying to get my head around RegEx so don't have much insight as to what that means.  I know that when the video gets sent over, VC says now playing (and then blank on the movie title) starring (blank again).  When I play it on the PC, though, VC is able to read the title and actors from the XML. 

In any case, do you have any advice to fix these little things?


Also, I assume if you want to send from the target pc back to the host pc, the "target" would have to have VC installed and then set it up so that it can be a "host" pc as well -- to go the other way.  Am I right in that assumption?

I wonder if there's a way, instead, to just "retrieve" the video back to the PC.  A command like, "Bring video back from mac"?  It would almost be like handoff/continuity for Kodi!

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #9 on: February 13, 2015, 02:22:48 PM »
Quote
First, it is sending the video and pausing it, but not at the time stamp of where the movie played up to on the PC (host)

in the command it jumps back 30 second (XJson.Btn.KB-- left) before it stops, and it also has a command to pause (XJson.Raw-Player.PlayPause) the video on the receiving end so you don't miss anything while walking to the other room the 30 second jump back is in case it doesn't pause on the receiving end, so hopefully you wont miss any thing


Quote
Secondly, I'm getting "Results.RegEx:"name".*?"(.*)" error: no matches found.  I'm still trying to get my head around RegEx so don't have much insight as to what that means.

That is going to be the "XBMC.Player.OnPlay.movie" command that is giving that error, is the video in both xbmc library's, for that command to work it needs to read the XBMC ID of the video or music file so if there isn't one you would get this error, I would try it again and look for "XBMC.Player.OnPlay.movie" in the event panel and hover over it and see what it says to see if there is an error being thrown, also what version of VC are you running?


Quote
Also, I assume if you want to send from the target pc back to the host pc, the "target" would have to have VC installed and then set it up so that it can be a "host" pc as well -- to go the other way.  Am I right in that assumption?

I wonder if there's a way, instead, to just "retrieve" the video back to the PC.  A command like, "Bring video back from mac"?  It would almost be like handoff/continuity for Kodi!

This is what you can use to Pull from another PC (make sure you change all IP's and Port numbers for your setup)

PullFrom
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="329" name="Pull From" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.SetConnection</cmdType>
    <params>
      <param>192.168.1.{1}</param>
      <param>5680</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Player.GetActivePlayers</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <params>
      <param>"playerid": (.*?),</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Player.GetItem</param>
      <param>"playerid":{Match.1},  "properties": ["file"]</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.ParseTokens</cmdType>
    <params>
      <param>"item": {"file":"{item.file}"}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.SetVar</cmdType>
    <params>
      <param>send2</param>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Btn.KB</cmdType>
    <params>
      <param>left</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>600</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Btn.KB</cmdType>
    <params>
      <param>x</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>600</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>5500</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.SetConnection</cmdType>
    <params>
      <param>192.168.1.140</param>
      <param>5680</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Btn.KB</cmdType>
    <params>
      <param>x</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>2000</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Player.Open</param>
      <param>{LastResult} , "options":{ "resume":true }</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.SetConnection</cmdType>
    <params>
      <param>192.168.1.{1}</param>
      <param>5680</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>100</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>GUI.ActivateWindow</param>
      <param>"window": "home"</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>100</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.SetConnection</cmdType>
    <params>
      <param>192.168.1.140</param>
      <param>5680</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>pull from, grab from</phrase>
  <phrase optional="true">the</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\xbmcIPs.xml</payloadFromXML>
</command>

you may also need to adjust the vc.pause commands to fit your network better

Hiryu

  • Contributor
  • ***
  • Posts: 53
  • Karma: 2
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #10 on: February 13, 2015, 05:16:32 PM »
PegLegTV -- thanks so much!

For me, it is passing the video to the other computer, but always at 0:0:0 paused, meaning the beginning of the movie, even if I'm halfway through on the PC (host).

As for XBMC.Player.OnPlay.movie
XJson.Raw:Player.GetItem&&"playerid":1,  "properties": ["title","cast"]
Results.RegEx:"name".*?"(.*)"

Rollover just states error: No matches found

Hovering over XBMC.Player.Onplay.movie, I see {1} No ID

I'm running the latest version of VC 2.1.3.8.

Thanks --I'll take a look at the "pull" command, makes this even more awesome.


BTW, for Xsql or Xjson -- I don't have much familiarity with those -- most of my movies have the full slate of metadata (VC announced Film title and who stars in it, but I've found some movies that doesn't have the actors information so VC just says starring [then nothing].  I've purged the cache, run the GenXML, but still persists, any advice on that for filling in the blank information?



PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #11 on: February 13, 2015, 06:42:26 PM »
Quote
As for XBMC.Player.OnPlay.movie
XJson.Raw:Player.GetItem&&"playerid":1,  "properties": ["title","cast"]
Results.RegEx:"name".*?"(.*)"

Rollover just states error: No matches found

Hovering over XBMC.Player.Onplay.movie, I see {1} No ID

the only time I see "{1} no ID" is when the video is not in my library so I just changed my XBMC.Player.OnPlay.movie command so it would ignore it if it had "{1} no ID"

XBMC.Player.OnPlay.movie: for "{1} no ID"
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="536" name="XBMC.Player.OnPlay.movie" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;no ID</ifParams>
    <then>
      <action>
        <cmdType>VC.StopMacro</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <action>
    <cmdType>TTS.SetVolume</cmdType>
    <params>
      <param>100</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Player.GetItem</param>
      <param>"playerid":1,  "properties": ["title","cast"]</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <params>
      <param>"name".*?"(.*)"</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.MatchConcat</cmdType>
    <params>
      <param>, </param>
      <param>3</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.ParseTokens</cmdType>
    <params>
      <param>Now Playing {item.title} Starring {lastresult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.SoftMute</cmdType>
    <params>
      <param>60</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Speak</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.SoftUnMute</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>XBMC.Player.OnPlay.movie</event>
</command>


Quote
For me, it is passing the video to the other computer, but always at 0:0:0 paused, meaning the beginning of the movie, even if I'm halfway through on the PC (host).

I'll need to do some more testing on this to see if I can recreate the problem, the only time I've seen this is when sending youtube videos to other devices but that seems to be an issue with the youtube plugin not wanting to start in the middle of a video

Quote
BTW, for Xsql or Xjson -- I don't have much familiarity with those -- most of my movies have the full slate of metadata (VC announced Film title and who stars in it, but I've found some movies that doesn't have the actors information so VC just says starring [then nothing].  I've purged the cache, run the GenXML, but still persists, any advice on that for filling in the blank information?

with the xsql that is scaning a .db file that is created by xbmc so if that data isn't in the .db file then VC can't use it, you could check if the movies that are missing actors have them listed in the info screen in xbmc, if they aren't then you could try to edit an .nfo file if you use them and refresh that movie to see if it added those actors, if it did then you need to generate your xsql again and then try "what movie is this" to see if that added the actors.

jitterjames has the correct answer on this
Quote
jitterjames: I should also point out that the actions that get information about the currently playing media have nothing to do with GenXML.  When the onmovie event fires the command uses an xJson.Raw action to ask Kodi for the information about what is playing.  I think that Kodi does not know the ID of the now playing item because it was starting using a file path and not a library ID.  Again this could be solved by using MySql and passing the media ID instead of the path.
« Last Edit: February 14, 2015, 02:07:43 AM by PegLegTV »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: SendTo: send playing media from one XBMC to another
« Reply #12 on: February 13, 2015, 07:14:07 PM »
I think the problems Hiryu is having is related to the fact that you are not using the MySQL database so you do not have shared information between different Kodi machines.

The resume is not going to work because the new machine does not know where the old machine left off.  Actually, you may not always get a movie starting at 0:00.  If machine A tells machine B to resume a movie, it will resume wherever the movie was the last time that machine B stopped watching it.

In order for this to work as it is you will need to use a shared MySQL database for all your Kodi installations.  This is generally a good idea if you have one library and multiple Kodi machines.

I should also point out that the actions that get information about the currently playing media have nothing to do with GenXML.  When the onmovie event fires the command uses an xJson.Raw action to ask Kodi for the information about what is playing.  I think that Kodi does not know the ID of the now playing item because it was starting using a file path and not a library ID.  Again this could be solved by using MySql and passing the media ID instead of the path.

I hope this helps.

For information about how to set up MySQL please go to the Kodi forums and wiki.  It is well documented.
« Last Edit: February 13, 2015, 11:08:29 PM by jitterjames »

Hiryu

  • Contributor
  • ***
  • Posts: 53
  • Karma: 2
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #13 on: February 14, 2015, 09:44:29 AM »
Thanks -- I'll keep experimenting with this.  James, do I have to turn off the Xsql plugin if I use xMySql (is it only one or the other, don't want to run into conflicts).

Also, I've never used sql so very unfamiliar -- how do I check to see if MySql is working correctly?  Any good quick test?

I know this is asking for more help than just VC.  My Mac Mini is the server with all the hosted media files.  So I installed MySQL on that, turned it on, and also installed Kodi on there for good measure.  After adding all the advancedsettings.xml settings onto my PC instance of Kodi and re-starting it up, I check the xMySQL Plugin, go to the payload generator, and input the ip address of my server, user name and password (from Kodi Services, webserver).  The username and password are the same on all my instances of Kodi (Mac Mini, Macbook, and PC). 

When I try to "save and generate" the payload xml, I get Access denied for 'user'@'pc.home' (using password: YES) SCANNING ABORTED.  Any advice?  Am I doing something wrong here with the MySQL setup?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: SendTo: send playing media from one XBMC to another
« Reply #14 on: February 14, 2015, 10:23:49 AM »
Thanks -- I'll keep experimenting with this.  James, do I have to turn off the Xsql plugin if I use xMySql (is it only one or the other, don't want to run into conflicts).

Yes.  You should switch to using the xMySql plugin instead of the xSql plugin.  Or you can just use the xJson plugin to generate XML if your needs are simple.

As for the rest: http://kodi.wiki/view/MySQL