Merge remote-tracking branch 'origin/master'

This commit is contained in:
marco
2020-01-09 22:46:06 +01:00
3 changed files with 14 additions and 10 deletions
-6
View File
@@ -467,9 +467,6 @@ def play_from_library(item):
if xbmc.getCondVisibility('Window.IsMedia') and not window_type == 1:
# Ventana convencional
xbmc.executebuiltin("Container.Update(" + sys.argv[0] + "?" + item.tourl() + ")")
if config.get_setting('next_ep') > 0 and item.contentType != 'movie':
from specials.nextep import afther_stop
afther_stop(item)
else:
# Ventana emergente
@@ -535,6 +532,3 @@ def play_from_library(item):
if (platformtools.is_playing() and item.action) or item.server == 'torrent' or autoplay.is_active(item.contentChannel):
break
if config.get_setting('next_ep') > 0 and item.contentType != 'movie':
from specials.nextep import afther_stop
afther_stop(item)
+8 -1
View File
@@ -756,6 +756,9 @@ def play_video(item, strm=False, force_direct=False, autoplay=False):
# Reproduce
xbmc_player.play(playlist, xlistitem)
if not item.launcher and (strm or item.strm_path) and config.get_setting('next_ep') > 0 and item.contentType != 'movie':
from specials.nextep import afther_stop
afther_stop(item)
else:
set_player(item, xlistitem, mediaurl, view, strm)
@@ -1099,7 +1102,7 @@ def set_player(item, xlistitem, mediaurl, view, strm):
download_and_play.download_and_play(mediaurl, "download_and_play.mp4", config.get_setting("downloadpath"))
return
elif config.get_setting("player_mode") == 0 or \
elif config.get_setting("player_mode") == 0 or\
(config.get_setting("player_mode") == 3 and mediaurl.startswith("rtmp")):
# Añadimos el listitem a una lista de reproducción (playlist)
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
@@ -1138,6 +1141,10 @@ def set_player(item, xlistitem, mediaurl, view, strm):
from platformcode import xbmc_videolibrary
xbmc_videolibrary.mark_auto_as_watched(item)
if not item.launcher and (strm or item.strm_path) and config.get_setting('next_ep') > 0 and item.contentType != 'movie':
from specials.nextep import afther_stop
afther_stop(item)
def torrent_client_installed(show_tuple=False):
# Plugins externos se encuentra en servers/torrent.json nodo clients
+6 -3
View File
@@ -58,11 +58,12 @@ def afther_stop(item):
Total = xbmc.Player().getTotalTime()
Actual = xbmc.Player().getTime()
Difference = Total - Actual
if Total > Actual >= Difference:
if Total > TimeFromEnd >= Difference:
play_next = True
except:
break
# from core.support import dbg; dbg()
if play_next:
play_next = False
season_ep = next_file.split('.')[0]
@@ -89,7 +90,8 @@ def afther_stop(item):
if nextDialog.stillwatching or nextDialog.continuewatching:
xbmc.Player().stop()
if normal_window:
sleep(0.5)
sleep(1)
logger.info('BACK STILL')
xbmc.executebuiltin('Action(Back)')
else:
item.no_window = True
@@ -97,7 +99,8 @@ def afther_stop(item):
play_from_library(item)
else:
if normal_window:
sleep(0.5)
sleep(1)
logger.info('BACK NOT STILL')
xbmc.executebuiltin('Action(Back)')
else:
item.no_window = True