Files
SubMiner/changes/launcher-sync-command.md
T

1.2 KiB

type: added area: launcher

  • Added subminer sync <host> to merge immersion stats and watch history between two machines over SSH, with --push and --pull for one-way insert-only transfers. Each side snapshots its database (VACUUM INTO), snapshots are exchanged with scp, and each machine merges the other's data as an insert-only union keyed on session UUIDs / video keys / series title keys, so re-syncing is idempotent and nothing is double-counted. Lifetime totals and daily/monthly rollups are updated incrementally (history older than the session retention window is preserved); remote-only historical rollups are copied only when they do not conflict with retained local session history. subminer sync --snapshot <file> and subminer sync --merge <file> expose the underlying steps for manual transfers. The command refuses to run while the stats daemon or a live mpv session is active (--force overrides), ignores stale mpv socket files, keeps the guard in place through local/remote merges, supplies standard SubMiner and Bun paths to non-interactive SSH commands, verifies the remote launcher starts, reports remote stderr on failures, and aborts on stats schema version mismatches.