various: remove dead code; fix skipped tests

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I9100489be899f9e9fbd32f6aca3080196a6a6964
This commit is contained in:
raf 2026-02-05 00:18:02 +03:00
commit cfdc3d0622
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
18 changed files with 1445 additions and 28 deletions

View file

@ -1,7 +1,10 @@
//! Metadata enrichment from external sources.
pub mod books;
pub mod googlebooks;
pub mod lastfm;
pub mod musicbrainz;
pub mod openlibrary;
pub mod tmdb;
use chrono::{DateTime, Utc};
@ -32,6 +35,10 @@ pub enum EnrichmentSourceType {
Tmdb,
#[serde(rename = "lastfm")]
LastFm,
#[serde(rename = "openlibrary")]
OpenLibrary,
#[serde(rename = "googlebooks")]
GoogleBooks,
}
impl std::fmt::Display for EnrichmentSourceType {
@ -40,6 +47,8 @@ impl std::fmt::Display for EnrichmentSourceType {
Self::MusicBrainz => "musicbrainz",
Self::Tmdb => "tmdb",
Self::LastFm => "lastfm",
Self::OpenLibrary => "openlibrary",
Self::GoogleBooks => "googlebooks",
};
write!(f, "{s}")
}
@ -53,6 +62,8 @@ impl std::str::FromStr for EnrichmentSourceType {
"musicbrainz" => Ok(Self::MusicBrainz),
"tmdb" => Ok(Self::Tmdb),
"lastfm" => Ok(Self::LastFm),
"openlibrary" => Ok(Self::OpenLibrary),
"googlebooks" => Ok(Self::GoogleBooks),
_ => Err(format!("unknown enrichment source: {s}")),
}
}