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

0 Members and 2 Guests are viewing this topic.

Hiryu

  • Contributor
  • ***
  • Posts: 53
  • Karma: 2
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #15 on: February 16, 2015, 11:54:37 AM »
Quote
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.

PegLegTV and Jitterjames,

After a lot of missteps and frustrating roadblocks, I finally figured out how to get a mysql server running (at least it seems to be working for now).  And it also seems that sending and pulling kodi works, with pauses at the correct time stamp (30 seconds back).  Thank you both!  I was reluctant to setup mysql since I am not very technically inclined and wasn't sure I could do it. 

Jitterjames -- also when you said that GenXML doesn't actually generate the information and really is just grabbing information from Kodi (which is generated from a scrape).  Where can I find the actual Kodi information if I wanted to change the data (say, if actors are missing).

The other question is, is there any way to exclude certain videos from VC announcing the name and actors?  I ask because I have a Screensaver add-on that cycles between a few videos (ambient visualizations, fireplace, etc.) but VC also announces those.  I want to exclude those from the list.  Sorry, don't really understand XJson.Raw so need some guidance. 

Do I just go into XBMCpayloads and look for, say, the fireplace entry and delete it?

Thanks!


Hiryu

  • Contributor
  • ***
  • Posts: 53
  • Karma: 2
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #16 on: February 16, 2015, 12:01:19 PM »
Also, just want to say thank you again to PegLegTV and Jitterjames.  Really want you to know how much I appreciate your help.  Thanks!

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #17 on: February 16, 2015, 12:43:26 PM »
Quote
Jitterjames -- also when you said that GenXML doesn't actually generate the information and really is just grabbing information from Kodi (which is generated from a scrape).  Where can I find the actual Kodi information if I wanted to change the data (say, if actors are missing).
depending on what scraper you are using in XBMC/KODI you would need to go to that site and search for the movies that are missing actors and see if they are missing on that site if so you could try and add them and then remove the movie from you library and then re-add the movie so it scrapes the site again to see if that pulls in the actors, https://www.themoviedb.org/ this is the main movie scraper used in XBMC/KODI if that doesn't work you could try .NFO files with those movies and edit the .NFO file to add your actors http://kodi.wiki/view/NFO_files

Quote
The other question is, is there any way to exclude certain videos from VC announcing the name and actors?  I ask because I have a Screensaver add-on that cycles between a few videos (ambient visualizations, fireplace, etc.) but VC also announces those.  I want to exclude those from the list.  Sorry, don't really understand XJson.Raw so need some guidance.

Do I just go into XBMCpayloads and look for, say, the fireplace entry and delete it?

Deleting them from the xbmcMovieIDs.xml wouldn't be the long term answer being that every time you generate the xml it would just add them again, you could find the ID of the videos you don't want to play and add them in your command so the command stops if that ID is in payload 1

Stop VC from announcing specific video ID's
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="542" 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>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;ID you want to block</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>

In the command where it says "ID you want to block" replace that with the id of the video you don't want VC to announce


hope this helps, and Glad to here its working for you   :yay
« Last Edit: February 16, 2015, 12:52:10 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 #18 on: February 16, 2015, 12:45:51 PM »
Glad to hear you got it sorted out.  I personally consider using MySQL more trouble than it is worth but if you want share content and keep track of watched items across multiple installations it is definitely the best way.  This is one reason why MediaBrowser looks like an interesting alternative to Kodi, although I think it still need to mature a bit.

Jitterjames -- also when you said that GenXML doesn't actually generate the information and really is just grabbing information from Kodi (which is generated from a scrape).  Where can I find the actual Kodi information if I wanted to change the data (say, if actors are missing).
That is not what I said.  I said (or meant) that the VC command which announces songs is asking Kodi for information and that this has nothing to do with GenXML, and nothing to do with your PayloadXMLs.

If you want to edit metadata for items in your Kodi library I think you need to either do it in Kodi or in MySQL.

If actors are missing, then normally you don't need to do this manually, you just need to set Kodi up to automatically look for this information using scrapers.  I guess it depends on what kind of content you have in your library.  Certainly with mainstream English movies etc. it can always find this information automatically.  But this all a matter of learning how to use Kodi, not VC.

The other question is, is there any way to exclude certain videos from VC announcing the name and actors?  I ask because I have a Screensaver add-on that cycles between a few videos (ambient visualizations, fireplace, etc.) but VC also announces those.  I want to exclude those from the list.  Sorry, don't really understand XJson.Raw so need some guidance. 

