PDA

View Full Version : Is there any way to catch a plugin exiting normally ?


Voinage
2008-12-15, 03:39
I would quite like to catch when a plugin called with the ActivateWindow() exits
then redirect the window flow.

Have tried via window id but it`s always the same window 10024 videofiles.

Basically it doesn`t default to the plugin directory it was called from so i need to send it back.

As always any help from the chaps would be appreciated.
Cheers Vin

spiff
2008-12-15, 12:00
hmm. tricky one. the only dirty way i can think of is to monitor container.folderpath. i do not think you have the ability to intercept the action as it is sent with a destination parameter (windowid).

if i understand what you want to accomplish correctly, i think you will have to do this inside your "mother" plugin, i.e. you will have to have your mother plugin handle everything and have it call the other plugins from python (you can do a getdirectory() on the plugin path, then simply pass the returned results on. this would however require you to implement some url handling, e.g. plugin://video/motherplugin/someotherplugin/<possibly more> would have to be translated to plugin://video/someotherplugin/<possibly more>, then done a getdirectory() on.

setback with this method is that it requires all the other plugins to be installed as separates in xbmc as well. if this isnt acceptable you will have to take it one step further and actually call the plugins directly in python. this might not be pretty as it will probably require changes to them plugins :/

Voinage
2008-12-15, 13:57
Haven`t tried with the GetDirectory() call.

I have the structure already coded ,feeding plugins from a format file to the select dialog in the main-mother-plugin which monitors the selection and calls the ActivateWindow() for the selected plugin.

It`s working very well apart from the called plugin exit, which defaults to a hidden directory i would rather not show - for neatness.

I could just release it like that but it`s not what i intended - so it isn`t good enough.

Thanks Spiff, will fiddle with the command and see where i end up.

Rest easy.

No good ! there must be a way to catch the Info() output for python stopped or the GetDirectory fail then force something else.