Altri Fix alla riproduzione
This commit is contained in:
@@ -34,8 +34,8 @@ def mainlist(item):
|
||||
|
||||
|
||||
def live(item):
|
||||
itemlist = [item.clone(title=support.typo('La7', 'bold'), fulltitle='La7', url= host + '/dirette-tv', action='play', forcethumb = True),
|
||||
item.clone(title=support.typo('La7d', 'bold'), fulltitle='La7d', url= host + '/live-la7d', action='play', forcethumb = True)]
|
||||
itemlist = [item.clone(title=support.typo('La7', 'bold'), fulltitle='La7', url= host + '/dirette-tv', action='play', forcethumb = True, no_return=True),
|
||||
item.clone(title=support.typo('La7d', 'bold'), fulltitle='La7d', url= host + '/live-la7d', action='play', forcethumb = True, no_return=True)]
|
||||
return support.thumb(itemlist, live=True)
|
||||
|
||||
|
||||
|
||||
@@ -96,7 +96,8 @@ def live(item):
|
||||
forcethumb = True,
|
||||
urls=urls,
|
||||
plot=plot,
|
||||
action='play'))
|
||||
action='play',
|
||||
no_return=True))
|
||||
return support.thumb(itemlist, live=True)
|
||||
|
||||
def peliculas(item):
|
||||
|
||||
@@ -168,7 +168,7 @@ def live(item):
|
||||
channel = key['channel']
|
||||
itemlist.append(item.clone(title = support.typo(channel, 'bold'), fulltitle = channel, show = channel, url = key['video']['contentUrl'],
|
||||
thumbnail = key['transparent-icon'].replace("[RESOLUTION]", "256x-"), forcethumb = True , fanart = info[channel]['fanart'],
|
||||
plot = info[channel]['plot'], action = 'play'))
|
||||
plot = info[channel]['plot'], action = 'play', no_return=True))
|
||||
return support.thumb(itemlist, live=True)
|
||||
|
||||
|
||||
|
||||
@@ -1036,15 +1036,19 @@ def set_player(item, xlistitem, mediaurl, view, strm):
|
||||
logger.info("mediaurl=" + mediaurl)
|
||||
|
||||
if player_mode in [0,1]:
|
||||
if player_mode in [1]: prevent_busy(item)
|
||||
logger.info('Player Mode:' + ['Direct', 'Bookmark'][player_mode])
|
||||
prevent_busy(item)
|
||||
if player_mode in [1]:
|
||||
item.played_time = resume_playback(get_played_time(item))
|
||||
item.options['continue'] = True
|
||||
|
||||
logger.info('Player Mode:',['Direct', 'Bookmark'][player_mode])
|
||||
# Add the listitem to a playlist
|
||||
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
|
||||
playlist.clear()
|
||||
playlist.add(mediaurl, xlistitem)
|
||||
# Reproduce
|
||||
xbmc_player.play(playlist, xlistitem)
|
||||
# viewed(item, played_time)
|
||||
|
||||
if config.get_setting('trakt_sync'):
|
||||
from core import trakt_tools
|
||||
trakt_tools.wait_for_update_trakt()
|
||||
@@ -1067,7 +1071,7 @@ def set_player(item, xlistitem, mediaurl, view, strm):
|
||||
|
||||
# if it is a video library file send to mark as seen
|
||||
if strm or item.strm_path: item.options['strm'] = True
|
||||
if player_mode == 1: item.options['continue'] = True
|
||||
# if player_mode == 1: item.options['continue'] = True
|
||||
from platformcode import xbmc_videolibrary
|
||||
xbmc_videolibrary.mark_auto_as_watched(item)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ def mark_auto_as_watched(item):
|
||||
actual_time = 0
|
||||
total_time = 0
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
if item.options['continue']: item.played_time = platformtools.resume_playback(platformtools.get_played_time(item))
|
||||
# if item.options['continue']: item.played_time = platformtools.resume_playback(platformtools.get_played_time(item))
|
||||
|
||||
time_limit = time.time() + 30
|
||||
while not platformtools.is_playing() and time.time() < time_limit:
|
||||
@@ -91,7 +91,7 @@ def mark_auto_as_watched(item):
|
||||
|
||||
while platformtools.is_playing():
|
||||
xbmc.sleep(100)
|
||||
if not show_server and item.play_from != 'window':
|
||||
if not show_server and item.play_from != 'window' and not item.no_return:
|
||||
xbmc.sleep(700)
|
||||
xbmc.executebuiltin('Action(Back)')
|
||||
xbmc.sleep(500)
|
||||
|
||||
Reference in New Issue
Block a user