def updateQuickTimebar(self, scheduleTimer=True):
# move timebar to current time
timeDelta = datetime.datetime.today() - self.quickViewStartDate
control = self.getControl(self.C_QUICK_EPG_TIMEBAR)
if control:
(x, y) = control.getPosition()
try:
# Sometimes raises:
# exceptions.RuntimeError: Unknown exception thrown from the call "setVisible"
self.setControlVisible(self.C_QUICK_EPG_TIMEBAR,timeDelta.days == 0)
except:
pass
control.setPosition(self._secondsToXposition(timeDelta.seconds), y)
self.quicktimebar.setPosition(self._secondsToXposition(timeDelta.seconds), self.quickEpgView.top) #TODO use marker
if scheduleTimer and not xbmc.abortRequested and not self.isClosing:
threading.Timer(1, self.updateQuickTimebar).start()
评论列表
文章目录