| Crates.io | moosicbox_music_api_helpers |
| lib.rs | moosicbox_music_api_helpers |
| version | 0.1.4 |
| created_at | 2025-07-21 19:32:56.851493+00 |
| updated_at | 2025-07-21 19:32:56.851493+00 |
| description | MoosicBox music API helpers package |
| homepage | |
| repository | https://github.com/MoosicBox/MoosicBox |
| max_upload_size | |
| id | 1762522 |
| size | 95,757 |
Helper utilities for music API operations and scanning.
The MoosicBox Music API Helpers package provides:
Add this to your Cargo.toml:
[dependencies]
moosicbox_music_api_helpers = { path = "../music_api/helpers" }
# Enable scan functionality
moosicbox_music_api_helpers = {
path = "../music_api/helpers",
features = ["scan"]
}
use moosicbox_music_api_helpers::scan::{enable_scan, scan_enabled, scan};
use moosicbox_music_api::MusicApi;
// Enable scanning for a music API
enable_scan(&*music_api, &db).await?;
// Check if scanning is enabled
let enabled = scan_enabled(&*music_api, &db).await?;
// Trigger a scan operation
if enabled {
scan(&*music_api, &db).await?;
}
All operations return Result<T, moosicbox_music_api::Error> with comprehensive error handling:
scan: Enable scanning helper utilities