Test Fix pop-up server 2
This commit is contained in:
@@ -170,8 +170,8 @@ def run(item=None):
|
||||
xbmc.executebuiltin("Container.Update(%s?%s)" % (sys.argv[0], item.tourl()))
|
||||
|
||||
elif reload and item.channel == 'filmontv' and item.action == 'new_search':
|
||||
platformtools.fakeVideo()
|
||||
import xbmc
|
||||
platformtools.fakeVideo()
|
||||
return xbmc.executebuiltin("Container.Update(" + sys.argv[0] + "?" + item.tourl() + ")")
|
||||
else:
|
||||
# Checks if channel exists
|
||||
|
||||
@@ -1677,19 +1677,15 @@ def set_played_time(item):
|
||||
del db['viewed'][ID]
|
||||
|
||||
|
||||
def prevent_busy(item=None):
|
||||
if item and (not item.autoplay and item.channel != 'videolibrary' and not item.window):
|
||||
fakeVideo()
|
||||
else:
|
||||
def prevent_busy():
|
||||
xbmc.executebuiltin('Dialog.Close(all,true)')
|
||||
|
||||
|
||||
def fakeVideo(sleep = False):
|
||||
mediaurl = os.path.join(config.get_runtime_path(), "resources", "kod.mp4")
|
||||
xbmc.executebuiltin("PlayMedia(" + mediaurl + ")")
|
||||
if sleep:
|
||||
while is_playing():
|
||||
xbmc.sleep(sleep)
|
||||
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=mediaurl))
|
||||
while not is_playing():
|
||||
xbmc.sleep(200)
|
||||
xbmc.Player().stop()
|
||||
|
||||
|
||||
@@ -1716,7 +1712,7 @@ def serverWindow(item, itemlist):
|
||||
ENTER = 7
|
||||
EXIT = 10
|
||||
BACKSPACE = 92
|
||||
xbmc.executebuiltin('Dialog.Close(all,true)')
|
||||
prevent_busy()
|
||||
|
||||
class ServerWindow(xbmcgui.WindowXMLDialog):
|
||||
def start(self, item, itemlist):
|
||||
|
||||
Reference in New Issue
Block a user