diff --git a/src/lib.rs b/src/lib.rs index 88c424c..78af023 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,7 @@ use serde::{Deserialize, Serialize}; use uuid::Uuid; pub mod database; +pub mod library; /// [MusicBrainz Identifier](https://musicbrainz.org/doc/MusicBrainz_Identifier) (MBID). pub type Mbid = Uuid; diff --git a/src/library/mod.rs b/src/library/mod.rs new file mode 100644 index 0000000..3183450 --- /dev/null +++ b/src/library/mod.rs @@ -0,0 +1,17 @@ +use std::path::Path; + +use crate::ReleaseGroup; + +/// Options for refining library queries. +pub struct Query { + albumartist: Option, + artist: Option, + album: Option, + track: Option, + title: Option, +} + +/// Trait for interacting with the music library. +pub trait Library { + fn list(&self, album: bool, path: Path, format: &str, query: Query) -> Vec; +}