Add MediaStreamProtocol enum (#10153)

* Add MediaStreamProtocol enum

* Add default handling for enum during deserialization

---------

Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
Niels van Velzen
2024-03-05 00:44:54 +01:00
committed by GitHub
parent 83d2bc3f9f
commit 407cf5d0bf
15 changed files with 271 additions and 30 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
using Jellyfin.Extensions.Json;
namespace MediaBrowser.Providers.Plugins.Omdb
{
@@ -12,7 +13,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
/// <inheritdoc />
public override string? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
if (reader.TokenType == JsonTokenType.Null)
if (reader.IsNull())
{
return null;
}