From d8592bc0baec05c84eaecaaa5c0c5daa8793c319 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Sat, 19 Dec 2020 11:17:19 +0100 Subject: [PATCH] Revert "Text fix dispositivi lenti" This reverts commit 3d45a725f28d656422a7fcc6e7bdd34c33e45a9c. --- platformcode/launcher.py | 6 ++---- platformcode/platformtools.py | 13 ++++++------- specials/globalsearch.py | 8 ++++---- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/platformcode/launcher.py b/platformcode/launcher.py index db958c60..0dc5110f 100644 --- a/platformcode/launcher.py +++ b/platformcode/launcher.py @@ -464,10 +464,8 @@ def play_from_library(item): # 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) - # xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))) - # xbmc.sleep(200) - # xbmc.Player().stop() + xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))) + xbmc.Player().stop() # Modify the action (currently the video library needs "findvideos" since this is where the sources are searched item.action = "findvideos" diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index 41fd32de..25882fa6 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -1012,6 +1012,12 @@ def set_player(item, xlistitem, mediaurl, view, strm): item.options = {'strm':False, 'continue':False} # logger.debug("item:\n" + item.tostring('\n')) + # Prevent Busy + if not item.autoplay: + if item.globalsearch: xbmc.executebuiltin("PlayMedia(" + os.path.join(config.get_runtime_path(), "resources", "kod.mp4") + ")") + else: xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))) + xbmc.Player().stop() + # Moved del conector "torrent" here if item.server == "torrent": play_torrent(item, xlistitem, mediaurl) @@ -1435,10 +1441,3 @@ def set_played_time(item): else: c.execute("INSERT INTO viewed (tmdb_id, episode, played_time) VALUES (?, ?, ?)", (ID, E, item.played_time)) conn.commit() conn.close() - -def prevent_busy(item): - if not item.autoplay: - if item.globalsearch: xbmc.Player().play(os.path.join(config.get_runtime_path(), "resources", "kod.mp4")) - else: xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))) - xbmc.sleep(200) - xbmc.Player().stop() \ No newline at end of file diff --git a/specials/globalsearch.py b/specials/globalsearch.py index 4669eba9..b11dd11a 100644 --- a/specials/globalsearch.py +++ b/specials/globalsearch.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -import xbmc, xbmcgui, sys, channelselector, time -from core.support import dbg, tmdb +import xbmc, xbmcgui, sys, channelselector, time, gc +from core.support import dbg, typo, tmdb from core.item import Item from core import channeltools, servertools, scrapertools from platformcode import platformtools, config, logger @@ -329,6 +329,7 @@ class SearchWindow(xbmcgui.WindowXMLDialog): def makeItem(self, url): item = Item().fromurl(url) + logger.debug(item) channelParams = channeltools.get_channel_parameters(item.channel) thumb = item.thumbnail if item.thumbnail else 'Infoplus/' + item.contentType.replace('show', '') + '.png' logger.info('THUMB', thumb) @@ -433,7 +434,7 @@ class SearchWindow(xbmcgui.WindowXMLDialog): self.PROGRESS = self.getControl(PROGRESS) self.COUNT = self.getControl(COUNT) self.MAINTITLE = self.getControl(MAINTITLE) - self.MAINTITLE.setText(config.get_localized_string(30993).replace('...', '') % '"%s"' % self.item.text) + self.MAINTITLE.setText(typo(config.get_localized_string(30993).replace('...', '') % '"%s"' % self.item.text, 'bold')) self.SEARCH = self.getControl(SEARCH) self.EPISODES = self.getControl(EPISODES) self.EPISODESLIST = self.getControl(EPISODESLIST) @@ -743,7 +744,6 @@ class SearchWindow(xbmcgui.WindowXMLDialog): def playmonitor(self, server=None): if server: server.globalsearch = True - platformtools.prevent_busy(server) run(server) try: while not xbmc.Player().getTime() > 0: