mutu310 70 Posted March 19, 2017 Posted March 19, 2017 My channel accesses OMDb so it would be preferable for me to use the inbuilt code found in https://github.com/MediaBrowser/Emby/blob/3c759f23c461c4574606efbbbb8498a8c3e97d84/MediaBrowser.Providers/Omdb/OmdbProvider.cs
mutu310 70 Posted March 19, 2017 Author Posted March 19, 2017 Similarly would like to access https://github.com/MediaBrowser/Emby/blob/3c759f23c461c4574606efbbbb8498a8c3e97d84/MediaBrowser.Providers/Movies/MovieDbProvider.cs
Luke 40079 Posted March 19, 2017 Posted March 19, 2017 You don't get access to the individual classes of a provider. If you truly need that then you will need to copy the code into your plugin (but use your own api keys for those providers). To use the core providers, you can use the managed interface that wraps around and takes user metadata settings into account, for example: var episodeInfo = new EpisodeInfo { IndexNumber = episodeNumber, IndexNumberEnd = endingEpisodeNumber, MetadataCountryCode = series.GetPreferredMetadataCountryCode(), MetadataLanguage = series.GetPreferredMetadataLanguage(), ParentIndexNumber = seasonNumber, SeriesProviderIds = series.ProviderIds, PremiereDate = premiereDate }; var searchResults = await _providerManager.GetRemoteSearchResults<Episode, EpisodeInfo>(new RemoteSearchQuery<EpisodeInfo> { SearchInfo = episodeInfo }, cancellationToken).ConfigureAwait(false); 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now