HawkXP71 126 Posted Monday at 10:55 PM Posted Monday at 10:55 PM For the missing movies from collections, I have that working by looping over all collections, getting the tmdbid, then getting the list of movies in the collection, and finding movies that match the tmdbid of the movie. No issues, for now I am directly calling tmdb, but I will be moving to using the provider.GetRemoteSearchResults api But for finding missing episodes, Im trying to use the Emby Api. The data is there, its just how First doing a libraryManager.GetItemList where the query has Parent unset or set to a series where I know there is a missing episode, doesnt return the missing episode, ever. I tried adding IsVirtualItem=true with nochanges. I have never recieved an epidode where LocationType was virtual. Id rather not use the rest api from inside the plugin (just seems wrong ) but if I have to I will. TIA
Luke 43206 Posted Monday at 10:58 PM Posted Monday at 10:58 PM HI, try IProviderManager.GetAllEpisodes and GetAllItems this just gets you everything. the determination of what is missing or not is not currently in a place where you can use it, so you'll have to write your own code to compare the list from the providers to what's in the library. 1
HawkXP71 126 Posted Wednesday at 11:42 PM Author Posted Wednesday at 11:42 PM I was never able to get the built in provider functionality. I have my own tmdb api key, and was able to get it working with the emby IHTTPClient. Do you @Lukehave an example somewhere on using the provider system to send a search request to tmdb? Im essentially sending https://api.themoviedb.org/3/collection/<collectionTmdbId>?language=en-us&api_key=<KEY> TIA
GrimReaper 5180 Posted Wednesday at 11:51 PM Posted Wednesday at 11:51 PM 7 minutes ago, HawkXP71 said: Im essentially sending https://api.themoviedb.org/3/collection/<collectionTmdbId>?language=en-us&api_key=<KEY> What is the issue you're facing? I'm getting proper response on that query.
Luke 43206 Posted yesterday at 12:18 AM Posted yesterday at 12:18 AM Quote I was never able to get the built in provider functionality. Well what did you try?
HawkXP71 126 Posted 2 hours ago Author Posted 2 hours ago On 9/30/2026 at 4:51 PM, GrimReaper said: What is the issue you're facing? I'm getting proper response on that query. On 9/30/2026 at 5:18 PM, Luke said: Well what did you try? Ill have to "undo" my direct call, but Ill get that tried out later today. Thanks for the response.
HawkXP71 126 Posted 2 hours ago Author Posted 2 hours ago On 9/30/2026 at 4:51 PM, GrimReaper said: What is the issue you're facing? I'm getting proper response on that query. @GrimReaper To be clear, it works fine with this "URL" https://api.themoviedb.org/3/collection/<collectionTmdbId>?language=en-us&api_key=<KEY>, what fails is using the provider connection. Ill get you my code in a couple of hours. 1
HawkXP71 126 Posted 1 hour ago Author Posted 1 hour ago @GrimReaper @Luke public async Task<TmdbCollection?> GetRemoteCollectionMembersAsyncViaProviders( string tmdbId, CancellationToken? cancellationToken = null, string language = "en-US" ) { if( string.IsNullOrEmpty( tmdbId ) ) return null; if( !CheckIsValid( false ) ) return null; var languageCode = string.IsNullOrEmpty( language ) ? "en" : language.Split( '-' )[ 0 ]; var countryCode = ( !string.IsNullOrEmpty( language ) && language.Split( '-' ).Length > 1 ) ? language.Split( '-' )[ 1 ] : "US"; var boxSetLookupInfo = new BoxSetInfo { MetadataLanguage = languageCode, MetadataCountryCode = countryCode }; boxSetLookupInfo.ProviderIds[ MetadataProviders.Tmdb.ToString() ] = tmdbId; var searchQuery = new RemoteSearchQuery<BoxSetInfo> { SearchInfo = boxSetLookupInfo, ItemId = 0 // Provide an existing Emby item ID if updating a specific item }; var cancelToken = cancellationToken ?? CancellationToken.None; try { IEnumerable<RemoteSearchResult> results = await _embyInterfaces!._providerManager!.GetRemoteSearchResults<BoxSet, BoxSetInfo>( searchQuery, null, // referenceItem: Pass a BaseItem instance if contextual lookup is required cancelToken ).ConfigureAwait( false ); foreach( var result in results ) { foreach( var providerId in result.ProviderIds ) { _embyInterfaces!._logger!.Info( " -> External Provider: {0}, ID: {1}", providerId.Key, providerId.Value ); } } } catch( Exception ex ) { _embyInterfaces!._logger!.Warn( "Failed to discover remote BoxSet results", ex ); } return null; } My custom search is the following: public async Task<TmdbCollection?> GetRemoteCollectionMembersAsyncViaCustom( string tmdbId, CancellationToken? cancellationToken = null, string language = "en-US" ) { if( string.IsNullOrEmpty( tmdbId ) ) return null; if( !CheckIsValid( false ) ) return null; //string url = $"https://themoviedb.org/{tmdbCollectionId}?api_key={kApiKeyV3}&language={language}"; var builder = new UriBuilder { Scheme = "https", Host = "api.themoviedb.org", Path = $"/3/collection/{tmdbId}?language={language}" }; var query = HttpUtility.ParseQueryString( builder.Query ); query[ "api_key" ] = kApiKeyV3; builder.Query = query.ToString(); var url = builder.Uri.ToString(); var options = new HttpRequestOptions { Url = url, CancellationToken = cancellationToken ?? CancellationToken.None, // Optional: Set cache timeout if you don't want to hit TMDB constantly CacheLength = System.TimeSpan.FromDays( 1 ), CacheMode = CacheMode.None }; try { using( var response = await _embyInterfaces!._httpClient!.GetResponse( options ).ConfigureAwait( false ) ) { var collections = _embyInterfaces!._jsonSerializer!.DeserializeFromStream<TmdbCollection>( response.Content ); return collections ?? null; } } catch { return null; } } Both are using the same tmdbid. The custom one works the provider one does not TIA
HawkXP71 126 Posted 58 minutes ago Author Posted 58 minutes ago (edited) I call my custom first, and then the provider search second. In the log I see the Http request for mine 2026-10-02 11:13:48.261 Info HttpClient: GET https://api.themoviedb.org/3/collection/115838%3Flanguage=en-US?api_key=<api_key> 2026-10-02 11:13:48.387 Info HttpClient: Http response 200 from https://api.themoviedb.org/3/collection/115838%3Flanguage=en-US?api_key=<api_key>after 126ms but I see nothing for the provider, I do have debug logging on Edited 57 minutes ago by HawkXP71
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