- Fix Raiplay
- Fix Animesaturn - Fix Animeuniverse - Alcuni Fix alla riproduzione
This commit is contained in:
@@ -463,20 +463,21 @@ def play_from_library(item):
|
||||
logger.debug()
|
||||
# logger.debug("item: \n" + item.tostring('\n'))
|
||||
|
||||
# Try to reproduce an image (this does nothing and also does not give an error)
|
||||
platformtools.prevent_busy(item)
|
||||
|
||||
# Modify the action (currently the video library needs "findvideos" since this is where the sources are searched
|
||||
# Modify the action (currently the video library needs "findvideos" since this is where the sources are searched
|
||||
item.action = "findvideos"
|
||||
|
||||
window_type = config.get_setting("window_type", "videolibrary")
|
||||
# and launch kodi again
|
||||
if xbmc.getCondVisibility('Window.IsMedia') and not window_type == 1:
|
||||
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4")))
|
||||
xbmc.Player().stop()
|
||||
# Conventional window
|
||||
item.window = True
|
||||
xbmc.executebuiltin("Container.Update(" + sys.argv[0] + "?" + item.tourl() + ")")
|
||||
|
||||
else:
|
||||
# Pop-up window
|
||||
# platformtools.prevent_busy(item)
|
||||
from specials import videolibrary
|
||||
p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(60683))
|
||||
p_dialog.update(0, '')
|
||||
@@ -489,7 +490,6 @@ def play_from_library(item):
|
||||
if nfo_path and filetools.isfile(nfo_path):
|
||||
from core import videolibrarytools
|
||||
head_nfo, item_nfo = videolibrarytools.read_nfo(nfo_path)
|
||||
item_nfo.window = True
|
||||
played_time = platformtools.get_played_time(item_nfo)
|
||||
else: played_time = 0
|
||||
|
||||
|
||||
@@ -24,13 +24,13 @@ from platformcode import logger, config
|
||||
addon = config.__settings__
|
||||
addon_icon = os.path.join( addon.getAddonInfo( "path" ),'resources', 'media', "logo.png" )
|
||||
|
||||
class XBMCPlayer(xbmc.Player):
|
||||
# class XBMCPlayer(xbmc.Player):
|
||||
|
||||
def __init__(self, *args):
|
||||
pass
|
||||
# def __init__(self, *args):
|
||||
# pass
|
||||
|
||||
|
||||
xbmc_player = XBMCPlayer()
|
||||
xbmc_player = xbmc.Player()
|
||||
|
||||
|
||||
def dialog_ok(heading, message):
|
||||
@@ -1037,14 +1037,18 @@ def set_player(item, xlistitem, mediaurl, view, strm):
|
||||
|
||||
if player_mode in [0,1]:
|
||||
prevent_busy(item)
|
||||
logger.info('Player Mode:' + ['Direct', 'Bookmark'][player_mode])
|
||||
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