Struct dim_extern_api::tmdb::MetadataProviderOf
source · pub struct MetadataProviderOf<K>where
K: AssocMediaTypeConst + Send + Sync + 'static,{
pub provider: TMDBMetadataProvider,
/* private fields */
}
Expand description
An instance of TMDBMetadataProvider with a generic parameter to infer the [MediaType] for searches.
Fields§
§provider: TMDBMetadataProvider
Trait Implementations§
source§impl<K> ExternalQuery for MetadataProviderOf<K>where
K: AssocMediaTypeConst + Send + Sync + 'static,
impl<K> ExternalQuery for MetadataProviderOf<K>where
K: AssocMediaTypeConst + Send + Sync + 'static,
source§fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
title: &'life1 str,
year: Option<i32>
) -> Pin<Box<dyn Future<Output = QueryResult<Vec<ExternalMedia>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
title: &'life1 str,
year: Option<i32>
) -> Pin<Box<dyn Future<Output = QueryResult<Vec<ExternalMedia>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Search by title and year. This must return a Vec of
ExternalMedia
sorted by the search
score.source§fn search_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
external_id: &'life1 str
) -> Pin<Box<dyn Future<Output = QueryResult<ExternalMedia>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
external_id: &'life1 str
) -> Pin<Box<dyn Future<Output = QueryResult<ExternalMedia>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Search by external id. This must return a singular
ExternalMedia
which has the id passed
in.source§fn cast<'life0, 'life1, 'async_trait>(
&'life0 self,
external_id: &'life1 str
) -> Pin<Box<dyn Future<Output = QueryResult<Vec<ExternalActor>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cast<'life0, 'life1, 'async_trait>(
&'life0 self,
external_id: &'life1 str
) -> Pin<Box<dyn Future<Output = QueryResult<Vec<ExternalActor>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get all actors for a media by external id. Actors must be ordered in order of importance.
source§impl ExternalQueryShow for MetadataProviderOf<TvShows>
impl ExternalQueryShow for MetadataProviderOf<TvShows>
source§fn seasons_for_id<'life0, 'life1, 'async_trait>(
&'life0 self,
external_id: &'life1 str
) -> Pin<Box<dyn Future<Output = QueryResult<Vec<ExternalSeason>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn seasons_for_id<'life0, 'life1, 'async_trait>(
&'life0 self,
external_id: &'life1 str
) -> Pin<Box<dyn Future<Output = QueryResult<Vec<ExternalSeason>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get all seasons for an external id. Seasons must be ranked in order by their number.
source§fn episodes_for_season<'life0, 'life1, 'async_trait>(
&'life0 self,
external_id: &'life1 str,
season_number: u64
) -> Pin<Box<dyn Future<Output = QueryResult<Vec<ExternalEpisode>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn episodes_for_season<'life0, 'life1, 'async_trait>(
&'life0 self,
external_id: &'life1 str,
season_number: u64
) -> Pin<Box<dyn Future<Output = QueryResult<Vec<ExternalEpisode>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get all episodes for a season ranked in order of the episode number.
source§impl IntoQueryShow for MetadataProviderOf<Movies>
impl IntoQueryShow for MetadataProviderOf<Movies>
source§fn as_query_show<'a>(&'a self) -> Option<&'a dyn ExternalQueryShow>
fn as_query_show<'a>(&'a self) -> Option<&'a dyn ExternalQueryShow>
Upcast
self
into ExternalQueryShow
. It is important that providers that can query for
tv shows, implements this to return Some(self)
.fn into_query_show(self: Arc<Self>) -> Option<Arc<dyn ExternalQueryShow>>
source§impl IntoQueryShow for MetadataProviderOf<TvShows>
impl IntoQueryShow for MetadataProviderOf<TvShows>
source§fn as_query_show<'a>(&'a self) -> Option<&'a dyn ExternalQueryShow>
fn as_query_show<'a>(&'a self) -> Option<&'a dyn ExternalQueryShow>
Upcast
self
into ExternalQueryShow
. It is important that providers that can query for
tv shows, implements this to return Some(self)
.