fix(sync): run watched sync when a scheduled --sync hits the running instance
The Windows daily-sync task launches `AeroFetch.exe --sync`, but the single- instance lock routes that relaunch to the `second-instance` handler whenever AeroFetch is already open. The handler only focused the window and looked for a link -- it never checked `isSyncLaunch(argv)` -- so the sync never ran. The daily auto-download of new watched-source uploads therefore did nothing for minimize- to-tray / always-on users (and the relaunch stole window focus each day). Add a `runWatchedSync` main->renderer push: on a `--sync` relaunch the handler now nudges the renderer to run syncWatched() instead of focusing, so the daily sync fires whether AeroFetch was closed or already running. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -105,6 +105,9 @@ export const IpcChannels = {
|
||||
scheduledSyncSet: 'sources:scheduled-sync-set',
|
||||
/** main → renderer push channel for live indexing progress */
|
||||
indexProgress: 'sources:index-progress',
|
||||
/** main → renderer: a scheduled `--sync` relaunch hit the running instance — run the
|
||||
* watched-source sync here instead of no-opping (Phase J) */
|
||||
runWatchedSync: 'sources:run-sync',
|
||||
// --- Built-in yt-dlp terminal (Phase N) ---
|
||||
terminalRun: 'terminal:run',
|
||||
terminalCancel: 'terminal:cancel',
|
||||
|
||||
Reference in New Issue
Block a user