Expand description
The local music library: a SQLite database holding artists, releases, tracks (with paths to local audio files), playlists, likes and play history. This module is the only place that talks SQL; it returns the same data shapes the furumusic API used to serve, so the views did not have to change their model of the world.
All methods take &self and lock the connection internally, so an
Arc<Library> can be shared across blocking tasks.
Re-exports§
pub use models::ArtistCard;pub use models::ArtistDetail;pub use models::ArtistRef;pub use models::ArtistsPage;pub use models::Availability;pub use models::FederatedTrack;pub use models::LibraryFilters;pub use models::LibrarySourceMode;pub use models::PlaylistCard;pub use models::PlaylistDetail;pub use models::ReleaseCard;pub use models::ReleaseDetail;pub use models::ReleaseEdit;pub use models::SearchResults;pub use models::TrackEdit;pub use models::TrackItem;
Modules§
- import
- Importing audio files into the library: directory scanning, tag reading (via lofty) and cover extraction. Importing the same file again updates its metadata instead of duplicating it.
- models
- Data shapes the views render. They mirror what the furumusic API used to return, but every field is now filled from the local SQLite library.
Structs§
- Content
IdBackfill Stats - Export
Release - Export
Track - Federation
Export - Plain rows handed to the federation for publishing (see
federation_export). - Library
- Listen
History Entry - Local
Library Stats - Music
Relocation Stats - Network
Artist Image Request - Network
Artist Preview - Similarity
Storage Stats - Similarity
Track - Minimal durable-track row used by the background embedding pipeline.
- Stored
Embedding - One validated vector loaded from SQLite for the in-memory exact index.
Constants§
- LIKES_
PLAYLIST_ ID - The virtual “Liked tracks” playlist id, kept from the server API.
Functions§
- audio_
content_ id - Computes the stable Furumi content identifier for a local audio file.
- default_
db_ path - Default database location:
<data dir>/furumi/library.db. - storage_
name - Produces a filesystem-portable component for managed music paths.