Do I just go into XBMCpayloads and look for, say, the fireplace entry and delete it?

Thanks!
Again, editing your XBMC payloads will have absolutely no effect on this.  Those payloads are (normally) only used for creating the voice commands so that you can ask for media items by name.

If you want to exclude certain items then you need to find a way to identify those items.  If you can post a log of how the current command is working with normal items and then with the screensaver items, I can look to see if there is an easy way to differentiate between them.  It is probably just a question of using a logic block, and possibly a regex action.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando

Hiryu

  • Contributor
  • ***
  • Posts: 53
  • Karma: 2
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #20 on: February 16, 2015, 01:04:29 PM »
Hahahaha -- yeah, mySQL was a bit of a bear for my situation.  Love tinkering with stuff, so getting it working was part of the pain/fun -- but I agree with you, JitterJames -- it was more trouble than it was worth for me.  Oh well, seems to be ok now.  I have taken a look at MediaBrowser in the past, and it just seemed a bit rough around the edges.  Maybe I'll take a look at it again.

Thanks guys -- I'll keep tinkering with this and see if I can make heads or tails out of the nfo.  Thanks PegLegTV -- I will try the code you posted.

You guys are awesome.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: SendTo: send playing media from one XBMC to another
« Reply #21 on: February 16, 2015, 01:16:18 PM »
Thanks guys -- I'll keep tinkering with this and see if I can make heads or tails out of the nfo.  Thanks PegLegTV -- I will try the code you posted.

You guys are awesome.

I recommend you post a log so we can come up with a better long term solution.  Otherwise you will be messing with IDs every time you want to add something new.

Hiryu

  • Contributor
  • ***
  • Posts: 53
  • Karma: 2
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #22 on: February 16, 2015, 01:43:11 PM »
HEy PLT,

Quote
In the command where it says "ID you want to block" replace that with the id of the video you don't want VC to announce

How do I figure out what the Video ID is?

As an example, I have a VideosID.xml that has "fireplace.mp4" in it as the only entry.  This xml is separate from the MoviesID.xml, which has all the movies loaded into Kodi.

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #23 on: February 16, 2015, 01:55:47 PM »
you could play the video and then look in your history window on VC for the event "XBMC.Player.OnPlay.movie" and hover over it like you did when it was saying "no ID" and that should get you the ID

if the video that you are trying to stop VC from talking about has "no ID" then the command I shared should stop VC from talking as well

when testing the command I added "Stop VC from announcing specific video ID's" you will need to
Make sure you disable the group that has the original "XBMC.Player.OnPlay.movie" command in it other wise it will still annouce the video with TTS,

once you have the command I shared working like you want then you can delete the other "XBMC.Player.OnPlay.movie" and enable that group


Hiryu

  • Contributor
  • ***
  • Posts: 53
  • Karma: 2
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #24 on: February 16, 2015, 03:28:12 PM »
PegLegTV -- yep, awesome, it works!  Thanks!  Good workaround since it has NoID.

Movies still play with VC TTS, but the screensavers, which have NoID don't announce anything.

And no need to mess around with the VideoIDs.  Thanks all.

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: SendTo: send playing media from one XBMC to another
« Reply #25 on: February 16, 2015, 03:30:57 PM »
PegLegTV -- yep, awesome, it works!  Thanks!  Good workaround since it has NoID.

Movies still play with VC TTS, but the screensavers, which have NoID don't announce anything.

And no need to mess around with the VideoIDs.  Thanks all.


Glad to here it works, if it works with the "no ID" then i would delete the second logic block that says "ID you want to block" as that logic block is no long needed


MMatty1

  • Jr. Member
  • **
  • Posts: 40
  • Karma: 4
    • View Profile
Re: Send2: send playing media from one XBMC to another
« Reply #27 on: March 14, 2018, 08:11:28 AM »
Hi just wondering if this will work with Jarvis and krypton? Thnxx in advancd

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: Send2: send playing media from one XBMC to another
« Reply #28 on: March 15, 2018, 02:35:06 AM »
 Sorry for the delay, Yes it should work in both Jarvis and krypton

MMatty1

  • Jr. Member
  • **
  • Posts: 40
  • Karma: 4
    • View Profile
Re: Send2: send playing media from one XBMC to another
« Reply #29 on: March 15, 2018, 04:31:07 AM »
Awesome thnxxx mate and great command too,and thnxx for the reply.. 😉