@@ -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"
|
||||
|
||||
@@ -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()
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user