Author Topic: Playback stop event in MB Classic?  (Read 4626 times)

0 Members and 1 Guest are viewing this topic.

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Playback stop event in MB Classic?
« on: February 20, 2015, 11:26:45 PM »
In Kodi, the following event can be used;

XBMC.Player.OnStop.Movie

What would be used in MB Classic? MB3.Playback.Stopped????

Thanks.
« Last Edit: February 21, 2015, 08:36:28 AM by nime5ter »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Playback stop event in MB Classic?
« Reply #1 on: February 21, 2015, 08:33:47 AM »
Hi lja,

I don't have the MB server running right now, but if I were trying to find what event Media Browser generates when a movie stops, rather than trying to guess I would:

1. Make sure VC is running and properly connected to my MB Classic client
2. Start playing a movie, and then stop it to see what events show up in the history panel.

http://voxcommando.com/mediawiki/index.php?title=Events

« Last Edit: February 21, 2015, 08:37:02 AM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Playback stop event in MB Classic?
« Reply #2 on: February 21, 2015, 11:14:32 AM »
I know that the documentation about events in the wiki was not the best. I've now tried to make it more readable/useful.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: Playback stop event in MB Classic?
« Reply #3 on: February 21, 2015, 11:36:54 AM »

Thanks. I was not guessing. I have been doing what you indicated and that is how I got "MB3.Playback.Stopped". My question was for clarification as I did not get the desired results.I will keep trying with it and if I am unable to have success, I will post again.
« Last Edit: February 21, 2015, 11:39:32 AM by lja »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Playback stop event in MB Classic?
« Reply #4 on: February 21, 2015, 12:20:14 PM »
Ah. Usually it's easier for us to give a useful response when we know what a user has tried and observed, as well as what the objective is. Since we would have to do the same thing as you to find out what an event is named, we're not likely to get a different result.

Regarding MB events generally:

In my limited experience with the various Media Browser clients so far, they each handle events differently and sometimes the events they generate will not be very usable because of their quirks.

For example, MB Classic apparently sometimes generates multiple MB3.Playback.Stopped events in a row when a music track ends in a playlist (or something like that).

An MB3.Playback.Stopped event is also generated when a movie stops, but it's important to note that this event basically seems to occur any time a track ends, so for example, if you watch movie previews before your main feature, when the preview ends MB Classic seems to generate MB3.Playback.Stopped event and then begins to play the main feature. So, it's probably not a very useful event if you *only* want it to trigger a command when a main feature ends.
« Last Edit: February 21, 2015, 12:22:31 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: Playback stop event in MB Classic?
« Reply #5 on: February 21, 2015, 12:32:52 PM »
if you watch movie previews before your main feature, when the preview ends MB Classic seems to generate MB3.Playback.Stopped event and then begins to play the main feature. So, it's probably not a very useful event if you *only* want it to trigger a command when a main feature ends.

Sorry, but before posting details previously, I wanted to seek clarification on MB3.Playback.Stopped as I was getting what you described above. I will keep searching for a way to turn the lights off when the movie ends in MB Classic. If I meet with any success I will post again.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Playback stop event in MB Classic?
« Reply #6 on: February 21, 2015, 12:38:59 PM »
Sorry, but before posting details previously, I wanted to seek clarification on MB3.Playback.Stopped as I was getting what you described above. I will keep searching for a way to turn the lights off when the movie ends in MB Classic. If I meet with any success I will post again.

OK then.  The answer is "YES" that is the name of the event.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Playback stop event in MB Classic?
« Reply #7 on: February 21, 2015, 12:57:11 PM »
Sorry, but before posting details previously, I wanted to seek clarification on MB3.Playback.Stopped as I was getting what you described above. I will keep searching for a way to turn the lights off when the movie ends in MB Classic. If I meet with any success I will post again.

Basically, you'll have to track whether a movie is playing or not using your own variable. Then, in your command that is triggered by MB3.Playback.Stopped, you'll need to use a logic block to determine whether your "movie is playing" variable is true or false.

If true, the command does whatever you want to do at the end of the feature. If not, the command does nothing.

Example (that needs to be edited to suit your needs):

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<commandGroup open="True" name="MB Classic movie time for lja" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1196" name="Set movie now playing variable" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>movieNowPlaying</param>
        <param>true</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>MB3.Playback.Start.Movie</event>
  </command>
  <command id="1197" name="End of movie, turn lights back up" 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>{var.movieNowPlaying}&amp;&amp;true</ifParams>
      <then>
        <action>
          <cmdType>Scrape</cmdType>
          <params>
            <param>http://192.168.1.200:35005/USE CORRECT SYNTAX FOR YOUR INSTEON</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>I hope you enjoyed the show.</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>movieNowPlaying</param>
            <param>false</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <event>MB3.Playback.Stopped</event>
  </command>
</commandGroup>

Note that you will run into problems if you started watching a movie without VC running, because then VC won't know that the "movie is now playing" variable is true.

In this case, VC will simply not do anything at the end of the feature presentation.
« Last Edit: February 21, 2015, 01:01:05 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: Playback stop event in MB Classic?
« Reply #8 on: February 21, 2015, 02:25:15 PM »
OK then.  The answer is "YES" that is the name of the event.

 :)

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: Playback stop event in MB Classic?
« Reply #9 on: February 21, 2015, 02:28:05 PM »
@nime5ter

Thanks. As always you have been very helpful. Much appreciated.