Revert "Text fix dispositivi lenti"

This reverts commit 3d45a725f2.
This commit is contained in:
Alhaziel01
2020-12-19 11:17:19 +01:00
parent 3d45a725f2
commit d8592bc0ba
3 changed files with 12 additions and 15 deletions
+2 -4
View File
@@ -464,10 +464,8 @@ def play_from_library(item):
# logger.debug("item: \n" + item.tostring('\n')) # logger.debug("item: \n" + item.tostring('\n'))
# Try to reproduce an image (this does nothing and also does not give an error) # 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")))
# xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))) xbmc.Player().stop()
# xbmc.sleep(200)
# xbmc.Player().stop()
# 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" item.action = "findvideos"
+6 -7
View File
@@ -1012,6 +1012,12 @@ def set_player(item, xlistitem, mediaurl, view, strm):
item.options = {'strm':False, 'continue':False} item.options = {'strm':False, 'continue':False}
# logger.debug("item:\n" + item.tostring('\n')) # 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 # Moved del conector "torrent" here
if item.server == "torrent": if item.server == "torrent":
play_torrent(item, xlistitem, mediaurl) 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)) else: c.execute("INSERT INTO viewed (tmdb_id, episode, played_time) VALUES (?, ?, ?)", (ID, E, item.played_time))
conn.commit() conn.commit()
conn.close() 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()
+4 -4
View File
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import xbmc, xbmcgui, sys, channelselector, time import xbmc, xbmcgui, sys, channelselector, time, gc
from core.support import dbg, tmdb from core.support import dbg, typo, tmdb
from core.item import Item from core.item import Item
from core import channeltools, servertools, scrapertools from core import channeltools, servertools, scrapertools
from platformcode import platformtools, config, logger from platformcode import platformtools, config, logger
@@ -329,6 +329,7 @@ class SearchWindow(xbmcgui.WindowXMLDialog):
def makeItem(self, url): def makeItem(self, url):
item = Item().fromurl(url) item = Item().fromurl(url)
logger.debug(item)
channelParams = channeltools.get_channel_parameters(item.channel) channelParams = channeltools.get_channel_parameters(item.channel)
thumb = item.thumbnail if item.thumbnail else 'Infoplus/' + item.contentType.replace('show', '') + '.png' thumb = item.thumbnail if item.thumbnail else 'Infoplus/' + item.contentType.replace('show', '') + '.png'
logger.info('THUMB', thumb) logger.info('THUMB', thumb)
@@ -433,7 +434,7 @@ class SearchWindow(xbmcgui.WindowXMLDialog):
self.PROGRESS = self.getControl(PROGRESS) self.PROGRESS = self.getControl(PROGRESS)
self.COUNT = self.getControl(COUNT) self.COUNT = self.getControl(COUNT)
self.MAINTITLE = self.getControl(MAINTITLE) 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.SEARCH = self.getControl(SEARCH)
self.EPISODES = self.getControl(EPISODES) self.EPISODES = self.getControl(EPISODES)
self.EPISODESLIST = self.getControl(EPISODESLIST) self.EPISODESLIST = self.getControl(EPISODESLIST)
@@ -743,7 +744,6 @@ class SearchWindow(xbmcgui.WindowXMLDialog):
def playmonitor(self, server=None): def playmonitor(self, server=None):
if server: if server:
server.globalsearch = True server.globalsearch = True
platformtools.prevent_busy(server)
run(server) run(server)
try: try:
while not xbmc.Player().getTime() > 0: while not xbmc.Player().getTime() > 0: