Author Topic: Play Music Videos  (Read 4532 times)

0 Members and 1 Guest are viewing this topic.

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Play Music Videos
« on: December 03, 2014, 09:36:31 PM »
VC 2.125
XBMC: Gotham 13.2

I would like  to ask VC to play my music videos and searching the forum found an old xml that I have trying to adapt.
VC recognizes the command and shows onscreen and also speaking. However the music video does not play. As this is an old xml, can it still be adjusted? The attached log indicates the error(s) received. Thanks for any help.

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<!--C:\Users\HTServer\Desktop\Files2Share\VcGroup_XBMC music videos.xml-->
<!--This commandGroup xml file was exported from VoxCommando-->
<VoiceCommands version="2.1.2.5">
    <commandGroup open="False" name="XBMC music videos" enabled="True" prefix="" priority="0" requiredProcess="" description="">
        <command id="253" name="play musicvideo" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>XBMC.ExecBuiltin</cmdType>
                <params>
                    <param>ActivateWindow(Videos,MusicVideoTitles,return)</param>
                </params>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>TTS.Speak</cmdType>
                <params>
                    <param>playing music video {1}</param>
                </params>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>XBMC.Send</cmdType>
                <params>
                    <param>queryvideodatabase(select strpath,strfilename from musicvideoview where c00 like '{1}')</param>
                </params>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>Results.RegEx</cmdType>
                <params>
                    <param>&lt;field&gt;(.*?)&lt;/field&gt;</param>
                </params>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>XBMC.Send</cmdType>
                <params>
                    <param>PlayFile({Match.1}{Match.2})</param>
                </params>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>play</phrase>
            <phrase>music video</phrase>
            <payloadFromXML phraseOnly="True" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\xbmcMusicVideos.xml</payloadFromXML>
        </command>
    </commandGroup>
</VoiceCommands>
« Last Edit: December 05, 2014, 05:26:28 PM by lja »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Play Music Videos
« Reply #1 on: December 03, 2014, 10:19:11 PM »
That's ancient and won't work.  It would be much easier to adapt one of the new commands to play music videos than to try to work from this one.

Where did you get the payloadXML file from?

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: Play Music Videos
« Reply #2 on: December 03, 2014, 10:38:06 PM »
Thanks. I manually prepared the payload.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Play Music Videos
« Reply #3 on: December 03, 2014, 10:39:45 PM »
This simple command will work but you will need the correct payloadXML file which is not generated by default as far as I know.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.2.5-->
<command id="1149" name="Play music video {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Player.Open</param>
      <param>"item" : {"musicvideoid" : {1} }</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Speak</cmdType>
    <params>
      <param>Now playing {PF.1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Play music video</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\xbmcMusicVideos.xml</payloadFromXML>
</command>

To generate the payloadXML file you need to make sure you have a row in your xSQL plugin settings table with the following values:

Type: Video
Query: select idMVideo,c00 from musicvideo
Filename: xbmcMusicVideos

If you are using the xMySql plugin it will be something similar.

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: Play Music Videos
« Reply #4 on: December 04, 2014, 12:50:13 AM »
Thanks again. I am getting a xjson error as indicated in the attached. However I am not sure it is related to the above. Also music videos do not play. VC recognizes the command with onscreen indication and speech. Appreciate any suggestions.
« Last Edit: December 05, 2014, 12:54:01 PM by lja »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Play Music Videos
« Reply #5 on: December 04, 2014, 08:05:08 AM »
There is no indication in this log that you attempted to use this command.

The command I posted was tested and works perfectly if you use the correct payloadXML file.

Please upload a log file in which you actually give the voice command so we can see what is happening.

Start VC
Make sure VC Logging is enabled.
Issue the voice command.
Close VC
Upload the log.
« Last Edit: December 04, 2014, 08:32:57 PM by jitterjames »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Play Music Videos
« Reply #6 on: December 04, 2014, 12:06:45 PM »
To generate the payloadXML file you need to make sure you have a row in your xSQL plugin settings table with the following values:

Type: Video
Query: select idMVideo,c00 from musicvideo
Filename: xbmcMusicVideos

See http://voxcommando.com/forum/index.php?topic=1603.msg14025#msg14025 for screen capture of the plugin settings that you need to edit (the image does NOT show the values that James explains above).

Then click "SAVE AND GENERATE" to generate the new music video payload xml file.
« Last Edit: December 06, 2014, 10:14:48 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)

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: Play Music Videos
« Reply #7 on: December 04, 2014, 09:06:26 PM »
Thanks. I was setting this up on my test Windows 7 PC and it appears that the xbmcpayload xml is not saving (xSQL) when I clicked save and Generate. Only a blank file appears. While I have not given up on finding the reason, I transferred the same group from my test PC to my HTPC Windows 8 and it worked as expected.  It appears therefore that there is a problem on my test PC which I will continue to investigate.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Play Music Videos
« Reply #8 on: December 04, 2014, 09:57:25 PM »
Well of course you need to have music videos in your XBMC library for it to work.

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: Play Music Videos
« Reply #9 on: December 04, 2014, 11:44:16 PM »
Yes. I do. There are music videos in my xbmc library.
« Last Edit: December 05, 2014, 12:56:16 PM by lja »

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: Play Music Videos
« Reply #10 on: December 05, 2014, 12:50:16 PM »
I have tried using V 2.107 and music videos worked as expected without any changes. Attached are two logs from V 2.125 and V 2.107

