2014-11-24 00:07:46 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using NzbDrone.Core.Datastore;
|
|
|
|
|
using NzbDrone.Core.Indexers;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Profiles.Delay
|
|
|
|
|
{
|
|
|
|
|
public class DelayProfile : ModelBase
|
|
|
|
|
{
|
2014-12-03 01:18:17 +00:00
|
|
|
|
public bool EnableUsenet { get; set; }
|
|
|
|
|
public bool EnableTorrent { get; set; }
|
2014-11-24 00:07:46 +00:00
|
|
|
|
public DownloadProtocol PreferredProtocol { get; set; }
|
|
|
|
|
public int UsenetDelay { get; set; }
|
|
|
|
|
public int TorrentDelay { get; set; }
|
|
|
|
|
public int Order { get; set; }
|
2021-05-08 23:45:04 +00:00
|
|
|
|
public bool BypassIfHighestQuality { get; set; }
|
2014-11-24 00:07:46 +00:00
|
|
|
|
public HashSet<int> Tags { get; set; }
|
|
|
|
|
|
|
|
|
|
public DelayProfile()
|
|
|
|
|
{
|
|
|
|
|
Tags = new HashSet<int>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int GetProtocolDelay(DownloadProtocol protocol)
|
|
|
|
|
{
|
|
|
|
|
return protocol == DownloadProtocol.Torrent ? TorrentDelay : UsenetDelay;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|