diff --git a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs
index b06a582d4..e02bf646c 100644
--- a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs
+++ b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs
@@ -49,14 +49,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
_proxy.MoveTorrentToTopInQueue(hash, Settings);
}
- if (Settings.AddStopped)
- {
- _proxy.StopTorrent(hash, Settings);
- }
- else
- {
- _proxy.StartTorrent(hash, Settings);
- }
+ _proxy.SetState(hash, (UTorrentState)Settings.IntialState, Settings);
return hash;
}
@@ -74,14 +67,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
_proxy.MoveTorrentToTopInQueue(hash, Settings);
}
- if (Settings.AddStopped)
- {
- _proxy.StopTorrent(hash, Settings);
- }
- else
- {
- _proxy.StartTorrent(hash, Settings);
- }
+ _proxy.SetState(hash, (UTorrentState)Settings.IntialState, Settings);
return hash;
}
diff --git a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentProxy.cs b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentProxy.cs
index ffca992aa..c65e37c28 100644
--- a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentProxy.cs
+++ b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentProxy.cs
@@ -22,8 +22,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
void RemoveTorrent(string hash, bool removeData, UTorrentSettings settings);
void SetTorrentLabel(string hash, string label, UTorrentSettings settings);
void MoveTorrentToTopInQueue(string hash, UTorrentSettings settings);
- void StartTorrent(string hash, UTorrentSettings settings);
- void StopTorrent(string hash, UTorrentSettings settings);
+ void SetState(string hash, UTorrentState state, UTorrentSettings settings);
}
public class UTorrentProxy : IUTorrentProxy
@@ -159,19 +158,10 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
ProcessRequest(requestBuilder, settings);
}
- public void StartTorrent(string hash, UTorrentSettings settings)
+ public void SetState(string hash, UTorrentState state, UTorrentSettings settings)
{
var requestBuilder = BuildRequest(settings)
- .AddQueryParam("action", "start")
- .AddQueryParam("hash", hash);
-
- ProcessRequest(requestBuilder, settings);
- }
-
- public void StopTorrent(string hash, UTorrentSettings settings)
- {
- var requestBuilder = BuildRequest(settings)
- .AddQueryParam("action", "stop")
+ .AddQueryParam("action", state.ToString().ToLowerInvariant())
.AddQueryParam("hash", hash);
ProcessRequest(requestBuilder, settings);
diff --git a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentSettings.cs b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentSettings.cs
index 149cb89ab..bd88f901c 100644
--- a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentSettings.cs
+++ b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentSettings.cs
@@ -47,8 +47,8 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
[FieldDefinition(6, Label = "Older Priority", Type = FieldType.Select, SelectOptions = typeof(UTorrentPriority), HelpText = "Priority to use when grabbing episodes that aired over 14 days ago")]
public int OlderTvPriority { get; set; }
- [FieldDefinition(7, Label = "Add Stopped", Type = FieldType.Checkbox, SelectOptions = typeof(UTorrentPriority), HelpText = "Torrents will need to be started manually in uTorrent")]
- public bool AddStopped { get; set; }
+ [FieldDefinition(7, Label = "Initial State", Type = FieldType.Select, SelectOptions = typeof(UTorrentState), HelpText = "Initial state for torrents added to uTorrent")]
+ public int IntialState { get; set; }
public NzbDroneValidationResult Validate()
{
diff --git a/src/NzbDrone.Core/Download/Clients/uTorrent/UtorrentState.cs b/src/NzbDrone.Core/Download/Clients/uTorrent/UtorrentState.cs
new file mode 100644
index 000000000..17feaa485
--- /dev/null
+++ b/src/NzbDrone.Core/Download/Clients/uTorrent/UtorrentState.cs
@@ -0,0 +1,10 @@
+namespace NzbDrone.Core.Download.Clients.UTorrent
+{
+ public enum UTorrentState
+ {
+ Start = 0,
+ ForceStart = 1,
+ Pause = 2,
+ Stop = 3
+ }
+}
diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj
index afdbf7791..e7af7236f 100644
--- a/src/NzbDrone.Core/NzbDrone.Core.csproj
+++ b/src/NzbDrone.Core/NzbDrone.Core.csproj
@@ -495,6 +495,7 @@
+