--- a/dist/client.js +++ b/dist/client.js @@ -244,8 +244,14 @@ // NOTE: RomM 5.0 removed the POST /api/tasks/run endpoint. // Scans are now managed through RQ workers and require background job management. // Use the RomM web UI for scans and metadata updates. - async runScan() { - throw new Error("Scan endpoint removed in RomM 5.0. Use the RomM web UI to trigger library scans."); + async runScan(scanType = "quick") { + // RomM 5.4 restored library scans behind POST /api/tasks/scan (ScanPayload: + // type, platforms, platform_fs_slugs, roms_ids, apis). The stub above predates + // that. "quick" indexes new/changed files; "full" re-hashes the whole library. + return this.request("/api/tasks/scan", { + method: "POST", + body: JSON.stringify({ type: scanType }), + }); } async runMetadataScan() { throw new Error("Metadata scan endpoint removed in RomM 5.0. Use the RomM web UI to trigger metadata updates.");