Skip to main content

Crate furumi_library

Crate furumi_library 

Source
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§

ContentIdBackfillStats
ExportRelease
ExportTrack
FederationExport
Plain rows handed to the federation for publishing (see federation_export).
Library
ListenHistoryEntry
LocalLibraryStats
MusicRelocationStats
NetworkArtistImageRequest
NetworkArtistPreview
SimilarityStorageStats
SimilarityTrack
Minimal durable-track row used by the background embedding pipeline.
StoredEmbedding
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.