Ignore `Grabbed` with STJson

(cherry picked from commit cc5b5463f225604a29820e026a43d7dc33f0ffa5)

Closes #4824
This commit is contained in:
Bogdan 2024-05-14 00:48:01 +03:00
parent ceca76d7c0
commit 959f6be019
2 changed files with 4 additions and 4 deletions

View File

@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json.Serialization;
using Lidarr.Api.V1.Artist;
using Lidarr.Http.REST;
using Newtonsoft.Json;
using NzbDrone.Core.MediaCover;
using NzbDrone.Core.Music;
using Swashbuckle.AspNetCore.Annotations;
@ -49,7 +49,7 @@ namespace Lidarr.Api.V1.Albums
public string RemoteCover { get; set; }
// Hiding this so people don't think its usable (only used to set the initial state)
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[SwaggerIgnore]
public bool Grabbed { get; set; }
}

View File

@ -1,9 +1,9 @@
using System.Collections.Generic;
using System.Linq;
using System.Text.Json.Serialization;
using Lidarr.Api.V1.Artist;
using Lidarr.Api.V1.TrackFiles;
using Lidarr.Http.REST;
using Newtonsoft.Json;
using NzbDrone.Core.Music;
using Swashbuckle.AspNetCore.Annotations;
@ -29,7 +29,7 @@ namespace Lidarr.Api.V1.Tracks
public Ratings Ratings { get; set; }
// Hiding this so people don't think its usable (only used to set the initial state)
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[SwaggerIgnore]
public bool Grabbed { get; set; }
}