From 0a6708009eeca7e15fe8d61d40ca80c488509412 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Mon, 6 Dec 2021 15:43:16 +0100 Subject: [PATCH] Miglioria Riprendi Visione --- platformcode/platformtools.py | 6 +++--- platformcode/xbmc_videolibrary.py | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index 92892344..c2d9c409 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -996,7 +996,7 @@ def play_video(item, strm=False, force_direct=False, autoplay=False): if not mediaurl: return # video information is obtained. - xlistitem = xbmcgui.ListItem(path=item.url) + xlistitem = xbmcgui.ListItem(item.title, path=item.url) xlistitem.setArt({"thumb": item.contentThumbnail if item.contentThumbnail else item.thumbnail}) set_infolabels(xlistitem, item, True) @@ -1387,7 +1387,7 @@ def set_player(item, xlistitem, mediaurl, view, strm): prevent_busy() if player_mode in [0,1]: if player_mode in [1]: - item.played_time = resume_playback(get_played_time(item)) + xlistitem.setProperty('StartOffset','{}'.format(resume_playback(get_played_time(item)))) logger.info('Player Mode:',['Direct', 'Bookmark'][player_mode]) # Add the listitem to a playlist @@ -1446,7 +1446,7 @@ def add_next_to_playlist(item): nfo_path = filetools.join(config.get_videolibrary_path(), config.get_setting("folder_tvshows"), next.strm_path.replace('strm','nfo')) if nfo_path and filetools.isfile(nfo_path): head_nfo, item_nfo = videolibrarytools.read_nfo(nfo_path) - nextItem = xbmcgui.ListItem(path=item_nfo.url) + nextItem = xbmcgui.ListItem(item_nfo.fulltitle, path=item_nfo.url) nextItem.setArt({"thumb": item_nfo.contentThumbnail if item_nfo.contentThumbnail else item_nfo.thumbnail}) set_infolabels(nextItem, item_nfo, True) nexturl = "plugin://plugin.video.kod/?" + next.tourl() diff --git a/platformcode/xbmc_videolibrary.py b/platformcode/xbmc_videolibrary.py index 4ea20b5b..98ab4aa4 100644 --- a/platformcode/xbmc_videolibrary.py +++ b/platformcode/xbmc_videolibrary.py @@ -52,9 +52,6 @@ def mark_auto_as_watched(item): except: pass try: total_time = xbmc.Player().getTotalTime() except: pass - if item.played_time and xbmcgui.getCurrentWindowId() == 12005: - xbmc.Player().seekTime(item.played_time) - item.played_time = 0 # Fix for Slow Devices mark_time = total_time * percentage difference = total_time - actual_time