Author Topic: MB Classic  (Read 3017 times)

0 Members and 1 Guest are viewing this topic.

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
MB Classic
« on: February 06, 2015, 12:56:34 AM »
Challenge: MB Classic has the Home Screen/browse movies brings up the list of movies/ play movie goes directly to the movie and does not play the intro. To play the intro it is necessary to go to the details screen(the next screen) which has a play button. Clicking on the play button will play the intro and then the movie.

On the MB3 forum
From jitterjames" you should be able to set up a voice command to do this very easily.  Just modify the find movie command and add an action to press select after a second or two of delay."

I have attempted to follow the above but believe I am not doing it correctly. Here is one of the approaches I have used:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="1179" name="Find/Play/Resume movie {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)Contains(B)</ifType>
    <ifParams>Display, Find&amp;&amp;{1}</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>Navigating to {PF.2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>MB3.Browse</cmdType>
        <params>
          <param>{2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.Pause</cmdType>
        <params>
          <param>2000</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>MB3.GeneralCommand</cmdType>
        <params>
          <param>{PLAY}({ENTER})</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.StopMacro</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>Resume&amp;&amp;{1}</ifParams>
    <then>
      <action>
        <cmdType>TTS.SpeakSync</cmdType>
        <params>
          <param>Resuming movie {PF.2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>MB3.ResumeItem</cmdType>
        <params>
          <param>{2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.StopMacro</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <action>
    <cmdType>TTS.SpeakSync</cmdType>
    <params>
      <param>Playing movie {PF.2}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>MB3.PlayItem</cmdType>
    <params>
      <param>{2}</param>
      <param>Play</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>MB3.GeneralCommand</cmdType>
    <params>
      <param>{ENTER}{{presskey}...}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <payloadList>Display, Play, Find, Resume</payloadList>
  <phrase>movie</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">MB3Payloads\Movies.xml</payloadFromXML>
</command>

Any help is appreciated. Please be gentle.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: MB Classic
« Reply #1 on: February 06, 2015, 08:05:44 AM »
Getting there.

In the group named "General Commands" there is already a select command.  Look at the macro for that command to see how to press select.  All you need to do is add the same action (after a pause if required) to the find movie command so that it will play it after it finds it.

The actions for find movie are in the first logic block.

Don't add additional actions at the end of the macro.



« Last Edit: February 06, 2015, 08:19:08 AM by nime5ter »

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: MB Classic
« Reply #2 on: February 06, 2015, 06:04:04 PM »
Thanks for your response. I know you indicated it was simple, however it seems I am still missing something. I have added the select command similar to that under "General Commands"to the find movie command as shown hereunder:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="1179" name="Find/Play/Resume movie {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)Contains(B)</ifType>
    <ifParams>Display, Find&amp;&amp;{1}</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>Locating {PF.2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>MB3.Browse</cmdType>
        <params>
          <param>{2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.Pause</cmdType>
        <params>
          <param>9000</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>MB3.GeneralCommand</cmdType>
        <params>
          <param>select</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.StopMacro</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>Resume&amp;&amp;{1}</ifParams>
    <then>
      <action>
        <cmdType>TTS.SpeakSync</cmdType>
        <params>
          <param>Resuming movie {PF.2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>MB3.ResumeItem</cmdType>
        <params>
          <param>{2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.StopMacro</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <action>
    <cmdType>TTS.SpeakSync</cmdType>
    <params>
      <param>Playing movie {PF.2}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>MB3.PlayItem</cmdType>
    <params>
      <param>{2}</param>
      <param>Play</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <payloadList>Display, Play, Find, Resume</payloadList>
  <phrase>movie</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">MB3Payloads\Movies.xml</payloadFromXML>
</command>

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: MB Classic
« Reply #3 on: February 06, 2015, 06:20:05 PM »
Yes, you're on the right track. However, you've written "select" (lowercase) rather than copying and pasting "Select" from the example command. 

MediaBrowser's general commands appear to be case sensitive.

I would also recommend starting with a much shorter pause than what you're currently using (or even trying without a pause at all at first), and then try making the pause longer if your MB Classic client seems to be responding too slowly.
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: MB Classic
« Reply #4 on: February 06, 2015, 07:19:17 PM »
@nime5ter

Thanks that was it.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: MB Classic
« Reply #5 on: February 06, 2015, 10:05:11 PM »
Thanks for the update.
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)