Home Menu Custom Items

Requests, suggestions, support, and everything else python / plugin related.
Post Reply
User avatar
byron
Posts: 582
Joined: Wed Jul 04, 2012 9:26 pm
Location: Illinois
Has thanked: 27 times
Been thanked: 96 times

Home Menu Custom Items

Post by byron »

I've been trying to incorporate custom home menu items into my skin via taking the 4.0 version and updating along lose lines. The actual code from the skin to do this for plugins or add-ons or whatever you want to call them is:

Code: Select all

<onclick>Skin.SetAddon(MusicSubMenuBtn1Path,xbmc.python.pluginsource)</onclick>
and it will not work because of (from debug log):

Code: Select all

00:52:10 M: 42229760   DEBUG: CApplication::OnKey: 256 pressed, action is 7
00:52:10 M: 42229760   DEBUG: CApplication::OnMessage : Translating Skin.SetAddon(MusicSubMenuBtn1Path,xbmc.python.pluginsource)
00:52:10 M: 42229760   DEBUG: CApplication::OnMessage : To Skin.SetAddon(MusicSubMenuBtn1Path,xbmc.python.pluginsource)
00:52:10 M: 42229760   ERROR: Keymapping error: no such action 'skin.setaddon(musicsubmenubtn1path,xbmc.python.pluginsource)' defined
SO...I've wasted enough time realizing that it's not going to work that way for now, although it would be MUCH easier than what I've been trying to do to hack this into a working addition to my/any skin. The reason this post is in this area is because it involves a script that I borrowed from XTV-SAF FOUND HERE. I was really hoping that some of you guys that know the current scripting methods might be able to help me fix this.

What the script allows is browsing for an add-on, placing it into said button control, and launching it from the button. Doesn't work anymore and here's why http://pastebin.ca/2330527. It gets everything lined up to work, but when you click the button...that's what you end up with. I don't think it would take much to make it work, any help would be awesome so thanks in advance if anyone can ---
skatulskijean
Posts: 1028
Joined: Wed Jul 04, 2012 8:01 am
Has thanked: 1 time
Been thanked: 148 times

Re: Home Menu Custom Items

Post by skatulskijean »

i hope i understand right what you mean!
on the last xtv-saf skin version for xbox (version 1.2) have you the solution to add plugin or scripts to the homescreen from a list !
The access to the list will go over the skin settings this is splited on scripts , musik plugins , video plugins simple why the location on xbmc4xbox is different!
on main xbmc all plugins , scripts, scriptmodule,skins can you access under one directory on xbmc4xbox not !
i think the solution from xtv-saf version 1.2 works for your skin to!

http://forum.xbmc.org/showthread.php?tid=59576

regards jan
User avatar
byron
Posts: 582
Joined: Wed Jul 04, 2012 9:26 pm
Location: Illinois
Has thanked: 27 times
Been thanked: 96 times

Re: Home Menu Custom Items

Post by byron »

Okay, I actually got it to work! I was using Xtv v2.0, but the scrips look the same on both versions as far as I can tell (same with the code). Yes you understood correctly what I was asking. The problem isn't being able to access the plugins, the problem is being able to access the plugins before they have been opened for the first time from the actual window they are in.

For exapmle, on my home menu there are several links to a4x...and on a fresh install you won't be able to access the plugin unless it has been previously opened at least once from xbmc/programs/plugins/a4x. Same with what I'm doing here, and I wasted a bunch of time because I forgot about that (not sure why it has to be that way). So what exactly is the logic behind this? Is there anyway to be able to access a plugin for the FIRST time from anywhere besides the directory in which it resides?

**EDIT**

I think I might have actually figured it out! The code that I borrowed from Xtv that sums up the scripts actions was just a bit off...

original:

>ActivateWindow($INFO[Skin.String(Custom1-pluginwindow)],plugin://$INFO[Skin.String(Custom1-pluginfolder)])<

diff:

>ActivateWindow($INFO[Skin.String(Custom1-pluginwindow)],plugin://$INFO[Skin.String(Custom1-pluginfolder)]/)<

replacing the missing forward slash seems to have done the trick, hopefully that's all it was. It's so easy to miss some of this stuff when you start dealing with scripts + combining strings + other strings

Thanks for the help,

byron
Post Reply