| Crates.io | moosicbox_app_models |
| lib.rs | moosicbox_app_models |
| version | 0.1.4 |
| created_at | 2025-07-21 20:02:24.060841+00 |
| updated_at | 2025-07-21 20:02:24.060841+00 |
| description | MoosicBox App models package |
| homepage | |
| repository | https://github.com/MoosicBox/MoosicBox |
| max_upload_size | |
| id | 1762577 |
| size | 77,907 |
Data models and structures for MoosicBox native applications.
The MoosicBox App Models package provides:
Add this to your Cargo.toml:
[dependencies]
moosicbox_app_models = { path = "../app/models" }
# Optional: Enable music API authentication integration
moosicbox_app_models = {
path = "../app/models",
features = ["music-api-api"]
}
use moosicbox_app_models::Connection;
let connection = Connection {
name: "Home Server".to_string(),
api_url: "https://moosicbox.local:8686".to_string(),
};
use moosicbox_app_models::MusicApiSettings;
let tidal_settings = MusicApiSettings {
id: "tidal".to_string(),
name: "Tidal".to_string(),
logged_in: true,
supports_scan: false,
scan_enabled: false,
run_scan_endpoint: None,
auth_method: Some(auth_method),
};
use moosicbox_app_models::DownloadSettings;
let download_settings = DownloadSettings {
download_locations: vec![
(1, "/home/user/Music".to_string()),
(2, "/mnt/storage/Music".to_string()),
],
default_download_location: Some("/home/user/Music".to_string()),
};
music-api-api: Enable integration with MoosicBox music API authentication