feat: add TMDB metadata provider, prefer over OMDB when TMDB_API_KEY is set

This commit is contained in:
2026-05-10 02:30:53 +02:00
parent ebf74a59fd
commit 9c11ac2bcc
3 changed files with 193 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ use domain::{
};
mod omdb;
mod tmdb;
pub(crate) struct ProviderMovie {
pub imdb_id: ExternalMetadataId,
@@ -31,6 +32,12 @@ impl MetadataClientImpl {
provider: Box::new(omdb::OmdbProvider::new(api_key)),
}
}
pub fn new_tmdb(api_key: String) -> Self {
Self {
provider: Box::new(tmdb::TmdbProvider::new(api_key)),
}
}
}
#[async_trait]