[PR #4473] [MERGED] Don't throw exception when converting values using binder or JsonConv… #10093

Closed
opened 2026-02-07 06:13:59 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/4473
Author: @crobibero
Created: 11/12/2020
Status: Merged
Merged: 11/14/2020
Merged by: @cvium

Base: masterHead: binder-no-throw


📝 Commits (4)

  • 0c23b8c Don't throw exception when converting values using binder or JsonConverter
  • 5c40ad0 Remove conditional access.
  • cfefcd9 Updated based on review feedback
  • 450cd61 Update Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs

📊 Changes

3 files changed (+89 additions, -36 deletions)

View changed files

📝 Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs (+48 -17)
📝 MediaBrowser.Common/Json/Converters/JsonCommaDelimitedArrayConverter.cs (+24 -3)
📝 tests/Jellyfin.Api.Tests/ModelBinders/CommaDelimitedArrayModelBinderTests.cs (+17 -16)

📄 Description

Activator.CreateInstance with an IServiceProvider isn't available until .Net5, so silently ignore the invalid value for now.

Note: Invalid values in a proper json array will still throw exceptions, this is just for backwards compatibility.


🔄 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/4473 **Author:** [@crobibero](https://github.com/crobibero) **Created:** 11/12/2020 **Status:** ✅ Merged **Merged:** 11/14/2020 **Merged by:** [@cvium](https://github.com/cvium) **Base:** `master` ← **Head:** `binder-no-throw` --- ### 📝 Commits (4) - [`0c23b8c`](https://github.com/jellyfin/jellyfin/commit/0c23b8cadf8d4163b0db664a8b2cfb717181eb02) Don't throw exception when converting values using binder or JsonConverter - [`5c40ad0`](https://github.com/jellyfin/jellyfin/commit/5c40ad0530c10808317db742c39c2023bf9600f7) Remove conditional access. - [`cfefcd9`](https://github.com/jellyfin/jellyfin/commit/cfefcd988abf1b00c903d7f556199ca5647092b7) Updated based on review feedback - [`450cd61`](https://github.com/jellyfin/jellyfin/commit/450cd614acdd2425d1fc713ebeb7e5b3a7156a06) Update Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs ### 📊 Changes **3 files changed** (+89 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `Jellyfin.Api/ModelBinders/CommaDelimitedArrayModelBinder.cs` (+48 -17) 📝 `MediaBrowser.Common/Json/Converters/JsonCommaDelimitedArrayConverter.cs` (+24 -3) 📝 `tests/Jellyfin.Api.Tests/ModelBinders/CommaDelimitedArrayModelBinderTests.cs` (+17 -16) </details> ### 📄 Description [Activator.CreateInstance](https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.activatorutilities.createinstance?view=dotnet-plat-ext-5.0&viewFallbackFrom=netstandard-2.1#Microsoft_Extensions_DependencyInjection_ActivatorUtilities_CreateInstance_System_IServiceProvider_System_Type_System_Object___) with an `IServiceProvider` isn't available until .Net5, so silently ignore the invalid value for now. Note: Invalid values in a proper json array will still throw exceptions, this is just for backwards compatibility. --- <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 06:13:59 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#10093