Author Topic: Custom actions and a couple of issues  (Read 7803 times)

0 Members and 1 Guest are viewing this topic.

Adytum

  • $upporter
  • Jr. Member
  • *****
  • Posts: 10
  • Karma: 0
    • View Profile
Custom actions and a couple of issues
« on: February 18, 2012, 01:36:29 PM »
Hi, I just started using this magnificent program, and have discovered some pretty awesome possibilities already!  Thank you for this extremely well built program.

Now, I'm using this mainly with xbmc, Eden beta 1, and have a few problems.

I'm trying to assign a command to open the subtitle resync dialogue. The proper xbmc action is "subtitledelay". Neither the xbmc.execbuiltin or xbmc.send functions seem to work, when I put subtitledelay as the string. Any ideas?

Second, this might be a better fit for the xbmc forums, but what I'm trying to do is assign a command to open a favourite within xbmc. Neither activatewindow or playmedia seems to work. What can I use to identify the favourite?

Thirdly, a minor but weird issue is that using the "find tv show x-files" command shows the correct spelling in the notification, but only shows the show Weeds as a result! Searching for x-files normally in xbmc works fine.  ???

Thanks,

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom actions and a couple of issues
« Reply #1 on: February 18, 2012, 04:08:42 PM »
Hi Adytum,

Welcome to the forum.  I will do my best to answer your questions.

First one, about the subtitles.  you say
Quote
The proper xbmc action is "subtitledelay"
What exactly does that mean... "proper xbmc action"?  Can you provide some reference for this so that I can try to figure out how to do it?  Do you know of some other way to bring this up with a keypress for example?

As for favourites, I don't think there is a way to call a favourite "as a favourite".  That is, there is no way to say "open favourite number 5" or anything like that.  Each favourite would need to be called a different way, depending on what type of object it is.  It could be a playlist, addon, etc.  Most likely it can be accessed by using execbuiltin.  sometimes, by looking at your favourites xml we can find a way to call it using execbuiltin, but it is a bit of a black art.

The last issue "find x-files" is that XBMC doesn't actually provide us the tools to do a search through the http interface.  In the case of the "find tv show X" command we are looking at the name of the show and then trying to find the best SMS sequence that we can send to filter the list down to the correct item.  One possible solution would be to use a smart playlist instead, like the one used in the command "find unwatched episodes of X".  I will take a look to see if there is a modification I can make to the sms sequence that will account for this case.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom actions and a couple of issues
« Reply #2 on: February 18, 2012, 04:41:12 PM »
good news #1

I figured out the subtitle delay.  I'm glad you mentioned this because I didn't know there was an action for this.  I was looking for something similar for audio delay.

Here's a group with commands for both.

the syntax you were looking for was:

XBMC.ExecBuiltin      action(subtitledelay)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom actions and a couple of issues
« Reply #3 on: February 18, 2012, 07:12:40 PM »
please try 0.942 to see if it fixes your "X-Files" issue.

http://voxcommando.com/forum/index.php?topic=751.0

Adytum

  • $upporter
  • Jr. Member
  • *****
  • Posts: 10
  • Karma: 0
    • View Profile
Re: Custom actions and a couple of issues
« Reply #4 on: February 18, 2012, 08:03:10 PM »
Thanks a lot, and sorry for being vague in my description, but you figured it out.  :)

I actually figured out the last problem myself, in the favourites.xml each favourite is assigned a window id,which I can use with the ActivateWindow command.

I will test the new version and get back to you, but in the meantime, perhaps you can give me yet another tip about creating commands. I'm wondering if it's possible to create sort of a wait command, so that after an action is executed, VC waits for a certain amount of time before continuing performing the next one. What I'm trying to achieve is opening spotify radio within xbmc (which is a very experimental add on, but very,very awesome), which I have favourited, waiting until it is loaded, then using "go down" and "select" to start playing the spotify radio.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom actions and a couple of issues
« Reply #5 on: February 18, 2012, 08:14:23 PM »
VC.Pause

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom actions and a couple of issues
« Reply #6 on: February 18, 2012, 08:19:05 PM »
or you can use: VC.SetEventTimer

Adytum

  • $upporter
  • Jr. Member
  • *****
  • Posts: 10
  • Karma: 0
    • View Profile
Re: Custom actions and a couple of issues
« Reply #7 on: February 19, 2012, 10:54:07 AM »
Actually, the favourite thing didn't work after all. Still pretty new to this, so I might be confused with the syntaxes.
I copied the string from the @show recently added tv" action, and modofied the window. I have successfully mapped a keyboard key with it in the keymap.xml of xbmc userdata.

I'm using:

xbmc.send                 execbuiltin(ActivateWindow(10502,"musicdb://3/spotify:radio:1/"))

The history just returns unknown command.  ???

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom actions and a couple of issues
« Reply #8 on: February 19, 2012, 10:58:49 AM »
Like I said... "A black art."

The first thing to try is removing the url encoded quotation marks.

execbuiltin(ActivateWindow(10502,musicdb://3/spotify:radio:1/))

Adytum

  • $upporter
  • Jr. Member
  • *****
  • Posts: 10
  • Karma: 0
    • View Profile
Re: Custom actions and a couple of issues
« Reply #9 on: February 19, 2012, 11:34:20 AM »
Thanks, I'll try that and other modifications.

Yet another question, I hope you don't mind:

I'm using Loquendo tts voices, which comes with the option to add stress marks, special effects, intonation and so on. If I for example write "my cat died \item=cry", the voice cries at the nd of the sentence. However, I can't seem to get these to work in VC, the tts only says the literal commands. Anything that can be done here?

Also, what is the best way to update the program without losing my commands and settings?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom actions and a couple of issues
« Reply #10 on: February 19, 2012, 11:54:27 AM »
I could never figure out how to get those extra TTS functions to work.

to update, just install directly on top.  Just make a copy of your folder beforehand to be safe.

Adytum

  • $upporter
  • Jr. Member
  • *****
  • Posts: 10
  • Karma: 0
    • View Profile
Re: Custom actions and a couple of issues
« Reply #11 on: February 19, 2012, 01:35:07 PM »
It worked when I removed the quote marks.

This is brilliant, having most of the spotify functionality within xbmc, controllable by voice!  :D
Thanks a lot, James, you're really quick and helpful! Will be buying a license soon!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom actions and a couple of issues
« Reply #12 on: February 19, 2012, 02:48:41 PM »
can you please provide a link to the spotify addon you are using?

also, does it require a premium account to work?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom actions and a couple of issues
« Reply #13 on: February 19, 2012, 03:33:45 PM »
I'm using:

xbmc.send                 execbuiltin(ActivateWindow(...))

By the way, although it does the same thing you might find it a bit more pleasant to use:
 
XBMC.ExecBuiltin        ActivateWindow(...)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom actions and a couple of issues
« Reply #14 on: February 19, 2012, 03:40:15 PM »
I don't think you ever reported by on whether your find show X-Files was working in the new version.

I'm curious, however I think this is a better way to open TV shows that does not user filtering, but instead jumps directly to the correct show using the show ID #