zhuhaor 0 Posted January 18, 2025 Posted January 18, 2025 I set up an Emby server on windows 11 with a Emby Premiere license However, I'm having trouble scraping a movie or TV show with the MovieDb plugin. It should be noted that my network is able to access themoviedb.org website normally. I wonder if this has something to do with the "api_key" that comes with the plugin to access api.themoviedb.org, I learned from api.themoviedb.org that "api_key" is required to use api.themoviedb, but there is no place to configure this information in the MovieDb plug-in that comes with emby. Therefore, has this "api_key" been invalid recently? Some logs are as follows and please refer to the attachment for the complete log:2-embyserver.txt ### embyserver.txt: 2025-01-18 13:13:34.953 Info HttpClient: GET https://api.themoviedb.org/3/configuration?api_key=f6bd687ffa63cd282b6ff2c6877f2669 2025-01-18 13:13:54.961 Error HttpClient: Connection to https://api.themoviedb.org/3/configuration?api_key=f6bd687ffa63cd282b6ff2c6877f2669 timed out 2025-01-18 13:13:54.963 Error ProviderManager: Error searching *** Error Report *** Version: 4.8.10.0 Command line: C:\Zhuhr app\embyserver-win-x64-4.8.10\system\EmbyServer.dll -service Operating system: Microsoft Windows 10.0.26100 Framework: .NET 6.0.33 OS/Process: x64/x64 Runtime: C:/Zhuhr app/embyserver-win-x64-4.8.10/system/System.Private.CoreLib.dll Processor count: 16 Data path: C:\Zhuhr app\embyserver-win-x64-4.8.10\programdata Application path: C:\Zhuhr app\embyserver-win-x64-4.8.10\system MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Connection to https://api.themoviedb.org/3/configuration?api_key=f6bd687ffa63cd282b6ff2c6877f2669 timed out ---> System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 20 seconds elapsing. ---> System.TimeoutException: A task was canceled. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled. at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) --- End of inner exception stack trace --- --- End of inner exception stack trace --- at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod) --- End of inner exception stack trace --- at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod) at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod) at MovieDb.MovieDbProviderBase.GetMovieDbResponse(HttpRequestOptions options) at MovieDb.MovieDbProviderBase.GetTmdbSettings(CancellationToken cancellationToken) at MovieDb.MovieDbSeriesProvider.GetSearchResults(SeriesInfo searchInfo, CancellationToken cancellationToken) at Emby.Providers.Manager.ProviderManager.GetSearchResults[TLookupType](IRemoteSearchProvider`1 provider, TLookupType searchInfo, CancellationToken cancellationToken) at Emby.Providers.Manager.ProviderManager.GetRemoteSearchResults[TItemType,TLookupType](RemoteSearchQuery`1 searchInfo, BaseItem referenceItem, CancellationToken cancellationToken) Source: Emby.Server.Implementations TargetSite: Void MoveNext() InnerException: System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 20 seconds elapsing. Source: System.Net.Http TargetSite: Void HandleFailure(System.Exception, Boolean, System.Net.Http.HttpResponseMessage, System.Threading.CancellationTokenSource, System.Threading.CancellationToken, System.Threading.CancellationTokenSource) at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod) InnerException: System.TimeoutException: A task was canceled. Source: TargetSite: InnerException: System.Threading.Tasks.TaskCanceledException: A task was canceled. Source: System.Private.CoreLib TargetSite: Void ThrowForNonSuccess(System.Threading.Tasks.Task) at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) ### Screenshot of normal access to themoviedb website: ### Failed to search for a screenshot:
Abobader 3464 Posted January 18, 2025 Posted January 18, 2025 Hello zhuhaor, ** This is an auto reply ** Please wait for someone from staff support or our members to reply to you. It's recommended to provide more info, as it explain in this thread: Thank you. Emby Team
zhuhaor 0 Posted January 18, 2025 Author Posted January 18, 2025 When I manually accessed the address: https://api.themoviedb.org/3/configuration?api_key=f6bd687ffa63cd282b6ff2c6877f2669 the browser returned the following message: { "status_code": 7, "status_message": "Invalid API key: You must be granted a valid key.", "success": false }
Happy2Play 9780 Posted January 18, 2025 Posted January 18, 2025 2 hours ago, zhuhaor said: When I manually accessed the address: https://api.themoviedb.org/3/configuration?api_key=f6bd687ffa63cd282b6ff2c6877f2669 the browser returned the following message: { "status_code": 7, "status_message": "Invalid API key: You must be granted a valid key.", "success": false } Well the log url has hidden characters that will not directly allow you to click the link as part of the log anonimizer. per your post So if you want to manually run the link you have to manually remove these characters. Are you using a vpn? As TMDB api is timing out for all your requests.
Luke 42078 Posted January 18, 2025 Posted January 18, 2025 Hi, you do not have to configure any api key. This is all built into Emby Server. As has been asked, are you behind a VPN?
zhuhaor 0 Posted January 19, 2025 Author Posted January 19, 2025 8 hours ago, Happy2Play said: Well the log url has hidden characters that will not directly allow you to click the link as part of the log anonimizer. per your post So if you want to manually run the link you have to manually remove these characters. Are you using a vpn? As TMDB api is timing out for all your requests. I have tried VPN, but also tried not to use VPN, but almost all failed, 99%
zhuhaor 0 Posted January 19, 2025 Author Posted January 19, 2025 1 hour ago, Luke said: Hi, you do not have to configure any api key. This is all built into Emby Server. As has been asked, are you behind a VPN? I have tried VPN, but also tried not to use VPN, doesn't feel any different
Luke 42078 Posted January 19, 2025 Posted January 19, 2025 Is the moviedb api domain blocked in your area?
zhuhaor 0 Posted January 19, 2025 Author Posted January 19, 2025 2 hours ago, Luke said: Is the moviedb api domain blocked in your area? I don't know. How do we fix it? For a few minutes or so last night, moviedb worked, but only for a few short minutes: 2025-01-20 00:04:35.949 Info HttpClient: GET https://image.tmdb.org/t/p/original/roMgWFFDeeLgzLKNTEm7JlxojJP.jpg 2025-01-20 00:04:37.832 Info TaskManager: Check for plugin updates Completed after 1 minute(s) and 50 seconds 2025-01-20 00:04:42.214 Info HttpClient: GET https://image.tmdb.org/t/p/original/hvQY3iiKyW0bpb3ByewtrKmA8ox.png 2025-01-20 00:04:42.233 Info HttpClient: GET https://image.tmdb.org/t/p/original/m5CggjJuFc08QCuKz54znHP6spJ.jpg 2025-01-20 00:04:42.245 Info HttpClient: GET https://image.tmdb.org/t/p/original/wdmLUSPEC7dXuqnjTM4NgbjvTKk.jpg 2025-01-20 00:04:42.245 Info HttpClient: GET https://image.tmdb.org/t/p/original/7QlPWbZRH2ORMmAHKAj0rq54t4A.jpg 2025-01-20 00:04:42.253 Info HttpClient: GET https://image.tmdb.org/t/p/original/6Utxx6T2A1HxXCUXauSWSpTVx6u.jpg 2025-01-20 00:04:42.288 Info HttpClient: GET https://image.tmdb.org/t/p/original/mZnpaex4PFUkyMuKgVEBXCuJ7gU.jpg 2025-01-20 00:05:22.136 Info Server: http/1.1 POST http://localhost:8096/emby/Items/RemoteSearch/Series?X-Emby-Client=Emby Web&X-Emby-Device-Name=Google Chrome Windows&X-Emby-Device-Id=67bc2dff-841b-4188-8b0f-af544c6c2f70&X-Emby-Client-Version=4.9.0.35&X-Emby-Token=ec2a225736564875823e3ab0dd5a0afd&X-Emby-Language=zh-cn&reqformat=json. Source Ip: ::1, UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 2025-01-20 00:05:22.137 Info HttpClient: GET https://api.themoviedb.org/3/tv/1415?api_key=f6bd687ffa63cd282b6ff2c6877f2669&append_to_response=alternative_titles,reviews,credits,images,keywords,external_ids,videos,content_ratings,episode_groups&language=zh-CN&include_image_language=zh-CN,null 2025-01-20 00:05:22.367 Info HttpClient: GET https://api.themoviedb.org/3/tv/1415?api_key=f6bd687ffa63cd282b6ff2c6877f2669&append_to_response=alternative_titles,reviews,credits,images,keywords,external_ids,videos,content_ratings,episode_groups&language=en-US&include_image_language=en-US,null 2025-01-20 00:05:22.589 Info HttpClient: GET https://api.themoviedb.org/3/tv/1415?api_key=f6bd687ffa63cd282b6ff2c6877f2669&append_to_response=alternative_titles,reviews,credits,images,keywords,external_ids,videos,content_ratings,episode_groups 2025-01-20 00:05:22.970 Info HttpClient: GET http://api.tvmaze.com/search/shows?q= 2025-01-20 00:05:23.421 Info TV Maze: TvMazeDataHub.FindSeriesInternal: TV Maze Provider - Could not find . Check name on tvmaze.com 2025-01-20 00:05:23.421 Info Server: http/1.1 Response 200 to ::1. Time: 1285ms. POST http://localhost:8096/emby/Items/RemoteSearch/Series?X-Emby-Client=Emby Web&X-Emby-Device-Name=Google Chrome Windows&X-Emby-Device-Id=67bc2dff-841b-4188-8b0f-af544c6c2f70&X-Emby-Client-Version=4.9.0.35&X-Emby-Token=ec2a225736564875823e3ab0dd5a0afd&X-Emby-Language=zh-cn&reqformat=json 2025-01-20 00:05:25.426 Info HttpClient: GET https://image.tmdb.org/t/p/original/q9dObe29W4bDpgzUfOOH3ZnzDbR.jpg 2025-01-20 00:05:26.605 Info Server: http/1.1 POST http://localhost:8096/emby/Items/RemoteSearch/Apply/6?ReplaceAllImages=true&X-Emby-Client=Emby Web&X-Emby-Device-Name=Google Chrome Windows&X-Emby-Device-Id=67bc2dff-841b-4188-8b0f-af544c6c2f70&X-Emby-Client-Version=4.9.0.35&X-Emby-Token=ec2a225736564875823e3ab0dd5a0afd&X-Emby-Language=zh-cn&reqformat=json. Source Ip: ::1, UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 2025-01-20 00:05:26.605 Info App: Setting provider id's to item 6-福尔摩斯 基本演绎法: {"Tmdb":"1415","Imdb":"tt2191671","TvRage":"30750","Tvdb":"255316"} 2025-01-20 00:05:26.697 Info MediaProbeManager: ProcessRun 'ffprobe' Execute: C:\Zhuhr app\embyserver-win-x64\system\ffprobe.exe -i file:"D:\我的影视剧\Elementary.2012.福尔摩斯 基本演绎法\Elementary.S01E01.720p.h264.mkv" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data 2025-01-20 00:05:26.740 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 0 - Succeeded 2025-01-20 00:05:27.003 Info HttpClient: GET https://api.opensubtitles.com/api/v1/subtitles?languages=zh-cn&moviehash=30463b67c4cad71c 2025-01-20 00:05:27.253 Info HttpClient: GET https://api.themoviedb.org/3/tv/1415/season/1/episode/1?api_key=f6bd687ffa63cd282b6ff2c6877f2669&append_to_response=images,external_ids,credits,videos&language=zh-CN&include_image_language=zh-CN,null 2025-01-20 00:05:27.466 Info HttpClient: GET https://api.themoviedb.org/3/tv/1415/season/1/episode/1?api_key=f6bd687ffa63cd282b6ff2c6877f2669&append_to_response=images,external_ids,credits,videos 2025-01-20 00:05:27.858 Info MediaProbeManager: ProcessRun 'ffprobe' Execute: C:\Zhuhr app\embyserver-win-x64\system\ffprobe.exe -i file:"D:\我的影视剧\Elementary.2012.福尔摩斯 基本演绎法\Elementary.S01E02.720p.h264.mkv" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data 2025-01-20 00:05:27.902 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 0 - Succeeded 3-embyserver.txt
zhuhaor 0 Posted January 19, 2025 Author Posted January 19, 2025 At the same time, I manually accessed the following two addresses in Chrome and was able to return the information correctly: byw: It's just like as Happy2Play said, when I first typed the url, some strings were automatically added to the browser after the api_key, so for the screenshot, I removed those strings myself.
Happy2Play 9780 Posted January 19, 2025 Posted January 19, 2025 Honestly don't think there is anything Emby can do if it is randomly working from your location. Possibly a DNS or IPv6 issue?
zhuhaor 0 Posted January 20, 2025 Author Posted January 20, 2025 25 minutes ago, Happy2Play said: Honestly don't think there is anything Emby can do if it is randomly working from your location. Possibly a DNS or IPv6 issue? It's so frustrating to hear that. It feels like this problem can't be solved... I am in China...
zhuhaor 0 Posted January 20, 2025 Author Posted January 20, 2025 2 minutes ago, Luke said: What about using tvdb instead? The main reason is that tmdb gets movies and TV shows with Chinese content included, I'd prefer tmdb to work. Also, if use vpn, tvdb is definitely working. So, please help us to study this issue again, thank you very much!
zhuhaor 0 Posted January 20, 2025 Author Posted January 20, 2025 Actually, both tvdb and tvmaze work, but they both only offer English content... And then there was originally douban available, but recently I studied some posts in the forum and realized that douban doesn't work either .
zhuhaor 0 Posted January 20, 2025 Author Posted January 20, 2025 I'm now more certain that the cause of the failure is coming from either the Emby server or the Moviedb plugin, because I'm using "tinyMediaManager" and setting tmdb as the only scraping source, and as a result I can finish scraping very quickly: Finally, I'd like to ask if Emby can be set to prioritize the use of content in the local directory that has already been scraped as metadata?
Happy2Play 9780 Posted January 20, 2025 Posted January 20, 2025 3 hours ago, zhuhaor said: Finally, I'd like to ask if Emby can be set to prioritize the use of content in the local directory that has already been scraped as metadata? Emby already does this assuming you have read nfo files enabled per library. Local assets/existing metadata always takes priority over only metadata but that does not stop Emby from querying all enabled providers for data to cache and possibly fill in any missing info that a third party may not be providing Emby. So you would have to disable all providers if you don't want them used in addition to what is in your local data.
Luke 42078 Posted January 20, 2025 Posted January 20, 2025 4 hours ago, zhuhaor said: Finally, I'd like to ask if Emby can be set to prioritize the use of content in the local directory that has already been scraped as metadata? Out of the box with default settings, this is how things work.
shteve 1 Posted February 14, 2025 Posted February 14, 2025 I'd like to add that I'm getting these API errors too and am based in the UK: https://api.themoviedb.org/3/movie/tt5822536?api_key=f6bd687ffa63cd282b6ff2c6877f2669&append_to_response=alternative_titles,reviews,casts,releases,images,keywords,trailers {"status_code":7,"status_message":"Invalid API key: You must be granted a valid key.","success":false} MediaBrowser.Model.Net.HttpException: Name or service not known (api4.thetvdb.com:443) It used to work fine, no VPN though do have adguard enabled. Nothing is logged as blocked, and disabling it has the same effect.
Happy2Play 9780 Posted February 14, 2025 Posted February 14, 2025 (edited) 10 minutes ago, shteve said: I'd like to add that I'm getting these API errors too and am based in the UK: https://api.themoviedb.org/3/movie/tt5822536?api_key=f6bd687ffa63cd282b6ff2c6877f2669&append_to_response=alternative_titles,reviews,casts,releases,images,keywords,trailers {"status_code":7,"status_message":"Invalid API key: You must be granted a valid key.","success":false} MediaBrowser.Model.Net.HttpException: Name or service not known (api4.thetvdb.com:443) It used to work fine, no VPN though do have adguard enabled. Nothing is logged as blocked, and disabling it has the same effect. Normal when clicking on log link, need to see full server log. URL works just fine if you remove then hidden character code added per log anonymizer as you can see key prefixed/suffixed. Edited February 14, 2025 by Happy2Play
shteve 1 Posted February 14, 2025 Posted February 14, 2025 So it does. Narrows it down to potentially DNS on the server, ta.
Luke 42078 Posted February 14, 2025 Posted February 14, 2025 Hi, please let us know what you find. Thanks !
shteve 1 Posted February 15, 2025 Posted February 15, 2025 Yep, somehow the DNS setting on the OMV host had been lost. What threw me was that the adguard server also hosted on there worked fine. Did an omv-firstaid and reconfigured the network and it's all good now. 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