jellyfin / jellyfin-plugin-tvdb

GNU General Public License v3.0
56 stars 34 forks source link

Jellyfin and thetvdb API not working #48

Open eycer1995 opened 3 years ago

eycer1995 commented 3 years ago

Recently I set up a Jellyfin server with a RPi4 mainly used to watch anime. After using it a few months with AniDB I didn't like the way it organizes the anime, so I want to switch to thetvdb.

HW: RPi4 Version 10.7.6 OS: Raspbian

Since it wasn't working with the default API from the tvdb plugin I paid the tvdb subscription to get my own "Legacy API key" like they called it thinking that may be the problem, but after changing the API key still can't get any metadata from the tvdb.

What am I doing wrong?

I'm following the naming scheme of tvdb for my anime library.

I also tried to manually identifying the anime with thetvdb ID but only got synopsis and the cast info, not the images.

Is the problem Jellyfin? Thetvdb? me? Any suggestions? Please help.

The logs show this:

[2021-08-22 23:56:24.477 -03:00] [ERR] "TvdbSeriesImageProvider" failed in GetImageInfos for type "Series" at "/mnt/external/shared/Jellyfin/Anime test/Oreimo (2010)" TvDbSharper.TvDbServerException: The given series ID does not exist; Resource not found

at TvDbSharper.Infrastructure.Parser.Parse[T](ApiResponse response, IReadOnlyDictionary`2 errorMap)

at TvDbSharper.Clients.SeriesClient.GetImagesSummaryAsync(Int32 seriesId, CancellationToken cancellationToken)

at Jellyfin.Plugin.Tvdb.TvdbClientManager.<>c__DisplayClass24_0`1.<<TryGetValue>b__0>d.MoveNext() --- End of stack trace from previous location ---

at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory)

at Jellyfin.Plugin.Tvdb.TvdbClientManager.GetImageKeyTypesForSeriesAsync(Int32 tvdbId, String language, CancellationToken cancellationToken)+MoveNext()

at Jellyfin.Plugin.Tvdb.TvdbClientManager.GetImageKeyTypesForSeriesAsync(Int32 tvdbId, String language, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()

at Jellyfin.Plugin.Tvdb.Providers.TvdbSeriesImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)

at Jellyfin.Plugin.Tvdb.Providers.TvdbSeriesImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)

at MediaBrowser.Providers.Manager.ProviderManager.GetImages(BaseItem item, IRemoteImageProvider provider, IReadOnlyCollection`1 preferredLanguages, CancellationToken cancellationToken, Nullable`1 type)

[2021-08-22 23:56:24.670 -03:00] [ERR] "TvdbSeasonImageProvider" failed in GetImageInfos for type "Season" at "/mnt/external/shared/Jellyfin/Anime test/Oreimo (2010)/Season 1" TvDbSharper.TvDbServerException: The given series ID does not exist; Resource not found

at TvDbSharper.Infrastructure.Parser.Parse[T](ApiResponse response, IReadOnlyDictionary`2 errorMap)

at TvDbSharper.Clients.SeriesClient.GetImagesSummaryAsync(Int32 seriesId, CancellationToken cancellationToken)

at Jellyfin.Plugin.Tvdb.TvdbClientManager.<>c__DisplayClass24_0`1.<<TryGetValue>b__0>d.MoveNext() --- End of stack trace from previous location ---

at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory)

at Jellyfin.Plugin.Tvdb.TvdbClientManager.GetImageKeyTypesForSeasonAsync(Int32 tvdbId, String language, CancellationToken cancellationToken)+MoveNext()

at Jellyfin.Plugin.Tvdb.TvdbClientManager.GetImageKeyTypesForSeasonAsync(Int32 tvdbId, String language, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()

at Jellyfin.Plugin.Tvdb.Providers.TvdbSeasonImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)

at Jellyfin.Plugin.Tvdb.Providers.TvdbSeasonImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)

at MediaBrowser.Providers.Manager.ProviderManager.GetImages(BaseItem item, IRemoteImageProvider provider, IReadOnlyCollection`1 preferredLanguages, CancellationToken cancellationToken, Nullable`1 type)

[2021-08-22 23:56:24.769 -03:00] [ERR] "TvdbSeasonImageProvider" failed in GetImageInfos for type "Season" at "/mnt/external/shared/Jellyfin/Anime test/Oreimo (2010)/Specials" TvDbSharper.TvDbServerException: The given series ID does not exist; Resource not found

at TvDbSharper.Infrastructure.Parser.Parse[T](ApiResponse response, IReadOnlyDictionary`2 errorMap)

at TvDbSharper.Clients.SeriesClient.GetImagesSummaryAsync(Int32 seriesId, CancellationToken cancellationToken)

at Jellyfin.Plugin.Tvdb.TvdbClientManager.<>c__DisplayClass24_0`1.<<TryGetValue>b__0>d.MoveNext() --- End of stack trace from previous location ---

at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory)

at Jellyfin.Plugin.Tvdb.TvdbClientManager.GetImageKeyTypesForSeasonAsync(Int32 tvdbId, String language, CancellationToken cancellationToken)+MoveNext()

at Jellyfin.Plugin.Tvdb.TvdbClientManager.GetImageKeyTypesForSeasonAsync(Int32 tvdbId, String language, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()

at Jellyfin.Plugin.Tvdb.Providers.TvdbSeasonImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)

at Jellyfin.Plugin.Tvdb.Providers.TvdbSeasonImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)

at MediaBrowser.Providers.Manager.ProviderManager.GetImages(BaseItem item, IRemoteImageProvider provider, IReadOnlyCollection`1 preferredLanguages, CancellationToken cancellationToken, Nullable`1 type)

