isEnabled()) return; try { $nas->syncVideo($this->video); // Audio/music uploads have no further processing jobs, so it's safe // to remove the local file immediately after a successful NAS push. // Video uploads must keep the local file until GenerateHlsJob finishes. if ($this->video->type === 'music') { $nas->deleteLocalVideo($this->video); } $nas->deleteLocalAssets($this->video); $nas->pruneLocalVideoDir($this->video); } catch (\Throwable $e) { \Illuminate\Support\Facades\Log::error( 'NasSyncVideoJob failed for video #' . $this->video->id . ' ("' . $this->video->title . '"): ' . $e->getMessage() . ' — local files kept. Run `php artisan nas:repair --force` to retry.' ); } } }