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