[2021-08-22 23:56:24.869 -03:00] [ERR] "TvdbSeasonImageProvider" failed in GetImageInfos for type "Season" at "/mnt/external/shared/Jellyfin/Anime test/Oreimo (2010)/Season 2" TvDbSharper.TvDbServerException: The given series ID does not exist; Resource not found

at TvDbSharper.Infrastructure.Parser.Parse[T](ApiResponse response, IReadOnlyDictionary`2 errorMap)

at TvDbSharper.Clients.SeriesClient.GetImagesSummaryAsync(Int32 seriesId, CancellationToken cancellationToken)

at Jellyfin.Plugin.Tvdb.TvdbClientManager.<>c__DisplayClass24_0`1.<<TryGetValue>b__0>d.MoveNext() --- End of stack trace from previous location ---

at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory)

at Jellyfin.Plugin.Tvdb.TvdbClientManager.GetImageKeyTypesForSeasonAsync(Int32 tvdbId, String language, CancellationToken cancellationToken)+MoveNext()

at Jellyfin.Plugin.Tvdb.TvdbClientManager.GetImageKeyTypesForSeasonAsync(Int32 tvdbId, String language, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()

at Jellyfin.Plugin.Tvdb.Providers.TvdbSeasonImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)

at Jellyfin.Plugin.Tvdb.Providers.TvdbSeasonImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)

at MediaBrowser.Providers.Manager.ProviderManager.GetImages(BaseItem item, IRemoteImageProvider provider, IReadOnlyCollection`1 preferredLanguages, CancellationToken cancellationToken, Nullable`1 type)
ontheflow commented 3 years ago

I got the same Problem

crobibero commented 3 years ago

Is it erroring on every query, or just some? We haven’t changed the plugin code recently so if it’s erroring for every show it’s on TVDBs end.

ontheflow commented 3 years ago

Is it erroring on every query, or just some? We haven’t changed the plugin code recently so if it’s erroring for every show it’s on TVDBs end.

My Scan is running for a few minutes then i get the error

[11:46:49] [INF] [4] Jellyfin.Plugin.Tvdb.Providers.TvdbMissingEpisodeProvider: Creating virtual episode American Dad! 18x21

[11:46:50] [ERR] [49] Emby.Server.Implementations.ScheduledTasks.TaskManager: Error

System.Net.Http.HttpRequestException: Resource temporarily unavailable (api.thetvdb.com:443)

 ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable

   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)

   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)

   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|283_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)

   at System.Net.Http.HttpConnectionPool.DefaultConnectAsync(SocketsHttpConnectionContext context, CancellationToken cancellationToken)

   at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, CancellationToken cancellationToken)

   --- End of inner exception stack trace ---

   at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, CancellationToken cancellationToken)

   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)

   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)

   at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)

   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, 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.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)

   at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)

   at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)

   at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, Boolean emitTelemetryStartStop, CancellationToken cancellationToken)

   at TvDbSharper.Infrastructure.ApiClient.SendRequestAsync(ApiRequest request, CancellationToken cancellationToken)

   at TvDbSharper.Clients.SeriesClient.GetEpisodesAsync(Int32 seriesId, Int32 page, EpisodeQuery query, CancellationToken cancellationToken)

   at Jellyfin.Plugin.Tvdb.TvdbClientManager.<>c__DisplayClass24_0`1.<<TryGetValue>b__0>d.MoveNext()

--- End of stack trace from previous location ---

   at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory)

   at Jellyfin.Plugin.Tvdb.Providers.TvdbMissingEpisodeProvider.GetAllEpisodes(Int32 tvdbId, String acceptedLanguage, EpisodeQuery episodeQuery)

   at Jellyfin.Plugin.Tvdb.Providers.TvdbMissingEpisodeProvider.HandleSeason(Season season)

   at Jellyfin.Plugin.Tvdb.Providers.TvdbMissingEpisodeProvider.OnProviderManagerRefreshComplete(Object sender, GenericEventArgs`1 genericEventArgs)

   at MediaBrowser.Providers.Manager.ProviderManager.OnRefreshComplete(BaseItem item)

   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)

   at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass61_0`1.<<RunTasks>b__1>d.MoveNext()

--- End of stack trace from previous location ---

   at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func`3 task, IList`1 children, IProgress`1 progress, CancellationToken cancellationToken)

   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)

   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)

   at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass61_0`1.<<RunTasks>b__1>d.MoveNext()

--- End of stack trace from previous location ---

   at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func`3 task, IList`1 children, IProgress`1 progress, CancellationToken cancellationToken)

   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)

   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)

   at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass61_0`1.<<RunTasks>b__1>d.MoveNext()

--- End of stack trace from previous location ---

   at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func`3 task, IList`1 children, IProgress`1 progress, CancellationToken cancellationToken)

   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)

   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)

   at MediaBrowser.Controller.Entities.AggregateFolder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)

   at Emby.Server.Implementations.Library.LibraryManager.PerformLibraryValidation(IProgress`1 progress, CancellationToken cancellationToken)

   at Emby.Server.Implementations.Library.LibraryManager.ValidateMediaLibraryInternal(IProgress`1 progress, CancellationToken cancellationToken)

   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)

[11:46:50] [INF] [49] Emby.Server.Implementations.ScheduledTasks.TaskManager: Scanne Medien-Bibliothek Failed after 2 minute(s) and 24 seconds
crobibero commented 3 years ago

@ontheflow your issue is different from the original issue. Yours has Resource temporarily unavailable (api.thetvdb.com:443). This means that TheTVDB's API went down, and there's nothing we can do to fix that.

ontheflow commented 3 years ago

@crobibero maybe i tried to often, i will try again in a few days

ontheflow commented 3 years ago

@crobibero maybe i tried to often, i will try again in a few days

Switching from MacVlan to Host in Docker solved my Problem