예제 #1
0
 def previous_menu(self):
     onback = self.window.getProperty('%i_onback' % self.control_id)
     if onback:
         xbmc.executebuiltin(onback)
     else:
         self.close()
         wm.pop_stack()
예제 #2
0
 def previous_menu(self, control_id):
     onback = self.getProperty("%i_onback" % control_id)
     if onback:
         xbmc.executebuiltin(onback)
     else:
         self.close()
         wm.pop_stack()
예제 #3
0
	def play(self, url, listitem, window=False):
		super(VideoPlayer, self).play(item=url, listitem=listitem, windowed=False, startpos=-1)
		for i in range(30):
			if xbmc.getCondVisibility('VideoPlayer.IsFullscreen'):
				if window and window.window_type == 'dialog':
					wm.add_to_stack(window)
					window.close()
					self.wait_for_video_end()
					return wm.pop_stack()
			xbmc.sleep(1000)
예제 #4
0
 def play_from_button(self, url, listitem, window=False, type='', dbid=0):
     if dbid != 0:
         item = '{"%s": %s}' % (type, dbid)
     else:
         item = '{"file": "%s"}' % url
     Utils.get_kodi_json(method='Player.Open', params='{"item": %s}' % item)
     for i in range(90):
         if xbmc.getCondVisibility('VideoPlayer.IsFullscreen'):
             if window and window.window_type == 'dialog':
                 wm.add_to_stack(window)
                 window.close()
                 self.wait_for_video_end()
                 return wm.pop_stack()
         xbmc.sleep(1000)
 def play(self, url, listitem, window=False):
     super(VideoPlayer, self).play(item=url,
                                   listitem=listitem,
                                   windowed=False,
                                   startpos=-1)
     xbmc.sleep(1000)
     for i in range(120):
         if self.isPlayingVideo():
             if window and window.window_type == 'dialog':
                 wm.add_to_stack(window)
                 window.close()
                 self.wait_for_video_end()
                 return wm.pop_stack()
         xbmc.sleep(1000)
예제 #6
0
 def play_from_button(self, url, listitem, window=False, type='', dbid=0):
     Utils.show_busy()
     if dbid != 0:
         item = '{"%s": %s}' % (type, dbid)
         Utils.get_kodi_json(method='Player.Open',
                             params='{"item": %s}' % item)
     else:
         item = '{"file": "%s"}' % url
         xbmc.executebuiltin('RunPlugin(%s)' % url)
     for i in range(90):
         xbmc.log(str(xbmcgui.getCurrentWindowDialogId()) + '===>OPENINFO',
                  level=xbmc.LOGNOTICE)
         if xbmcgui.getCurrentWindowDialogId(
         ) > 11999 and xbmcgui.getCurrentWindowDialogId() < 12999:
             Utils.hide_busy()
         if xbmc.getCondVisibility('VideoPlayer.IsFullscreen'):
             if window and window.window_type == 'dialog':
                 wm.add_to_stack(window)
                 window.close()
                 self.wait_for_video_end()
                 return wm.pop_stack()
         xbmc.sleep(1000)