Beispiel #1
0
 def detectFps(self):
     data = self.data
     if data.videoPath is not None:
         fpsInfo = File.detectFpsFromMovie(data.videoPath)
         if data.videoPath != fpsInfo.videoPath or data.fps != fpsInfo.fps:
             data.videoPath = fpsInfo.videoPath
             data.subtitles.changeFps(fpsInfo.fps)
             data.fps = fpsInfo.fps
             command = ChangeData(self.filePath, data, _("Detected FPS: %s") % data.fps)
             self._subtitleData.execute(command)
Beispiel #2
0
 def detectSelectedFilesFps(self):
     items = self.__fileList.selectedItems()
     for item in items:
         filePath = item.text(0)
         data = self._subtitleData.data(filePath)
         if data.videoPath is not None:
             fpsInfo = File.detectFpsFromMovie(data.videoPath)
             if data.videoPath != fpsInfo.videoPath or data.fps != fpsInfo.fps:
                 data.videoPath = fpsInfo.videoPath
                 data.subtitles.changeFps(fpsInfo.fps)
                 data.fps = fpsInfo.fps
                 command = ChangeData(filePath, data, _("Detected FPS: %s") % data.fps)
                 self._subtitleData.execute(command)