Page 1 of 1

XBMC hangs when

Posted: Mon Feb 27, 2017 1:39 am
by Rocky5
Update:

For anyone wondering, there is an <onunload></onunload> varable we can use that I never new about untill 2 mins ago, what this does is allow you to do an action on a window close :evil:
( I new there was a onload, just not a onunload, there is also a background one )

OK found a workaround :D
Full script here.
https://github.com/Rocky5/XBMC4Kids/tre ... s/Synopsis

Code: Select all

	def onAction(self, action):
		if action.getButtonCode() == 257:
			if xbmc.getCondVisibility( 'Player.HasMedia' ): xbmc.executebuiltin('PlayerControl(stop)')
			self.close()

	def onClick(self, controlID):
		if (controlID == 10 and xbmc.getCondVisibility( 'Skin.HasSetting(SynopsisMode)' ) and xbmc.getCondVisibility( 'Skin.HasSetting(Synopsis)' ) ):
			self.close()
I try to use RunXBE with the below code for exit.
( RunXBE is run via <onclick> in a window xml )

Code: Select all

	def onAction(self, action):
		if action.getButtonCode() == 257:
			xbmc.executebuiltin('PlayerControl(stop)')
			xbmc.executebuiltin('SetFocus(50)')
			self.close()
It's the xbmc.****** that are causing the hang. But I need them to stop playback upon exiting of the script.

I never had this issue when I was just using a xml button focus workaround, but I moved the script over to its own thing and ran into this issue :evil:

I have also tried.

Code: Select all

	def onAction(self, action):
		if action == 10:
			self.close()

		if action == 92:
			self.close()
			
		if action.getButtonCode() == 257:
			xbmc.executebuiltin('PlayerControl(stop)')
			xbmc.executebuiltin('SetFocus(50)')
			self.close()
Basically as long as xbmc.executebuiltin is present it hangs.[/size]