Possibile fix crash con torrent
This commit is contained in:
@@ -1491,11 +1491,11 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
selection = 0
|
||||
|
||||
if selection >= 0:
|
||||
if item.autoplay: xbmc.Player().play(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")))
|
||||
xbmc.sleep(200)
|
||||
xbmc.Player().stop()
|
||||
# prevent_busy(item)
|
||||
# if item.autoplay: xbmc.Player().play(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")))
|
||||
# xbmc.sleep(200)
|
||||
# xbmc.Player().stop()
|
||||
prevent_busy(item)
|
||||
|
||||
mediaurl = urllib.quote_plus(item.url)
|
||||
torr_client = torrent_options[selection][0]
|
||||
@@ -1821,13 +1821,4 @@ def set_played_time(item):
|
||||
|
||||
|
||||
def prevent_busy(item):
|
||||
logger.debug()
|
||||
if item.action == 'play_from_library' or (not item.autoplay and not item.window):
|
||||
if item.globalsearch: xbmc.Player().play(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")))
|
||||
xbmc.sleep(200)
|
||||
xbmc.Player().stop()
|
||||
# xbmc.executebuiltin('Action(Stop)')
|
||||
# xbmc.sleep(500)
|
||||
# xbmc.Player().stop()
|
||||
# xbmc.sleep(500)
|
||||
xbmc.executebuiltin('Dialog.Close(all,true)')
|
||||
|
||||
@@ -6,7 +6,6 @@ import sys
|
||||
import threading
|
||||
import traceback
|
||||
import xbmc
|
||||
from platformcode import config
|
||||
|
||||
try:
|
||||
from urllib.parse import urlsplit
|
||||
@@ -18,6 +17,7 @@ try:
|
||||
xbmc.translatePath = xbmcvfs.translatePath
|
||||
except:
|
||||
pass
|
||||
from platformcode import config
|
||||
librerias = xbmc.translatePath(os.path.join(config.get_runtime_path(), 'lib'))
|
||||
sys.path.insert(0, librerias)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user