Ulteriore Fix Riproduzione

This commit is contained in:
Alhaziel01
2021-11-05 17:14:05 +01:00
parent 6b03659b81
commit f1523e7467
4 changed files with 13 additions and 9 deletions

View File

@@ -470,9 +470,10 @@ def play_from_library(item):
# logger.debug("item: \n" + item.tostring('\n'))
# xbmc.Player().play(os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))
if not item.autoplay:
platformtools.fakeVideo()
platformtools.prevent_busy()
# if not item.autoplay:
# platformtools.fakeVideo()
platformtools.prevent_busy(item)
itemlist=[]

View File

@@ -1386,7 +1386,7 @@ def set_player(item, xlistitem, mediaurl, view, strm):
logger.info("mediaurl=" + mediaurl)
if player_mode in [0,1]:
prevent_busy()
prevent_busy(item)
if player_mode in [1]:
item.played_time = resume_playback(get_played_time(item))
@@ -1473,7 +1473,6 @@ def torrent_client_installed(show_tuple=False):
def play_torrent(item, xlistitem, mediaurl):
logger.debug()
import time
from servers import torrent
torrent_options = torrent_client_installed(show_tuple=True)
@@ -1505,6 +1504,7 @@ def play_torrent(item, xlistitem, mediaurl):
torrent.elementum_download(item)
else:
# xbmc.executebuiltin("PlayMedia(" + torrent_options[selection][1] % mediaurl + ")")
if (item.fromLibrary and item.play_from == 'window') or item.window:
xlistitem.setPath(torrent_options[selection][1] % mediaurl)
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
@@ -1822,7 +1822,10 @@ def set_played_time(item):
del db['viewed'][ID]
def prevent_busy():
def prevent_busy(item=None):
if item and (not item.autoplay and item.channel != 'videolibrary' and not item.window):
fakeVideo()
else:
xbmc.executebuiltin('Dialog.Close(all,true)')

View File

@@ -100,7 +100,7 @@ def mark_auto_as_watched(item):
xbmc.sleep(700)
xbmc.executebuiltin('Action(ParentDir)')
xbmc.sleep(500)
# from core.support import dbg;dbg()
if next_episode and next_episode.next_ep and config.get_setting('next_ep') < 3:
from platformcode.launcher import run
run(next_episode)

View File

@@ -812,7 +812,7 @@ class SearchWindow(xbmcgui.WindowXML):
def play(self, server=None):
platformtools.prevent_busy()
platformtools.prevent_busy(server)
server.window = True
server.globalsearch = True
return run(server)