|
|
@ -2,13 +2,14 @@ using System;
|
|
|
|
using System.Diagnostics;
|
|
|
|
using System.Diagnostics;
|
|
|
|
using NzbDrone.Common.Disk;
|
|
|
|
using NzbDrone.Common.Disk;
|
|
|
|
using NzbDrone.Core.Indexers;
|
|
|
|
using NzbDrone.Core.Indexers;
|
|
|
|
|
|
|
|
using NzbDrone.Core.ThingiProvider;
|
|
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Download
|
|
|
|
namespace NzbDrone.Core.Download
|
|
|
|
{
|
|
|
|
{
|
|
|
|
[DebuggerDisplay("{DownloadClient}:{Title}")]
|
|
|
|
[DebuggerDisplay("{DownloadClientName}:{Title}")]
|
|
|
|
public class DownloadClientItem
|
|
|
|
public class DownloadClientItem
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public string DownloadClient { get; set; }
|
|
|
|
public DownloadClientItemClientInfo DownloadClientInfo { get; set; }
|
|
|
|
public string DownloadId { get; set; }
|
|
|
|
public string DownloadId { get; set; }
|
|
|
|
public string Category { get; set; }
|
|
|
|
public string Category { get; set; }
|
|
|
|
public string Title { get; set; }
|
|
|
|
public string Title { get; set; }
|
|
|
@ -17,13 +18,10 @@ namespace NzbDrone.Core.Download
|
|
|
|
public long RemainingSize { get; set; }
|
|
|
|
public long RemainingSize { get; set; }
|
|
|
|
public TimeSpan? RemainingTime { get; set; }
|
|
|
|
public TimeSpan? RemainingTime { get; set; }
|
|
|
|
public double? SeedRatio { get; set; }
|
|
|
|
public double? SeedRatio { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public OsPath OutputPath { get; set; }
|
|
|
|
public OsPath OutputPath { get; set; }
|
|
|
|
public string Message { get; set; }
|
|
|
|
public string Message { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public DownloadItemStatus Status { get; set; }
|
|
|
|
public DownloadItemStatus Status { get; set; }
|
|
|
|
public bool IsEncrypted { get; set; }
|
|
|
|
public bool IsEncrypted { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public bool CanMoveFiles { get; set; }
|
|
|
|
public bool CanMoveFiles { get; set; }
|
|
|
|
public bool CanBeRemoved { get; set; }
|
|
|
|
public bool CanBeRemoved { get; set; }
|
|
|
|
public bool Removed { get; set; }
|
|
|
|
public bool Removed { get; set; }
|
|
|
@ -41,6 +39,16 @@ namespace NzbDrone.Core.Download
|
|
|
|
public int Id { get; set; }
|
|
|
|
public int Id { get; set; }
|
|
|
|
public string Name { get; set; }
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public bool Removed { get; set; }
|
|
|
|
public static DownloadClientItemClientInfo FromDownloadClient<TSettings>(DownloadClientBase<TSettings> downloadClient)
|
|
|
|
|
|
|
|
where TSettings : IProviderConfig, new()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new DownloadClientItemClientInfo
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Protocol = downloadClient.Protocol,
|
|
|
|
|
|
|
|
Type = downloadClient.Name,
|
|
|
|
|
|
|
|
Id = downloadClient.Definition.Id,
|
|
|
|
|
|
|
|
Name = downloadClient.Definition.Name
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|