Author Topic: Possibly easy question on pre-installed xbmc commands  (Read 3801 times)

0 Members and 1 Guest are viewing this topic.

RickyD333

  • Contributor
  • ***
  • Posts: 71
  • Karma: 2
    • View Profile
Possibly easy question on pre-installed xbmc commands
« on: April 04, 2015, 02:05:45 PM »
I'm edit some of the phrases in the pre-installed xbmc commands. One of the things I wanted to add for the browsing of a specific movie title, is "search for..." or search for movie..." "search for movie title..." Currently I can just say "browse movie..." I can't quite seem to find the section in the command tree that would allow me to edit this. I thought it would be under "Kodi Navigation Buttons > Kodi Activate Windows & Browse > Browse Movie Titles. However, when I put in the commands I want there (which are pre-installed as "Browse Movie Titles" and "Browse Movies"), the command doesn't seem to work (I'm not getting rid of the pre-installed commands, just adding to them). XBMC just does something else that doesn't quite make sense.

Anyway, was hoping someone could help me on figuring out where I actually need to be making my edits.

Thanks!

- Ricky

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Possibly easy question on pre-installed xbmc commands
« Reply #1 on: April 04, 2015, 02:16:52 PM »
That is not the correct command to edit.  That sounds like the command that takes you to a view of all your movies.  It is not the same as searching for a particular movie.

There is a search function in the editor.  I recommend that you use it to search for a key word from the phrase for the command you are hoping to find.

http://voxcommando.com/mediawiki/index.php?title=Command_Tree_Editor#Search

Search for "movie" and you'll see all the commands that might be involved.  If you look at the actual phrases for each command instead of just the name of the command it should be easy to identify the one you want.
« Last Edit: April 04, 2015, 02:46:35 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Possibly easy question on pre-installed xbmc commands
« Reply #2 on: April 04, 2015, 02:41:20 PM »
Just be advised that if you modify that command or its phrasing without knowing what you are doing you will probably break it.

The first payload in that command is made up of the following choices:
Code: [Select]
Find, Browse, Show, Resume, Play
Which one you say will determine what the command does.  If you add the option of saying "search" without modifying the command macro, then it will actually play the movie from the beginning when you say search.


RickyD333

  • Contributor
  • ***
  • Posts: 71
  • Karma: 2
    • View Profile
Re: Possibly easy question on pre-installed xbmc commands
« Reply #3 on: April 04, 2015, 02:56:22 PM »
Yeah, so I figured by looking at those commands that I might have to change something. I opened up the command options and I figured I would have to add "search, search for" in the "if" section. I saved it, restarted Vox and it doesn't seem to work. So I'm looking into how to fix this. I'm still learning Vox, sorry.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Possibly easy question on pre-installed xbmc commands
« Reply #4 on: April 04, 2015, 03:43:33 PM »
I recommend you review http://voxcommando.com/mediawiki/index.php?title=Customizing_Commands, and the accompanying videos.

Typically, if you want to change the phrasing for a command, you edit the phrasing in the command tree. This is what VC *listens* for.

When you edit the command macro, this is how VoxCommando knows *what to do* when it understands a phrase.

In this particular case, the one command will do a few different things depending on which phrasing you use. So you need to do two things for this command:

1. Add your phrases "Search" and "Search for" to the command phrase in the command tree, then:

2. Go into the command's macro and add "Search, Search for" to the appropriate If statement. (The first one.)

VoxCommando won't listen for the terms "search" or "search for" unless you do step 1. Althought it's hard to tell, it sounds as though you only did step 2.
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)

RickyD333

  • Contributor
  • ***
  • Posts: 71
  • Karma: 2
    • View Profile
Re: Possibly easy question on pre-installed xbmc commands
« Reply #5 on: April 04, 2015, 07:29:54 PM »
I recommend you review http://voxcommando.com/mediawiki/index.php?title=Customizing_Commands, and the accompanying videos.

Typically, if you want to change the phrasing for a command, you edit the phrasing in the command tree. This is what VC *listens* for.

When you edit the command macro, this is how VoxCommando knows *what to do* when it understands a phrase.

In this particular case, the one command will do a few different things depending on which phrasing you use. So you need to do two things for this command:

1. Add your phrases "Search" and "Search for" to the command phrase in the command tree, then:

2. Go into the command's macro and add "Search, Search for" to the appropriate If statement. (The first one.)

VoxCommando won't listen for the terms "search" or "search for" unless you do step 1. Althought it's hard to tell, it sounds as though you only did step 2.

I believe I did both of those steps correctly. I am attaching a photo and my logs. The command I said was, "search for Apocalypse Now", but it did not do that.

