Author Topic: Some commands which are missing in frodo  (Read 3711 times)

0 Members and 1 Guest are viewing this topic.

Kickers56

  • Guest
Some commands which are missing in frodo
« on: February 08, 2013, 04:25:21 PM »
Some commands I used to have which in frodo I no longer know how to do are...

browse for artist
play album
play song by name but then list entire album in playlist that song is in.

Just had a play around with trying to do these with what we already have in 0.9.8.0 but I am stuck

Thought I would ask and maybe we could put commands here we may want whilst using frodo or things we have discovered.

If anyone knows...Thanks

kickers

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Some commands which are missing in frodo
« Reply #1 on: February 08, 2013, 06:38:58 PM »
Browse artist is included in the default config for Frodo.  You just need to say "browse artist XYZ".  I just tested it; works fine.

Play Album is missing.  Try this:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="440" name="Play album {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Playlist.Clear&amp;&amp;"playlistid": 0</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Playlist.Add&amp;&amp;"playlistid": 0,  "item": {"albumid": {1}}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Player.Open&amp;&amp;"item": {"playlistid": 0}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>GUI.ActivateWindow&amp;&amp;"window": "musicplaylist"</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Play album</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone">XbmcPayloads\xbmcAlbums.xml</payloadFromXML>
</command>

Quote
play song by name but then list entire album in playlist that song is in.
Hunh?

Kickers56

  • Guest
Re: Some commands which are missing in frodo
« Reply #2 on: February 08, 2013, 07:37:44 PM »
haha...never even noticed that you put a logic if then into play artist, so it can also do browse artist, clever.

album works great.

As for the third, I just wanted to know how, if I say play song billie jean, xbmc will automatically populate the rest of the playlist with all songs from that album, rather than just playing the one song then stopping.

I am understanding it abit more now between the phrases and values, thanks

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Some commands which are missing in frodo
« Reply #3 on: February 08, 2013, 10:01:21 PM »
Here's one option.  If you have asked for a song to play you can then ask for the rest of the album (although it will play the original song again too).

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="498" name="Play the rest of this album" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Player.GetItem&amp;&amp;"playerid":0, "properties":["albumid"]</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.ParseTokens</cmdType>
    <cmdString>{item.albumid}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Playlist.Add&amp;&amp;"playlistid": 0,  "item": {"albumid": {LastResult}}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Play the rest of this album</phrase>
</command>

There are other ways to skin this cat though...

Kickers56

  • Guest
Re: Some commands which are missing in frodo
« Reply #4 on: February 09, 2013, 05:17:15 PM »
Superb! I incorporated this in to the play song id command, works just how I wanted in one smooth command. ;D

Thanks again

Next thing thats stumping me if you have time, dont worry if not. I love the youtube search command and also use the spell dictionary command with this to spell out words not in the dictionary to search for. Now I have used the confirm command before, but am trying to do something that I am unsure whether I can do.

To say, search youtube for 'something' then have vc show the osd what I just said but then ask whether 'something' is correct. Basically to confirm the phrase, then search youtube if I accept.

Ive got the to show the phrase I just said, but dont know how to put the confirm in after.

Would be useful as sometimes it doesnt pick up what I say correctly.

What do you think? Possible?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Some commands which are missing in frodo
« Reply #5 on: February 09, 2013, 05:52:42 PM »
all you need to do is edit the youtube search command and put a check in the "confirm" check box.

then, any time you issue this command, it will check with you first before doing it.  That is the whole reason for having the confirm option!

If you also want to customize what happens when VC is waiting for confirmation on this command, take a look in the history window.  You will notice that when you issue a command that requires confirmation, a unique event is generated.  The Event name will be something like: Confirm.search youtube

You can use this event to trigger another command that prompts the user with TTS etc.  The event will also carry the payload, which in this case is the search term (payload dictionary), so your command could have an actions llike:

TTS.Speak  Are you sure you want to search youtube for {1} ?

If you are using OSD, it may overlap with the alternates that pop up or with the automatic confirm OSD that pops up. I'm not sure yet what the best solution is for this.  Normally I use TTS for this.


Kickers56

  • Guest
Re: Some commands which are missing in frodo
« Reply #6 on: February 11, 2013, 07:47:31 AM »
Thats great, I didn't know, or forgot more likely about the confirm events in the history window. All is right with the world. This function like so many others works amazingly.

Thank you, what a system.

Kickers56

  • Guest
Re: Some commands which are missing in frodo
« Reply #7 on: February 11, 2013, 12:55:38 PM »
Just a quick one this time, I would like to jump to a letter in my library, input keys doesn't work anymore using frodo with the command 'starts with (payload)'.

So using XBMC.Btn.KB I want to simulate holding shift then a letter, I have tried shift+({1}) and alot of different combinations similar but nothing, whats the proper string to input? If there is one?

Thanks again

kickers

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Some commands which are missing in frodo
« Reply #8 on: February 11, 2013, 01:50:32 PM »
 XBMC.Btn.KB does not support modifying keys with shift.  This is a limitation of XBMC and there is no way around it, other than convincing the devs at XBMC to implement it.  :biglaugh

Input keys, *should* still work as well as it ever did.  I'm not sure why it would not.  Are you using the one that came with VC 0.980 ?  Remember that XBMC needs to have focus for it to work.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Some commands which are missing in frodo
« Reply #9 on: February 11, 2013, 02:02:30 PM »
I just tried to get this working with sendkeys, inputkeys, and DxInput.KeyCombo and none of them work.

It looks like Frodo included some other "improvements" that I did not know about.  The smsfilter keys have also been disabled so you can pretty much forget about trying to get this to work.  There is an action to go to the "next letter" but that's about all I could find.

Kickers56

  • Guest
Re: Some commands which are missing in frodo
« Reply #10 on: February 11, 2013, 02:40:40 PM »
Well, inputkey.send works for me actually, just tried it with as you suggested having xbmc as the focus.

I just enabled the group that it came in, in 0.980

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Some commands which are missing in frodo
« Reply #11 on: February 11, 2013, 02:46:42 PM »
Well, inputkey.send works for me actually, just tried it with as you suggested having xbmc as the focus.

I just enabled the group that it came in, in 0.980
That's good.  Still does not work for me, but these things are all a bit voodoo to me.

Be careful about just enabling that group, since now you'll have conflicting move/scroll commands.