New: Option to Hardlink or Copy instead of move for Torrent Blackhole
Closes #1011
This commit is contained in:
parent
95da301975
commit
15cefe4a43
|
@ -103,6 +103,8 @@ namespace NzbDrone.Core.Download.Clients.TorrentBlackhole
|
||||||
historyItem.RemainingTime = TimeSpan.Zero;
|
historyItem.RemainingTime = TimeSpan.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
historyItem.IsReadOnly = Settings.ReadOnly;
|
||||||
|
|
||||||
yield return historyItem;
|
yield return historyItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,6 +134,8 @@ namespace NzbDrone.Core.Download.Clients.TorrentBlackhole
|
||||||
historyItem.RemainingTime = TimeSpan.Zero;
|
historyItem.RemainingTime = TimeSpan.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
historyItem.IsReadOnly = Settings.ReadOnly;
|
||||||
|
|
||||||
yield return historyItem;
|
yield return historyItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using FluentValidation;
|
using System.ComponentModel;
|
||||||
using System;
|
using FluentValidation;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using NzbDrone.Core.Annotations;
|
using NzbDrone.Core.Annotations;
|
||||||
using NzbDrone.Core.ThingiProvider;
|
using NzbDrone.Core.ThingiProvider;
|
||||||
using NzbDrone.Core.Validation;
|
using NzbDrone.Core.Validation;
|
||||||
|
@ -18,6 +19,11 @@ namespace NzbDrone.Core.Download.Clients.TorrentBlackhole
|
||||||
|
|
||||||
public class TorrentBlackholeSettings : IProviderConfig
|
public class TorrentBlackholeSettings : IProviderConfig
|
||||||
{
|
{
|
||||||
|
public TorrentBlackholeSettings()
|
||||||
|
{
|
||||||
|
ReadOnly = true;
|
||||||
|
}
|
||||||
|
|
||||||
private static readonly TorrentBlackholeSettingsValidator Validator = new TorrentBlackholeSettingsValidator();
|
private static readonly TorrentBlackholeSettingsValidator Validator = new TorrentBlackholeSettingsValidator();
|
||||||
|
|
||||||
[FieldDefinition(0, Label = "Torrent Folder", Type = FieldType.Path, HelpText = "Folder in which Sonarr will store the .torrent file")]
|
[FieldDefinition(0, Label = "Torrent Folder", Type = FieldType.Path, HelpText = "Folder in which Sonarr will store the .torrent file")]
|
||||||
|
@ -26,6 +32,11 @@ namespace NzbDrone.Core.Download.Clients.TorrentBlackhole
|
||||||
[FieldDefinition(1, Label = "Watch Folder", Type = FieldType.Path, HelpText = "Folder from which Sonarr should import completed downloads")]
|
[FieldDefinition(1, Label = "Watch Folder", Type = FieldType.Path, HelpText = "Folder from which Sonarr should import completed downloads")]
|
||||||
public string WatchFolder { get; set; }
|
public string WatchFolder { get; set; }
|
||||||
|
|
||||||
|
[DefaultValue(false)]
|
||||||
|
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
|
||||||
|
[FieldDefinition(2, Label = "Read Only", Type = FieldType.Checkbox, HelpText = "Instead of moving files this will instruct Sonarr to Copy or Hardlink (depending on settings/system configuration)")]
|
||||||
|
public bool ReadOnly { get; set; }
|
||||||
|
|
||||||
public NzbDroneValidationResult Validate()
|
public NzbDroneValidationResult Validate()
|
||||||
{
|
{
|
||||||
return new NzbDroneValidationResult(Validator.Validate(this));
|
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||||
|
|
Loading…
Reference in New Issue