def onPlayBackStarted(self): time = float(self.getTime()) print time if self.subtitle: if time > 1: print 'offset!' self.disableSubtitles() self.setSubtitles(subtitle_offset(self.subtitle, -time)) else: print 'no offset!' self.setSubtitles(self.subtitle)
def onPlayBackStarted(self): time = float(self.getTime()) if self.show_subtitle: bili._print_info(self.subtitle) if time > 1: bili._print_info('offset!') self.setSubtitles(subtitle_offset(self.subtitle, -time)) else: bili._print_info('no offset!') self.setSubtitles(self.subtitle) else: bili._print_info('No subtitle') self.showSubtitles(False)
def onPlayBackStarted(self): time = float(self.getTime()) if self.show_subtitle: _print_info(self.subtitle) if time > 1: _print_info('offset!') self.setSubtitles(subtitle_offset(self.subtitle, -time)) else: _print_info('no offset!') self.setSubtitles(self.subtitle) else: _print_info('No subtitle') self.showSubtitles(False)
def onPlayBackStarted(self): print_info('on playback started, set subtitle') time = float(self.getTime()) if self.show_subtitle: print_info(self.subtitle) if time > 1: print_info('offset! %d' % time) self.setSubtitles(subtitle_offset(self.subtitle, -time)) else: print_info('no offset!') self.setSubtitles(self.subtitle) else: self.showSubtitles(False)