Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
#42 Output time offset not adjusted during single run
Browse files Browse the repository at this point in the history
  • Loading branch information
Michał Szymaniak committed Nov 11, 2021
1 parent eee5ce6 commit be5390d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion subsync/gui/syncwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ def onButtonSaveClick(self, event):

def saveSynchronizedSubtitles(self, path, enc=None, **kw):
enc = enc or settings().outputCharEnc or self.task.sub.enc or 'UTF-8'
self.sync.getSynchronizedSubtitles().save(path, encoding=enc, **kw)
subs = self.sync.getSynchronizedSubtitles()
if settings().outTimeOffset:
logger.info('adjusting timestamps by offset %.3f', settings().outTimeOffset)
subs.shift(s=settings().outTimeOffset)
subs.save(path, encoding=enc, **kw)

def selectOutputFpsIfNeeded(self, path):
if subtitle.isFpsBased(path):
Expand Down

0 comments on commit be5390d

Please sign in to comment.