From e03906b294d4df8e31e9d33cd22dcad0ceb10121 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 17 Dec 2015 22:16:38 -0800 Subject: [PATCH] Fixed: Hardlink/Copy files from QBittorrent --- .../Download/Clients/qBittorrent/QBittorrent.cs | 14 ++++++++++++++ .../Clients/qBittorrent/QBittorrentTorrent.cs | 1 - 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Download/Clients/qBittorrent/QBittorrent.cs b/src/NzbDrone.Core/Download/Clients/qBittorrent/QBittorrent.cs index 6dfaf2382..fb48c090b 100644 --- a/src/NzbDrone.Core/Download/Clients/qBittorrent/QBittorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/qBittorrent/QBittorrent.cs @@ -12,6 +12,7 @@ using FluentValidation.Results; using System.Net; using NzbDrone.Core.Parser.Model; using NzbDrone.Core.RemotePathMappings; +using NzbDrone.Core.ThingiProvider; namespace NzbDrone.Core.Download.Clients.QBittorrent { @@ -79,6 +80,14 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent } } + public override ProviderMessage Message + { + get + { + return new ProviderMessage("Sonarr is unable to remove torrents that have finished seeding when using qBittorrent", ProviderMessageType.Warning); + } + } + public override IEnumerable GetItems() { List torrents; @@ -107,6 +116,11 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent item.RemainingTime = TimeSpan.FromSeconds(torrent.Eta); item.OutputPath = _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(torrent.SavePath)); + + // At the moment there isn't an easy way to detect if the torrent has + // reached the seeding limit, We would need to check the preferences + // and still not be completely sure if that torrent has a limit set for it + item.IsReadOnly = true; if (!item.OutputPath.IsEmpty && item.OutputPath.FileName != torrent.Name) { diff --git a/src/NzbDrone.Core/Download/Clients/qBittorrent/QBittorrentTorrent.cs b/src/NzbDrone.Core/Download/Clients/qBittorrent/QBittorrentTorrent.cs index 96a1fab08..2a982051d 100644 --- a/src/NzbDrone.Core/Download/Clients/qBittorrent/QBittorrentTorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/qBittorrent/QBittorrentTorrent.cs @@ -1,5 +1,4 @@ using Newtonsoft.Json; -using System; namespace NzbDrone.Core.Download.Clients.QBittorrent {