Esempio n. 1
0
 def selectOutputFpsIfNeeded(self, path):
     if subtitle.isFpsBased(path):
         with fpswin.FpsWin(self, self.task.sub.fps, self.task.ref.fps) as dlg:
             if dlg.ShowModal() == wx.ID_OK:
                 return dlg.getFps()
             else:
                 return -1 # FPS is needed but not provided
Esempio n. 2
0
    def onButtonSaveClick(self, event):
        path = self.saveFileDlg(self.task.ref.path)
        if path != None:
            try:
                self.saveSynchronizedSubtitles(path, overwrite=True)

            except pysubs2.exceptions.UnknownFPSError:
                with fpswin.FpsWin(self, self.task.sub.fps, self.task.ref.fps) as dlg:
                    if dlg.ShowModal() == wx.ID_OK:
                        self.saveSynchronizedSubtitles(path, fps=dlg.getFps(), overwrite=True)