Expand description
Music library scanning and indexing for MoosicBox.
This crate provides functionality for scanning music libraries from both local
filesystem sources and remote music API services (e.g., streaming platforms).
It discovers music files, extracts metadata, downloads artwork, and updates
the MoosicBox database with artists, albums, and tracks.
§Features
- Scan local music files with metadata extraction
- Scan remote music services via API integrations
- Progress tracking for long-running scan operations
- Artwork downloading and caching
- Database synchronization with deduplication
§Example
// Create a scanner for a specific origin
let scanner = Scanner::from_origin(db, ScanOrigin::Local).await?;
// Start scanning
scanner.scan(music_apis, db).await?;Re-exports§
pub use moosicbox_scan_models as models;
Modules§
- api
- HTTP API endpoints for music library scanning.
- db
- Database operations for scan locations and origins. Database operations for scan locations and origins.
- event
- Progress event types and listener registration for scan operations. Progress event types and listener registration for scan operations.
- local
- Local filesystem scanning functionality.
- music_
api - Music API scanning functionality for remote streaming services. Music API scanning functionality for remote streaming services.
- output
- Data structures and database update operations for scan results. Data structures and database update operations for scan results.
Structs§
- Scanner
- Manages scanning operations for music library sources.
Enums§
- Scan
Error - Errors that can occur during scanning operations.
Functions§
- add_
scan_ path - Adds a local filesystem path to the scan locations.
- cancel
- Cancels any ongoing scan operations.
- disable_
scan_ origin - Disables a scan origin in the database.
- enable_
scan_ origin - Enables a scan origin in the database.
- get_
scan_ origins - Retrieves all enabled scan origins from the database.
- get_
scan_ paths - Retrieves all configured local scan paths from the database.
- is_
scan_ origin_ enabled - Checks if a scan origin is enabled in the database.
- remove_
scan_ path - Removes a local filesystem path from the scan locations.
- run_
scan - Runs a scan for the specified origins (or all enabled origins if none specified).
Type Aliases§
- Scan
Origin - Type alias for track API sources used as scan origins.