News:

There is a soft-mute function which we use with the commands like "What song is this?" There is one for system volume, one for each of: MediaMonkey, XBMC, iTunes, MediaPortal.

Main Menu

Playback stop event in MB Classic?

Started by lja, February 20, 2015, 11:26:45 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

lja

In Kodi, the following event can be used;

XBMC.Player.OnStop.Movie

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

Thanks.

nime5ter

#1
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

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

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

#3

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.

nime5ter

#4
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.
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

Quote from: nime5ter on February 21, 2015, 12:20:14 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

Quote from: lja on February 21, 2015, 12:32:52 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

#7
Quote from: lja on February 21, 2015, 12:32:52 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):

<?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.
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


lja

@nime5ter

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