scan_library
Launch a library scan to discover new files, rescan the full library, or target specific folders, then monitor progress via scanner status.
Instructions
Start a file scan on a library (POST /api/v2/scan-files). 'scanFindNew' adds files not yet in the database, 'scanFresh' rescans everything from scratch, and 'scanFolderWatcher' scans a specific list of file paths. Scanning is asynchronous — poll get_scanner_status for progress.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Scan mode. scanFresh discards existing scan results for the library. | |
| path | No | Folder to scan, for scanFresh and scanFindNew. Defaults to the library's own folder. | |
| paths | No | Explicit list of file paths, required for scanFolderWatcher | |
| library_id | Yes | Library ID (dbID), from list_libraries |