Fix parziale autoplay con Torrent
This commit is contained in:
+2
-2
@@ -103,7 +103,7 @@ def start(itemlist, item):
|
|||||||
pass
|
pass
|
||||||
# sleep(3)
|
# sleep(3)
|
||||||
try:
|
try:
|
||||||
if platformtools.is_playing() or autoplay_elem.server == 'torrent':
|
if platformtools.is_playing():
|
||||||
PLAYED = True
|
PLAYED = True
|
||||||
break
|
break
|
||||||
except:
|
except:
|
||||||
@@ -119,7 +119,7 @@ def start(itemlist, item):
|
|||||||
max_intents_servers[videoitem.server.lower()] = max_intents
|
max_intents_servers[videoitem.server.lower()] = max_intents
|
||||||
|
|
||||||
# If there are no items in the list, it is reported
|
# If there are no items in the list, it is reported
|
||||||
if autoplay_elem == autoplay_list[-1]:
|
if autoplay_elem == autoplay_list[-1] and autoplay_elem.server != 'torrent':
|
||||||
platformtools.dialog_notification('AutoPlay', config.get_localized_string(60072) % name)
|
platformtools.dialog_notification('AutoPlay', config.get_localized_string(60072) % name)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -1478,7 +1478,6 @@ def play_torrent(item, xlistitem, mediaurl):
|
|||||||
from servers import torrent
|
from servers import torrent
|
||||||
|
|
||||||
torrent_options = torrent_client_installed(show_tuple=True)
|
torrent_options = torrent_client_installed(show_tuple=True)
|
||||||
# from core.support import dbg;dbg()
|
|
||||||
if len(torrent_options) == 0:
|
if len(torrent_options) == 0:
|
||||||
from platformcode import elementum_download
|
from platformcode import elementum_download
|
||||||
install = elementum_download.download()
|
install = elementum_download.download()
|
||||||
@@ -1492,9 +1491,11 @@ def play_torrent(item, xlistitem, mediaurl):
|
|||||||
selection = 0
|
selection = 0
|
||||||
|
|
||||||
if selection >= 0:
|
if selection >= 0:
|
||||||
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")))
|
||||||
xbmc.sleep(200)
|
xbmc.sleep(200)
|
||||||
xbmc.Player().stop()
|
xbmc.Player().stop()
|
||||||
|
# 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]
|
||||||
@@ -1509,7 +1510,6 @@ def play_torrent(item, xlistitem, mediaurl):
|
|||||||
torrent.elementum_download(item)
|
torrent.elementum_download(item)
|
||||||
else:
|
else:
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
# xbmc.Player().play(torrent_options[selection][1] % mediaurl)
|
|
||||||
xbmc.executebuiltin("PlayMedia(" + torrent_options[selection][1] % mediaurl + ")")
|
xbmc.executebuiltin("PlayMedia(" + torrent_options[selection][1] % mediaurl + ")")
|
||||||
|
|
||||||
# torrent.mark_auto_as_watched(item)
|
# torrent.mark_auto_as_watched(item)
|
||||||
@@ -1827,3 +1827,7 @@ def prevent_busy(item):
|
|||||||
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()
|
||||||
|
# xbmc.executebuiltin('Action(Stop)')
|
||||||
|
# xbmc.sleep(500)
|
||||||
|
# xbmc.Player().stop()
|
||||||
|
# xbmc.sleep(500)
|
||||||
Reference in New Issue
Block a user