def service(self):
util.info("SC Service Started")
#dialog = sctop.dialog.textviewer('heading', 'Prosim podporte vyvoj pluginu na adrese: http://stream-cinema.online/')
if sctop.player is None:
sctop.player = myPlayer.MyPlayer(parent=self)
try:
sleep_time = int(self.getSetting("start_sleep_time")) * 1000 * 60
except:
sleep_time = self.sleep_time
pass
util.debug("[SC] start delay: %s" % str(sleep_time))
start = 0
while not xbmc.abortRequested and start < sleep_time:
self._player()
start += 1000
sctop.sleep(1000)
del start
util.debug("[SC] start sleep end")
try:
self.last_run = float(self.cache.get("subscription.last_run"))
except:
self.last_run = time.time()
self.cache.set("subscription.last_run", str(self.last_run))
pass
util.debug("[SC] last_rum: %s" % str(self.last_run))
if not xbmc.abortRequested and time.time() > self.last_run:
self.evalSchedules()
self.sleep_time = 1000
while not xbmc.abortRequested:
self._player()
self._sheduler()
sctop.sleep(self.sleep_time)
del sctop.player
util.info("[SC] Shutdown")
评论列表
文章目录