Posts: 347
Joined: Nov 2011
2012-09-05, 10:43
(This post was last modified: 2012-09-05, 10:44 by mikey1234.)
As I have put loads of directory shortcuts in easynews plugin lets say your 15 pages in deep and you click the shortcut to go back to main menu for people to exit plugin they would have to click back constantly to go back to the start to exit
so i wanted to assign a listed item to click to exit
i have tried this as a function but does not work
Code:
def sys_exit():
exit=sys.exit()
return exit
is there another way ?
Posts: 347
Joined: Nov 2011
works like a charm
thank you
Posts: 646
Joined: May 2009
Reputation:
30
This works well but when exiting the plugin it takes you back out of the video addon listings and to the listing that shows 'Files, Video Add-ons"
Anyone know the path to set to so that when you exit the plugin you are back to video addon listings?
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
i know but i refuse to tell you. this is NOT the task of a plugin.
Posts: 347
Joined: Nov 2011
i found the answer eldorado but i wont post on this site
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
heh, just post it.. addons://sources/<type>
Posts: 347
Joined: Nov 2011
at first i found the keymap for home
Code:
xbmc.executebuiltin("XBMC.ActivateWindow(Home)")
but couldnt get back into plugin unless i went into another plugin then back into mine
instead done this and works great
Code:
def EXIT():
xbmc.executebuiltin("XBMC.Container.Update(path,replace)")
xbmc.executebuiltin("XBMC.ActivateWindow(Home)")
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
2012-09-07, 17:05
(This post was last modified: 2012-09-07, 17:07 by spiff.)
a plugin is a virtual file system entry, not a script. it should do nothing but act like a directory/file. The whole point of the ReplaceListing parameter to endOfDirectory is to solve this problem, i.e., don't push each page as a separate entry in the directory history.
Posts: 3,547
Joined: Sep 2009
Reputation:
106
Hey folks - sorry to dig up an old thread.
My plugin (a music chooser) - needs to exit and drop back to the calling window, which was my script (a music player - basically a windows that controls an external to xbmc audio player).
At the moment, if the user goes 'back' (i.e. backspace) out of the plugin - it goes back to the programs menu, - which is confusing as they then don't know how to get back to the player window - but if they 'exit' out of the plugin (i.e. escape) - it correctly drops back to the calling window.
Any ideas on a good way to fix this??
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a
*full debug log*.
Posts: 793
Joined: Oct 2010
Reputation:
17
Maybe listen for the action of the back space key?
Posts: 3,547
Joined: Sep 2009
Reputation:
106
How do you listen for an action in a plugin? I thought those were inherited methods from WindowXML? Isn't the plug in just run at display time and by the time you see it, it's already exit-ed?
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a
*full debug log*.
Posts: 793
Joined: Oct 2010
Reputation:
17
on my phone so I'll have to give you psuedo code
Get the current window id and use it to create a reference to the window. Use that to set it's on action.
Posts: 3,547
Joined: Sep 2009
Reputation:
106
Getting the window id is easy enough but I normally overload the methods in the WindowXML class def - how any hits on how I can do it from just a reference (windowid)?
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a
*full debug log*.