mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 18:14:42 +01:00
Fix Json serialization error
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace MediaBrowser.Model.Dto
|
||||
{
|
||||
@@ -41,7 +41,7 @@ namespace MediaBrowser.Model.Dto
|
||||
/// Gets a value indicating whether this instance has primary image.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
|
||||
[IgnoreDataMember]
|
||||
[JsonIgnore]
|
||||
public bool HasPrimaryImage => PrimaryImageTag != null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using MediaBrowser.Model.Session;
|
||||
|
||||
namespace MediaBrowser.Model.Dto
|
||||
@@ -108,7 +108,7 @@ namespace MediaBrowser.Model.Dto
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
[JsonIgnore]
|
||||
public TranscodeReason[] TranscodeReasons { get; set; }
|
||||
|
||||
public int? DefaultAudioStreamIndex { get; set; }
|
||||
@@ -148,7 +148,7 @@ namespace MediaBrowser.Model.Dto
|
||||
return null;
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
[JsonIgnore]
|
||||
public MediaStream VideoStream
|
||||
{
|
||||
get
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.2.0" />
|
||||
<PackageReference Include="System.Text.Json" Version="4.6.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Serialization
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
|
||||
public sealed class IgnoreDataMemberAttribute : Attribute
|
||||
{
|
||||
public IgnoreDataMemberAttribute()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace MediaBrowser.Model.Updates
|
||||
{
|
||||
@@ -36,7 +36,7 @@ namespace MediaBrowser.Model.Updates
|
||||
/// Had to make this an interpreted property since Protobuf can't handle Version
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
[IgnoreDataMember]
|
||||
[JsonIgnore]
|
||||
public Version Version
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user