addon/service: how to retrieve current menu(s)
#1
hi,
this is my 1st posting, some may know me from vdr-forum ...

i'm fooling around with a service-addon for xbmc but i've got the following problem:
i'd need to retrieve the items of the currently active menu / submenu (eg.: 'weather', 'music', 'videos', ... or, eg. when in 'videos': 'files', 'add-ons'). the whole thing should be skin-independent.

i've already read across the documentation for python modules xbmc/xbmcgui/xbmcplugin but couldn't find anything about that'd fit.

i already manage to retrieve a currently active filelist, position in it, a currently playing music/video-item + detailed informations, volume info, current window.
but no menus ...

greetings
/w
Reply
#2
update:
[x] current focused control: ok (did overlook System.CurrentControl)

still left:
is there a way to find the controls from left/right/up/down from current control object?

eg: currently active control: 'videos', left: eg 'music', 'weather', right: 'programs', ..., up: nothing, down: nothing, but 'add-ons' and 'files' are added
Reply
#3
I don't think so, based on this: http://forum.xbmc.org/showthread.php?tid=128526

If you could tell us more about what you're trying to accomplish, maybe we could come up with an alternative approach?
Reply
#4
thanks for that link. yes, it would go in the same direction:
controlling an lcd (gfx-display (using skinable graphlcd-base - known from VDR project)) via a client-server-infrastructure - the service-addon would be the client in this whole setup and send messages to the server (daemon) which would draw nice things on the display ...
Reply
#5
Since xbmc doesn't expose a way to get the possible destinations to python, I don't think this is going to be possible without skin based support.
Fortunately, it looks like what you'd need could have multiple uses. If you can get a skinner to help out and get a good system in place, I don't think you'd have much trouble getting other skin devs to follow suit.

I'm thinking window property that would indicate what navigation options you have would need to be added to each window.
Reply
#6
uhm. here skins doesn't mean xbmc skins!

skins in this context means that the output that is rendered by graphlcd-base and this output can be themed (and can have even more input sources than just xbmc) and is completely independent to xbmc-skins. therefore the add-on is a service and not a skin.
Reply
#7
Right, but xbmc skins have access to the information you need. You would need an xbmc skin to put the information some place you can get to it from python, such as a window property.

Then in your service addon, you can grab that information, parse it, and pipe it to your daemon
Reply
#8
but then it wouldn't be (xbmc-)skin-independent, would it?

i knew that i was posting a tricky question and that there may be no solution / possibility for the problem. but i hoped that i might have overlooked something ...
Reply
#9
Correct, the skin your users have would have to support that same method in order to use your addon. That's the only way I can see to get it to work. On the plus side though, since there are multiple benefits to having that information available to python, once you get the mechanics worked out, I'd be willing to bet a lot of the skinners would be willing to support it
Reply
#10
another question:

how can i retrieve the absolute sequential id of the currently highlighted container-entry? (eg. list view in a file folder).

Container.Position returns the relative position in the selection dialog (eg. if there is place for 14 elements, position will always be [0 .. 13], no matter if i'm on page 1 or 10.

Container.NumPages + Container.CurrentPage are not be helpful either ...
Reply

Logout Mark Read Team Forum Stats Members Help
addon/service: how to retrieve current menu(s)0