feat(subsync): keep a one-time backup when replacing subtitles in place

Auto mode rewrites the active subtitle from one keypress with replace on by
default. The first in-place rewrite now copies the original to <file>.orig
(not a subtitle extension, so mpv autoload and sidecar discovery skip it).
Replacements also write through symlinks and keep the file's permissions.
This commit is contained in:
sudacode committed 2026-11-28 03:17:10 -08:00
1 parent 24b25287bd
commit 3b3c6581f4
5 files changed
+128 -28

No files matched your search

+7 -7
View File
@@ -525,13 +525,13 @@ Built-in alass-based subtitle alignment works out of the box with no extra sync
Optional external [`alass`](https://github.com/kaegi/alass) and [`ffsubsync`](https://github.com/smacke/ffsubsync) binaries are also supported in the guided modal when installed.
| Key | Default | What it does |
| ------------------------ | -------- | --------------------------------------------------------------------------------------------------------- |
| `subsync.mode` | `"auto"` | `"auto"` syncs immediately and opens the guided modal only when needed; `"manual"` always opens the modal |
| `subsync.alass_path` | `""` | Optional external `alass` path. Empty auto-discovers from `PATH` |
| `subsync.ffsubsync_path` | `""` | Optional external `ffsubsync` path. Empty auto-discovers from `PATH` |
| `subsync.ffmpeg_path` | `""` | `ffmpeg` path used to extract embedded tracks and audio speech. Empty auto-discovers from `PATH` |
| `subsync.replace` | `true` | Overwrite the subtitle file. When off, write `<name>_retimed.<ext>` |
| Key | Default | What it does |
| ------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `subsync.mode` | `"auto"` | `"auto"` syncs immediately and opens the guided modal only when needed; `"manual"` always opens the modal |
| `subsync.alass_path` | `""` | Optional external `alass` path. Empty auto-discovers from `PATH` |
| `subsync.ffsubsync_path` | `""` | Optional external `ffsubsync` path. Empty auto-discovers from `PATH` |
| `subsync.ffmpeg_path` | `""` | `ffmpeg` path used to extract embedded tracks and audio speech. Empty auto-discovers from `PATH` |
| `subsync.replace` | `true` | Overwrite the subtitle file, keeping the original as `<file>.orig` on the first overwrite. When off, write `<name>_retimed.<ext>` |
### AniList