mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-29 00:00:50 +02:00
Cleanup BooleanConverter to STJson
This commit is contained in:
parent
82688d8a55
commit
52c6b56a4c
3 changed files with 1 additions and 10 deletions
|
|
@ -36,6 +36,7 @@ public static void ApplySerializerSettings(JsonSerializerOptions serializerSetti
|
|||
serializerSettings.Converters.Add(new STJTimeSpanConverter());
|
||||
serializerSettings.Converters.Add(new STJUtcConverter());
|
||||
serializerSettings.Converters.Add(new DictionaryStringObjectConverter());
|
||||
serializerSettings.Converters.Add(new BooleanConverter());
|
||||
}
|
||||
|
||||
public static T Deserialize<T>(string json)
|
||||
|
|
|
|||
|
|
@ -451,22 +451,16 @@ public class BeyondHDTorrent
|
|||
[JsonPropertyName("tmdb_id")]
|
||||
public string TmdbId { get; set; }
|
||||
|
||||
[JsonConverter(typeof(BooleanConverter))]
|
||||
public bool Freeleech { get; set; }
|
||||
|
||||
[JsonConverter(typeof(BooleanConverter))]
|
||||
public bool Promo25 { get; set; }
|
||||
|
||||
[JsonConverter(typeof(BooleanConverter))]
|
||||
public bool Promo50 { get; set; }
|
||||
|
||||
[JsonConverter(typeof(BooleanConverter))]
|
||||
public bool Promo75 { get; set; }
|
||||
|
||||
[JsonConverter(typeof(BooleanConverter))]
|
||||
public bool Limited { get; set; }
|
||||
|
||||
[JsonConverter(typeof(BooleanConverter))]
|
||||
public bool Internal { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System.Text.Json.Serialization;
|
||||
using NzbDrone.Common.Serializer;
|
||||
|
||||
namespace NzbDrone.Core.Indexers.Definitions.FileList;
|
||||
|
||||
|
|
@ -23,15 +22,12 @@ public class FileListTorrent
|
|||
[JsonPropertyName("imdb")]
|
||||
public string ImdbId { get; set; }
|
||||
|
||||
[JsonConverter(typeof(BooleanConverter))]
|
||||
public bool Internal { get; set; }
|
||||
|
||||
[JsonPropertyName("freeleech")]
|
||||
[JsonConverter(typeof(BooleanConverter))]
|
||||
public bool FreeLeech { get; set; }
|
||||
|
||||
[JsonPropertyName("doubleup")]
|
||||
[JsonConverter(typeof(BooleanConverter))]
|
||||
public bool DoubleUp { get; set; }
|
||||
|
||||
[JsonPropertyName("upload_date")]
|
||||
|
|
|
|||
Loading…
Reference in a new issue