fix(library): preserve indexed tracks when a full scan is incomplete

This commit is contained in:
zarzet
2026-09-28 12:13:17 +07:00
parent 4c2c356763
commit e3bec31b36
6 changed files with 86 additions and 11 deletions
+5 -1
View File
@@ -556,7 +556,11 @@ import UniformTypeIdentifiers
throw invalidArgumentsError(call.method)
}
let count = try coreBackend.scanLibraryFolderToNdjsonFile(folder: folderPath, output: outputPath)
return ["path": outputPath, "count": count]
guard let progress = parseJsonPayload(try coreBackend.getLibraryScanProgress()) as? [String: Any],
let errorCount = progress["error_count"] as? Int else {
throw invalidArgumentsError("scanLibraryFolderToNDJSONFile: missing scan summary")
}
return ["path": outputPath, "count": count, "error_count": errorCount]
case "scanLibraryFolderIncremental":
let args = call.arguments as! [String: Any]