« Last Edit: December 05, 2014, 05:27:15 PM by lja »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Play Music Videos
« Reply #11 on: December 05, 2014, 01:12:27 PM »
The differences between the two logs indicate that the version of VC is not the only variable that you're changing. That will make it more difficult to isolate the problem using just these logs with no information about your setup in general.

Can you please clarify:

1. Are you running both of these instances of VC on the same computer, or is one on one computer, and the other on a different machine?

2. Is XBMC installed on the same machine as VC in both cases?

3. Your command configuration appears to be different in the two log files. For example, in the 2.125 log, your "launch XBMC" command is doing all kinds of weird extra things like streaming a playlist (not in XBMC(?!?) but in VLC, it looks like) and then minimizing windows and changing system volume and focusing new windows, and a bunch of other things, and then there are some empty actions etc. In the other log, the "launch XBMC" looks more standard, and works properly.

4. In your 2.125 installation, are you generally having problems with XBMC commands, or just the new play music video command? (If so, perhaps you should review the VC installation tutorial for setting up VC with XBMC to make sure you have all the settings correct in both programs.)

5. In that 2.125 installation, has it properly generated your payload XML file for the music videos yet? There would be no way for that command to work until such time as the payload XML is properly generated. In other words, there would be no point in even trying the command as long as the payload XML file is empty.
« Last Edit: December 05, 2014, 01:34:55 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: Play Music Videos
« Reply #12 on: December 05, 2014, 03:45:57 PM »
The differences between the two logs indicate that the version of VC is not the only variable that you're changing. That will make it more difficult to isolate the problem using just these logs with no information about your setup in general.

Can you please clarify:

1. Are you running both of these instances of VC on the same computer, or is one on one computer, and the other on a different machine?

2. Is XBMC installed on the same machine as VC in both cases?

3. Your command configuration appears to be different in the two log files. For example, in the 2.125 log, your "launch XBMC" command is doing all kinds of weird extra things like streaming a playlist (not in XBMC(?!?) but in VLC, it looks like) and then minimizing windows and changing system volume and focusing new windows, and a bunch of other things, and then there are some empty actions etc. In the other log, the "launch XBMC" looks more standard, and works properly.

4. In your 2.125 installation, are you generally having problems with XBMC commands, or just the new play music video command? (If so, perhaps you should review the VC installation tutorial for setting up VC with XBMC to make sure you have all the settings correct in both programs.)

5. In that 2.125 installation, has it properly generated your payload XML file for the music videos yet? There would be no way for that command to work until such time as the payload XML is properly generated. In other words, there would be no point in even trying the command as long as the payload XML file is empty.

Thanks for your response nime5ter

1.Both instances of VC are on same computer

2.XBMC is installed on same computer as VC in both instances

3.The configuration in 2.125 is the same as on my HTPC which is running 2.107 and music videos works as intended. I do have some cleaning up  to do.

4.In 2.125, I have no problems with XBMC commands. Only with the new play music video command

5.The log for 2.125 is as previously requested by James and I followed the suggested approach in producing it. I did miss that request before as I did not see the edit. Unfortunately the payload XML is not being generated. I recognize that this is necessary for the command to work and that is why I have been trying to determine the reason behind the non generation.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Play Music Videos
« Reply #13 on: December 05, 2014, 04:05:01 PM »
The log does not show what is happening when you try to generate the XML for XBMC using the xSQL plugin.

There is no difference between the two version logs that I can see except that in one case you have a valid payloadXML file and in one you don't.

So in version 2.125 what is probably happening is that you have configured the xSQL plugin incorrectly,, or you have forgotten to generate xml, or you you are running it on a different machine from the other version.

When you click "Save and Generate" you should get a message window with a summary of how many items of each type were found.  If it is saying that it found 0 music videos, then that is your problem.

If you are actually running these both on the same system, then I suggest you send me a backup of your configuration for each one so I can have a look.

On the main VC menu choose "File", and then "Backup Current Configuration" and this will create a .zip file.  Name the files so I know which is which and email them to me. Use myusername@gmail.com.

You may post them to the forum if you prefer but maybe you have some sensitive info that you don't want to be public.


lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: Play Music Videos
« Reply #14 on: December 05, 2014, 04:14:21 PM »
The log does not show what is happening when you try to generate the XML for XBMC using the xSQL plugin.

There is no difference between the two version logs that I can see except that in one case you have a valid payloadXML file and in one you don't.

So in version 2.125 what is probably happening is that you have configured the xSQL plugin incorrectly,, or you have forgotten to generate xml, or you you are running it on a different machine from the other version.

When you click "Save and Generate" you should get a message window with a summary of how many items of each type were found.  If it is saying that it found 0 music videos, then that is your problem.

If you are actually running these both on the same system, then I suggest you send me a backup of your configuration for each one so I can have a look.

On the main VC menu choose "File", and then "Backup Current Configuration" and this will create a .zip file.  Name the files so I know which is which and email them to me. Use myusername@gmail.com.

You may post them to the forum if you prefer but maybe you have some sensitive info that you don't want to be public.

@jitterjames

I did a clean install of VC 2.125. Zips on the way.