Remove GeneratedCode annotations.
This commit is contained in:
parent
7c99a79757
commit
9e0d39b247
|
@ -1,4 +1,3 @@
|
||||||
using System.CodeDom.Compiler;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
@ -7,7 +6,6 @@ using Newtonsoft.Json.Converters;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Download.Clients.Tribler
|
namespace NzbDrone.Core.Download.Clients.Tribler
|
||||||
{
|
{
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public enum DownloadStatus
|
public enum DownloadStatus
|
||||||
{
|
{
|
||||||
[EnumMember(Value = @"WAITING4HASHCHECK")]
|
[EnumMember(Value = @"WAITING4HASHCHECK")]
|
||||||
|
@ -39,10 +37,8 @@ namespace NzbDrone.Core.Download.Clients.Tribler
|
||||||
|
|
||||||
[EnumMember(Value = @"STOPPED_ON_ERROR")]
|
[EnumMember(Value = @"STOPPED_ON_ERROR")]
|
||||||
StoppedOnError = 9,
|
StoppedOnError = 9,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class Trackers
|
public class Trackers
|
||||||
{
|
{
|
||||||
[JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
@ -53,11 +49,8 @@ namespace NzbDrone.Core.Download.Clients.Tribler
|
||||||
|
|
||||||
[JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
public string Status { get; set; }
|
public string Status { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class Download
|
public class Download
|
||||||
{
|
{
|
||||||
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
@ -152,14 +145,12 @@ namespace NzbDrone.Core.Download.Clients.Tribler
|
||||||
public bool? ChannelDownload { get; set; }
|
public bool? ChannelDownload { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class DownloadsResponse
|
public class DownloadsResponse
|
||||||
{
|
{
|
||||||
[JsonProperty("downloads", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("downloads", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
public ICollection<Download> Downloads { get; set; }
|
public ICollection<Download> Downloads { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class AddDownloadRequest
|
public class AddDownloadRequest
|
||||||
{
|
{
|
||||||
[JsonProperty("anon_hops", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("anon_hops", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
@ -176,7 +167,6 @@ namespace NzbDrone.Core.Download.Clients.Tribler
|
||||||
public string Uri { get; set; }
|
public string Uri { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class AddDownloadResponse
|
public class AddDownloadResponse
|
||||||
{
|
{
|
||||||
[JsonProperty("infohash", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("infohash", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
@ -186,14 +176,12 @@ namespace NzbDrone.Core.Download.Clients.Tribler
|
||||||
public bool? Started { get; set; }
|
public bool? Started { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class RemoveDownloadRequest
|
public class RemoveDownloadRequest
|
||||||
{
|
{
|
||||||
[JsonProperty("remove_data", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("remove_data", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
public bool? RemoveData { get; set; }
|
public bool? RemoveData { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class DeleteDownloadResponse
|
public class DeleteDownloadResponse
|
||||||
{
|
{
|
||||||
[JsonProperty("removed", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("removed", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
@ -203,7 +191,6 @@ namespace NzbDrone.Core.Download.Clients.Tribler
|
||||||
public string Infohash { get; set; }
|
public string Infohash { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class UpdateDownloadRequest
|
public class UpdateDownloadRequest
|
||||||
{
|
{
|
||||||
[JsonProperty("anon_hops", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("anon_hops", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
@ -216,7 +203,6 @@ namespace NzbDrone.Core.Download.Clients.Tribler
|
||||||
public string State { get; set; }
|
public string State { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class UpdateDownloadResponse
|
public class UpdateDownloadResponse
|
||||||
{
|
{
|
||||||
[JsonProperty("modified", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("modified", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
@ -226,7 +212,6 @@ namespace NzbDrone.Core.Download.Clients.Tribler
|
||||||
public string Infohash { get; set; }
|
public string Infohash { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class File
|
public class File
|
||||||
{
|
{
|
||||||
[JsonProperty("size", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("size", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
@ -245,7 +230,6 @@ namespace NzbDrone.Core.Download.Clients.Tribler
|
||||||
public bool? Included { get; set; }
|
public bool? Included { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class GetFilesResponse
|
public class GetFilesResponse
|
||||||
{
|
{
|
||||||
[JsonProperty("files", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("files", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
|
|
@ -1,19 +1,15 @@
|
||||||
using System.CodeDom.Compiler;
|
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Converters;
|
using Newtonsoft.Json.Converters;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Indexers.Tribler
|
namespace NzbDrone.Core.Indexers.Tribler
|
||||||
{
|
{
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class GetTriblerSettingsResponse
|
public class GetTriblerSettingsResponse
|
||||||
{
|
{
|
||||||
[JsonProperty("settings", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("settings", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
public Settings Settings { get; set; }
|
public Settings Settings { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class Settings
|
public class Settings
|
||||||
{
|
{
|
||||||
[JsonProperty("general", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("general", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
@ -27,11 +23,8 @@ namespace NzbDrone.Core.Indexers.Tribler
|
||||||
|
|
||||||
[JsonProperty("download_defaults", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("download_defaults", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
public DownloadDefaults DownloadDefaults { get; set; }
|
public DownloadDefaults DownloadDefaults { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class General
|
public class General
|
||||||
{
|
{
|
||||||
[JsonProperty("log_dir", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("log_dir", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
@ -47,8 +40,6 @@ namespace NzbDrone.Core.Indexers.Tribler
|
||||||
public bool? TestNet { get; set; }
|
public bool? TestNet { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class TunnelCommunity
|
public class TunnelCommunity
|
||||||
{
|
{
|
||||||
[JsonProperty("exitnode_enabled", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("exitnode_enabled", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
@ -73,16 +64,12 @@ namespace NzbDrone.Core.Indexers.Tribler
|
||||||
public bool? TestNet { get; set; }
|
public bool? TestNet { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class Dht
|
public class Dht
|
||||||
{
|
{
|
||||||
[JsonProperty("enabled", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("enabled", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
public bool? Enabled { get; set; }
|
public bool? Enabled { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public class DownloadDefaults
|
public class DownloadDefaults
|
||||||
{
|
{
|
||||||
[JsonProperty("anonymity_enabled", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("anonymity_enabled", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
@ -106,11 +93,8 @@ namespace NzbDrone.Core.Indexers.Tribler
|
||||||
|
|
||||||
[JsonProperty("seeding_time", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("seeding_time", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
public double? SeedingTime { get; set; }
|
public double? SeedingTime { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
|
|
||||||
public enum DownloadDefaultsSeedingMode
|
public enum DownloadDefaultsSeedingMode
|
||||||
{
|
{
|
||||||
[EnumMember(Value = @"ratio")]
|
[EnumMember(Value = @"ratio")]
|
||||||
|
@ -124,6 +108,5 @@ namespace NzbDrone.Core.Indexers.Tribler
|
||||||
|
|
||||||
[EnumMember(Value = @"never")]
|
[EnumMember(Value = @"never")]
|
||||||
Never = 3,
|
Never = 3,
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,6 @@ namespace NzbDrone.Core.Download.Clients.Tribler
|
||||||
|
|
||||||
public string AddFromMagnetLink(TriblerDownloadSettings settings, AddDownloadRequest downloadRequest)
|
public string AddFromMagnetLink(TriblerDownloadSettings settings, AddDownloadRequest downloadRequest)
|
||||||
{
|
{
|
||||||
// run hash through InfoHash class to ensure the correct casing.
|
|
||||||
var addDownloadRequestBuilder = getRequestBuilder(settings, "downloads");
|
var addDownloadRequestBuilder = getRequestBuilder(settings, "downloads");
|
||||||
addDownloadRequestBuilder.Method = System.Net.Http.HttpMethod.Put;
|
addDownloadRequestBuilder.Method = System.Net.Http.HttpMethod.Put;
|
||||||
|
|
||||||
|
@ -130,6 +129,7 @@ namespace NzbDrone.Core.Download.Clients.Tribler
|
||||||
|
|
||||||
var infoHashAsString = ProcessRequest<AddDownloadResponse>(addDownloadRequest).Infohash;
|
var infoHashAsString = ProcessRequest<AddDownloadResponse>(addDownloadRequest).Infohash;
|
||||||
|
|
||||||
|
// run hash through InfoHash class to ensure the correct casing.
|
||||||
var infoHash = MonoTorrent.InfoHash.FromHex(infoHashAsString);
|
var infoHash = MonoTorrent.InfoHash.FromHex(infoHashAsString);
|
||||||
return infoHash.ToHex();
|
return infoHash.ToHex();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue