InfoBarGenerics.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:enigma2 作者: Openeight 项目源码 文件源码
def startTimeshift(self, pauseService = True):
        print "enable timeshift"
        ts = self.getTimeshift()
        if ts is None:
            if not pauseService and not int(config.usage.timeshift_start_delay.value):
                self.session.open(MessageBox, _("Timeshift not possible!"), MessageBox.TYPE_ERROR, simple = True)
            print "no ts interface"
            return 0

        if ts.isTimeshiftEnabled():
            print "hu, timeshift already enabled?"
        else:
            if not ts.startTimeshift():
                # we remove the "relative time" for now.
                #self.pvrStateDialog["timeshift"].setRelative(time.time())

                if pauseService:
                    # PAUSE.
                    #self.setSeekState(self.SEEK_STATE_PAUSE)
                    self.activateTimeshiftEnd(False)
                    self.showTimeshiftState = True
                else:
                    self.showTimeshiftState = False

                # enable the "TimeshiftEnableActions", which will override
                # the startTimeshift actions
                self.__seekableStatusChanged()

                # get current timeshift filename and calculate new
                self.save_timeshift_file = False
                self.save_timeshift_in_movie_dir = False
                self.setCurrentEventTimer()
                self.current_timeshift_filename = ts.getTimeshiftFilename()
                self.new_timeshift_filename = self.generateNewTimeshiftFileName()
            else:
                print "timeshift failed"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号