Resolve "Local collection trait and beets implementation" #9

Merged
wojtek merged 12 commits from 4---local-collection-trait-and-beets-implementation into main 2023-03-31 14:24:54 +02:00
2 changed files with 18 additions and 0 deletions
Showing only changes of commit 5ee8afc4c4 - Show all commits

View File

@ -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;

17
src/library/mod.rs Normal file
View File

@ -0,0 +1,17 @@
use std::path::Path;
use crate::ReleaseGroup;
/// Options for refining library queries.
pub struct Query {
albumartist: Option<String>,
artist: Option<String>,
album: Option<String>,
track: Option<u32>,
title: Option<String>,
}
/// Trait for interacting with the music library.
pub trait Library {
fn list(&self, album: bool, path: Path, format: &str, query: Query) -> Vec<ReleaseGroup>;
}