mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-07-27 04:49:49 -07:00
29332b103e
- Merge the five separate sync change fragments (launcher command, UI window, close/quit fixes, active-session double-count, monthly rollup timezone) into a single changes/sync.md - Fold kana-pos-content-classification.md into annotation-noise-rule-table.md - Drop the now-stale Unreleased sections from CHANGELOG.md and docs-site/changelog.md - Tweak tsukihime-english-subtitles.md wording
2.7 KiB
2.7 KiB
type: added area: sync
- Added cross-machine immersion sync for stats and watch history over SSH, available as a window (Sync Stats & History in the tray menu, or
subminer sync --ui) and as a command (subminer sync <host>, with--push/--pullfor one-way insert-only transfers). The window keeps saved devices with per-host direction, one-click sync with live stage-by-stage progress and separate merge summaries for each machine, connection testing for first-time setup, cancellable runs while the app/stats server/playback is active, and manual database snapshots (create/merge/reveal/delete, stored in/tmp/subminer-db-snapshots/by default). Hosts with auto-sync enabled sync in the background on a configurable interval, including during playback, with results reported as overlay notifications; hosts synced from the CLI are remembered in<config dir>/sync-hosts.jsonand appear in the window automatically. - Merges are an insert-only union keyed on session UUIDs / video keys / series title keys, so re-syncing is idempotent and nothing is double-counted: each side snapshots its database (
VACUUM INTO) from a consistent WAL point, snapshots are exchanged withscp, and each machine merges the other's data transactionally. Lifetime totals and daily/monthly rollups are updated incrementally (history older than the session retention window is preserved), unfinished sessions are excluded until a later sync sees them finalized, and remote-only historical rollups are copied only when they do not conflict with retained local session history. Sync aborts on stats schema version mismatches and refuses to run while the stats daemon or a live mpv session is active (--forceoverrides). - The sync engine runs only inside the app: the sync window and the
subminer synccommand both delegate toSubMiner --sync-cli(headless, works over SSH with no display), so neither machine needs bun or the command-line launcher. A remote machine only needs SubMiner itself, found automatically as the app binary or via the launcher proxy. - Windows remotes are supported: sync detects the remote shell (POSIX, cmd, or PowerShell) and manages remote temp files through SubMiner itself (
sync --make-temp/--remove-temp) instead ofmktemp/rm, so a Windows machine with the built-in OpenSSH Server works as a sync remote, found in its default Windows install location automatically. - Added supporting flags:
subminer sync <host> --checktests the SSH connection and remote launcher availability without syncing,subminer sync --snapshot <file>and--merge <file>expose the underlying steps for manual transfers, andsubminer sync --jsonemits machine-readable NDJSON progress (the protocol the sync window consumes).