[PR #14130] [MERGED] Fix ArgumentNullException in TmdbExternalUrlProvider #13851

Closed
opened 2026-02-07 07:20:09 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/14130
Author: @theguymadmax
Created: 5/18/2025
Status: Merged
Merged: 5/19/2025
Merged by: @crobibero

Base: masterHead: mis-fixes


📝 Commits (3)

📊 Changes

2 files changed (+4 additions, -4 deletions)

View changed files

📝 Jellyfin.Server.Implementations/Item/BaseItemRepository.cs (+2 -2)
📝 MediaBrowser.Providers/Plugins/Tmdb/TmdbExternalUrlProvider.cs (+2 -2)

📄 Description

Changes

  • Added null checks for episode.Series and season.Series
  • Changed Imdb to Tmdb
  • Fixed the comparison operator for maxWidth and MinPremiereDate

Issues

Log Error
 System.ArgumentNullException: Value cannot be null. (Parameter 'instance')
   at System.ArgumentNullException.Throw(String paramName)
   at System.ArgumentNullException.ThrowIfNull(Object argument, String paramName)
   at MediaBrowser.Model.Entities.ProviderIdsExtensions.TryGetProviderId(IHasProviderIds instance, String name, String& id) in C:\git\jellyfin\MediaBrowser.Model\Entities\ProviderIdsExtensions.cs:line 50
   at MediaBrowser.Model.Entities.ProviderIdsExtensions.TryGetProviderId(IHasProviderIds instance, MetadataProvider provider, String& id) in C:\git\jellyfin\MediaBrowser.Model\Entities\ProviderIdsExtensions.cs:line 78
   at MediaBrowser.Providers.Plugins.Tmdb.TmdbExternalUrlProvider.GetExternalUrls(BaseItem item)+MoveNext() in C:\git\jellyfin\MediaBrowser.Providers\Plugins\Tmdb\TmdbExternalUrlProvider.cs:line 54
   at System.Linq.Enumerable.IEnumerableSelectIterator`2.MoveNext()
   at System.Collections.Generic.SegmentedArrayBuilder`1.AddRange(IEnumerable`1 source)
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.ToArray()
   at Emby.Server.Implementations.Dto.DtoService.AttachBasicFields(BaseItemDto dto, BaseItem item, BaseItem owner, DtoOptions options) in C:\git\jellyfin\Emby.Server.Implementations\Dto\DtoService.cs:line 742
   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner) in C:\git\jellyfin\Emby.Server.Implementations\Dto\DtoService.cs:line 231
   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDto(BaseItem item, DtoOptions options, User user, BaseItem owner) in C:\git\jellyfin\Emby.Server.Implementations\Dto\DtoService.cs:line 140
   at Jellyfin.Api.Controllers.UserLibraryController.GetItem(Nullable`1 userId, Guid itemId) in C:\git\jellyfin\Jellyfin.Api\Controllers\UserLibraryController.cs:line 99
   at lambda_method6983(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/14130 **Author:** [@theguymadmax](https://github.com/theguymadmax) **Created:** 5/18/2025 **Status:** ✅ Merged **Merged:** 5/19/2025 **Merged by:** [@crobibero](https://github.com/crobibero) **Base:** `master` ← **Head:** `mis-fixes` --- ### 📝 Commits (3) - [`9cdcf68`](https://github.com/jellyfin/jellyfin/commit/9cdcf68339760b5ccfb9bab16c10cc4b5dc45aa0) Max min fix - [`442488e`](https://github.com/jellyfin/jellyfin/commit/442488efcd8c9d480684e9ca465cafe005c70acc) Tmdb null and typo fix - [`7d3bb38`](https://github.com/jellyfin/jellyfin/commit/7d3bb38cd24a49ab8f9cb9c29b62920b159a2f35) Apply suggestions from code review ### 📊 Changes **2 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `Jellyfin.Server.Implementations/Item/BaseItemRepository.cs` (+2 -2) 📝 `MediaBrowser.Providers/Plugins/Tmdb/TmdbExternalUrlProvider.cs` (+2 -2) </details> ### 📄 Description <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** <!-- Describe your changes here in 1-5 sentences. --> - Added null checks for `episode.Series` and `season.Series` - Changed `Imdb `to `Tmdb` - Fixed the comparison operator for `maxWidth `and `MinPremiereDate` **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> <details> <summary>Log Error</summary> ``` System.ArgumentNullException: Value cannot be null. (Parameter 'instance') at System.ArgumentNullException.Throw(String paramName) at System.ArgumentNullException.ThrowIfNull(Object argument, String paramName) at MediaBrowser.Model.Entities.ProviderIdsExtensions.TryGetProviderId(IHasProviderIds instance, String name, String& id) in C:\git\jellyfin\MediaBrowser.Model\Entities\ProviderIdsExtensions.cs:line 50 at MediaBrowser.Model.Entities.ProviderIdsExtensions.TryGetProviderId(IHasProviderIds instance, MetadataProvider provider, String& id) in C:\git\jellyfin\MediaBrowser.Model\Entities\ProviderIdsExtensions.cs:line 78 at MediaBrowser.Providers.Plugins.Tmdb.TmdbExternalUrlProvider.GetExternalUrls(BaseItem item)+MoveNext() in C:\git\jellyfin\MediaBrowser.Providers\Plugins\Tmdb\TmdbExternalUrlProvider.cs:line 54 at System.Linq.Enumerable.IEnumerableSelectIterator`2.MoveNext() at System.Collections.Generic.SegmentedArrayBuilder`1.AddRange(IEnumerable`1 source) at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.ToArray() at Emby.Server.Implementations.Dto.DtoService.AttachBasicFields(BaseItemDto dto, BaseItem item, BaseItem owner, DtoOptions options) in C:\git\jellyfin\Emby.Server.Implementations\Dto\DtoService.cs:line 742 at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner) in C:\git\jellyfin\Emby.Server.Implementations\Dto\DtoService.cs:line 231 at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDto(BaseItem item, DtoOptions options, User user, BaseItem owner) in C:\git\jellyfin\Emby.Server.Implementations\Dto\DtoService.cs:line 140 at Jellyfin.Api.Controllers.UserLibraryController.GetItem(Nullable`1 userId, Guid itemId) in C:\git\jellyfin\Jellyfin.Api\Controllers\UserLibraryController.cs:line 99 at lambda_method6983(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- ``` </details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:20:09 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#13851