Expand description
Core data models for music metadata and playback.
This crate provides the fundamental data structures for representing music entities (artists, albums, tracks) and their metadata across different API sources. It supports both local library content and external music service APIs.
§Main Types
Artist- Represents a music artist with metadataAlbum- Represents a music album with versions and quality informationTrack- Represents a music track with audio properties and metadataApiSource- Identifies the source of music content (Library, Tidal, Qobuz, etc.)id::Id- Flexible identifier supporting both numeric and string IDs
§Features
api- Enables API-specific model types for serializationdb- Enables database integration and query support- Audio format support:
aac,flac,mp3,opus
Modules§
- api
- API-specific model types for serialization and network transfer.
- db
- Database integration for model types.
- id
- Flexible ID types supporting both numeric and string identifiers.
Structs§
- Album
- Represents a music album with its metadata and available versions.
- Album
Version Quality - Represents the audio quality characteristics of a specific album version.
- ApiSource
- An identifier for a music API source (e.g., “Library”, “Tidal”, “Qobuz”).
- ApiSources
- A collection of API source-ID pairs for tracking the same entity across multiple sources.
- Artist
- Represents a music artist.
- From
String ApiSource Error - Error returned when attempting to parse an unregistered API source.
- Playback
Quality - Playback quality settings for audio.
- Track
- Represents a music track with its metadata and audio properties.
- Track
Size - Represents the size of a track in a specific format.
- TryFrom
String Track ApiSource Error - Error returned when attempting to parse an invalid track API source string.
Enums§
- Album
Sort - Sort order for album listings.
- Album
Source - The API source for an album, either local or from an external API.
- Album
Type - The type/category of an album.
- Artist
Sort - Sort order for artist listings.
- Audio
Format - Audio format for tracks and albums.
- Track
ApiSource - The API source for a specific track, either local or from an external API.
Statics§
- API_
SOURCES - Global registry of all registered API sources.
- LIBRARY_
API_ SOURCE - The built-in “Library” API source representing locally stored music.
Functions§
- from_
extension_ to_ audio_ format - Converts a file extension to an audio format.