I'm about to head out to work, so I won't be able to mess around with it until some time on Monday.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Possibly easy question on pre-installed xbmc commands
« Reply #6 on: April 04, 2015, 09:01:51 PM »
In the future, please post the xml for the command in question, instead of screen shots.  It's explained in the wiki in case you are not familiar with it.

I think you probably did it right, but it's hard to tell because your red circles are in the way of would-be commas, and I can't see the whole macro.  Stick with xml unless you need to show something that the xml cannot.

The way the command is set up you must say "search for" followed by one of : "movies", or "films", or "moving pictures" etc. and then the name of the movie.

The log shows that it is understanding a different command, the one where you can search for movies with a certain actor in them.  This should be obvious from your recognized speech text box and from the history window.

RickyD333

  • Contributor
  • ***
  • Posts: 71
  • Karma: 2
    • View Profile
Re: Possibly easy question on pre-installed xbmc commands
« Reply #7 on: April 09, 2015, 04:31:05 PM »
Okay, so I've been playing with this a bit more. Whenever I tried using my payload list command "search for" then "movie" followed by the movie title, Vox would perform a search for an actor that sounded similar to the movie title I gave (which is kinda funny seeing what it would pull up). But if I used the initial payload list command "browse" (this one is pre-installed) instead of "search for," (the one I inserted into the command payload) it would continue to work fine... until now.

I'm not sure what I may have done to break the command. I was attempting some problem solving. I thought maybe by removed the search by actor command the "search for" payload list command might work. I was assuming something might have been conflicting. So I copied the entire xml of the search by actor command and stored it in notepad for the moment, tried out my test, and still no luck. I even tried changing the payload list command to just a command phrase, but still no luck. I changed it back to a payload list command, pasted back in the search by actor command and everything, at least on the surface, appeared to be just as it was before I messed around with everything. But now not even when I say "browse" followed by "movie" followed by movie title, nothing comes up except for the little toast on the screen that shows the command I gave. The same is true for the search by actor command. I've attached an xml of the whole command and my log.

If there is anything else I need to include in this to clear up what's going on, let me know.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="821" name="Play Movie etc. {1} : {2}" 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>Find,Show,Browse,search,search for&amp;&amp;{1}</ifParams>
    <then>
      <action>
        <cmdType>XJson.Raw</cmdType>
        <params>
          <param>Playlist.Clear</param>
          <param>"playlistid": 1</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>XJson.Raw</cmdType>
        <params>
          <param>Playlist.Add</param>
          <param>"playlistid": 1, "item": {"movieid": {2}}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>XJson.Raw</cmdType>
        <params>
          <param>GUI.ActivateWindow</param>
          <param>"window": "videoplaylist"</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)Contains(B)</ifType>
    <ifParams>Resume&amp;&amp;{1}</ifParams>
    <then>
      <action>
        <cmdType>XJson.Raw</cmdType>
        <params>
          <param>Player.Open</param>
          <param>"item": { "movieid": {2} } , "options":{ "resume":true }</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>XJson.Raw</cmdType>
        <params>
          <param>Player.Open</param>
          <param>"item": { "movieid": {2} }</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <payloadList>Find, Browse, Show, Resume, Play, start, play the, search, search for</payloadList>
  <phrase>film, films, movie, movies, moving picture</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\xbmcMovieIDs.xml</payloadFromXML>
</command>

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Possibly easy question on pre-installed xbmc commands
« Reply #8 on: April 09, 2015, 04:37:44 PM »
Well, I don't follow everything you said but it sounds like you messed it up pretty thoroughly.  I recommend you go back to the default commands until you can figure out how it works.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Possibly easy question on pre-installed xbmc commands
« Reply #9 on: April 09, 2015, 04:51:24 PM »
The command you posted looks OK.

The log you posted does not appear to match the command you posted though.  In the log it seems clear that you are only using 1 payload for movies so this must be the log from when you tried to change the first payload list to phrases (no idea why you thought that would work  :o ).  The command you posted has two payloads, which it should.

Make sure you save and close your tree before testing newly edited commands.  If you are unsure after lots of messing about you can always clear the cache and then restart to make sure everything is rebuilt properly.

RickyD333

  • Contributor
  • ***
  • Posts: 71
  • Karma: 2
    • View Profile
Re: Possibly easy question on pre-installed xbmc commands
« Reply #10 on: April 09, 2015, 05:24:32 PM »
Hmmm, I'm going to keep tinkering. I need to make a career out of properly messing things up.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Possibly easy question on pre-installed xbmc commands
« Reply #11 on: April 09, 2015, 05:27:46 PM »
I think that's how most people get rich.  ::)