Test Busy 2
This commit is contained in:
@@ -1348,7 +1348,7 @@ def set_player(item, xlistitem, mediaurl, view, strm):
|
|||||||
logger.info("mediaurl=" + mediaurl)
|
logger.info("mediaurl=" + mediaurl)
|
||||||
|
|
||||||
if player_mode in [0,1]:
|
if player_mode in [0,1]:
|
||||||
# prevent_busy(item)
|
prevent_busy(item)
|
||||||
if player_mode in [1]:
|
if player_mode in [1]:
|
||||||
item.played_time = resume_playback(get_played_time(item))
|
item.played_time = resume_playback(get_played_time(item))
|
||||||
|
|
||||||
@@ -1449,7 +1449,7 @@ def play_torrent(item, xlistitem, mediaurl):
|
|||||||
selection = 0
|
selection = 0
|
||||||
|
|
||||||
if selection >= 0:
|
if selection >= 0:
|
||||||
# prevent_busy(item)
|
prevent_busy(item)
|
||||||
|
|
||||||
mediaurl = urllib.quote_plus(item.url)
|
mediaurl = urllib.quote_plus(item.url)
|
||||||
torr_client = torrent_options[selection][0]
|
torr_client = torrent_options[selection][0]
|
||||||
@@ -1777,15 +1777,12 @@ def set_played_time(item):
|
|||||||
|
|
||||||
def prevent_busy(item):
|
def prevent_busy(item):
|
||||||
logger.debug()
|
logger.debug()
|
||||||
# from core.support import dbg;dbg()
|
if not item.autoplay and not item.window:
|
||||||
if not item.autoplay and not item.window and item.action == 'play_from_library':
|
if item.globalsearch: xbmc.Player().play(os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))
|
||||||
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4")))
|
else: xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4")))
|
||||||
# else: xbmc.Player().play(os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))
|
|
||||||
# first wait the fake video to start
|
|
||||||
# while not is_playing():
|
|
||||||
# logger.debug('wait for play')
|
|
||||||
# pass
|
|
||||||
# then wait a little more
|
|
||||||
xbmc.sleep(200)
|
xbmc.sleep(200)
|
||||||
# and then stop it
|
|
||||||
xbmc.Player().stop()
|
xbmc.Player().stop()
|
||||||
|
# xbmc.executebuiltin('Action(Stop)')
|
||||||
|
# xbmc.sleep(500)
|
||||||
|
# xbmc.Player().stop()
|
||||||
|
# xbmc.sleep(500)
|
||||||
@@ -789,7 +789,7 @@ class SearchWindow(xbmcgui.WindowXML):
|
|||||||
|
|
||||||
|
|
||||||
def play(self, server=None):
|
def play(self, server=None):
|
||||||
server.globalsearch = True
|
|
||||||
platformtools.prevent_busy(server)
|
platformtools.prevent_busy(server)
|
||||||
server.window = True
|
server.window = True
|
||||||
|
server.globalsearch = True
|
||||||
return run(server)
|
return run(server)
|
||||||
|
|||||||
Reference in New Issue
Block a user