Offline-tolerant music-video merge

The merge no longer refuses when NAS is unreachable. DB changes always
run; per-side file operations are best-effort. When the NAS rename can't
happen it's recorded in a new pending_nas_moves table, and nas:auto-sync
drains the queue (rename + best-effort parent prune) once NAS is back,
retaining attempts/last_error on failure. Also plugs missing isEnabled()
guards on renameNasPath and deleteFolder so the merge cleanup path can't
hang on smbclient timeouts.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
ghassanandClaude Opus 4.7 committed 2026-07-31 03:27:52 +03:00
1 parent fcb752dd76
commit 847020fd02
4 files changed
+101 -12

No files matched your search

+2
View File
@@ -1235,6 +1235,7 @@ class NasSyncService
public function deleteFolder(string $nasRelPath): void
{
if (! $this->isEnabled()) return; // fail-fast when NAS unreachable
$cfg = $this->cfg();
$target = escapeshellarg($this->smbTarget($cfg));
$cred = escapeshellarg($this->smbCredential($cfg));
@@ -1335,6 +1336,7 @@ class NasSyncService
*/
public function renameNasPath(string $oldNasRelPath, string $newNasRelPath): void
{
if (! $this->isEnabled()) return; // fail-fast when NAS unreachable
$cfg = $this->cfg();
$target = escapeshellarg($this->smbTarget($cfg));
$cred = escapeshellarg($this->smbCredential($cfg));