Adding Addons to keymap and favourites

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
eriksmith200 Offline
Senior Member
Posts: 242
Joined: Aug 2005
Reputation: 0
Post: #1
How can I add an add-on to favourites.xml in Dharma Beta 4?

I've tried this:
<favourite name="Apple Movie Trailers Lite" thumb="special://home/addons/plugin.video.apple.movie.trailers.lite/icon.png">RunScript(special://home/addons/plugin.video.apple.movie.trailers.lite/addon.py)</favourite>

but when I start this from favourites I get an error: script failed: addon.py

When I start the apple trailers lite script from video addons it runs without problems.
find quote
amet Offline
Retired Team-Kodi Member
Posts: 4,113
Joined: Jul 2009
Reputation: 41
Location: Novi Sad / Dubai
Post: #2
eriksmith200 Wrote:How can I add an add-on to favourites.xml in Dharma Beta 4?

I've tried this:
<favourite name="Apple Movie Trailers Lite" thumb="special://home/addons/plugin.video.apple.movie.trailers.lite/icon.png">RunScript(special://home/addons/plugin.video.apple.movie.trailers.lite/addon.py)</favourite>

but when I start this from favourites I get an error: script failed: addon.py

When I start the apple trailers lite script from video addons it runs without problems.

go to video addons, select apple trailers lite script, bring up the context meny("c" on the keyboard) and add it to favorites.... that should work

Always read the XBMC_Online_Manual,Frequently_Asked_Questions and search the forum before posting.
For troubleshooting and bug reporting use -> Log_file.
find quote
eriksmith200 Offline
Senior Member
Posts: 242
Joined: Aug 2005
Reputation: 0
Post: #3
Amet Wrote:go to video addons, select apple trailers lite script, bring up the context meny("c" on the keyboard) and add it to favorites.... that should work

doh! I was thinking xbmc still needs xml hacking, thanks for the tip Wink
find quote
jhsrennie Offline
Team-XBMC Developer
Posts: 7,236
Joined: Nov 2008
Reputation: 119
Location: Chester, UK
Post: #4
Incidentally, once you've added the addon to your favourites it's easy to define a key mapping for it. If you edit favourites.xml you'll see something like:

<favourite name="MCERemote">ActivateWindow(10001, "plugin://plugin.program.mceremote/")</favourite>

To map this to e.g. ctrl-A use:

<a mod="ctrl">ActivateWindow(10001,"plugin://plugin.program.mceremote/")</a>

Adding the addon to the favourites then editing favourites.xml is the only way I know to get the number for the first arguament to ActivateWindow.

JR
find quote
MrWolf Offline
Junior Member
Posts: 23
Joined: Nov 2009
Reputation: 0
Post: #5
In addition to this issue, I'd like to map a key on my Harmony remote to the subtitle script. I used to have this in 9.11 (Bierdopje subtitle script), but it doesn't seem to work in Dharma beta 4.

I've added the following line to Harmony.xml in the keymaps-dir.

<obc15>RunScript(/home/xbmc/.xbmc/addons/script.xbmc.subtitles/default.py)</obc15>

Other actions seem to work fine, but I can't get scripts (or addons) to work this way...
find quote
amet Offline
Retired Team-Kodi Member
Posts: 4,113
Joined: Jul 2009
Reputation: 41
Location: Novi Sad / Dubai
Post: #6
MrWolf Wrote:In addition to this issue, I'd like to map a key on my Harmony remote to the subtitle script. I used to have this in 9.11 (Bierdopje subtitle script), but it doesn't seem to work in Dharma beta 4.

I've added the following line to Harmony.xml in the keymaps-dir.

<obc15>RunScript(/home/xbmc/.xbmc/addons/script.xbmc.subtitles/default.py)</obc15>

Other actions seem to work fine, but I can't get scripts (or addons) to work this way...

<obc15>RunScript(script.xbmc.subtitles)</obc15> should be enough

not sure what "obc15" represents though

Always read the XBMC_Online_Manual,Frequently_Asked_Questions and search the forum before posting.
For troubleshooting and bug reporting use -> Log_file.
find quote
MrWolf Offline
Junior Member
Posts: 23
Joined: Nov 2009
Reputation: 0
Post: #7
Thanks, that indeed did the trick!

FYI, <obc15> is a buttoncode for the Harmony-remote.
find quote