feat: add TMDB metadata provider, prefer over OMDB when TMDB_API_KEY is set
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user