1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-17 15:02:34 +02:00

Fixed: Hardlink/Copy files from QBittorrent

This commit is contained in:
Mark McDowall 2015-12-17 22:16:38 -08:00
parent 7921dd3f96
commit e03906b294
2 changed files with 14 additions and 1 deletions

View File

@ -12,6 +12,7 @@
using System.Net; using System.Net;
using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.RemotePathMappings; using NzbDrone.Core.RemotePathMappings;
using NzbDrone.Core.ThingiProvider;
namespace NzbDrone.Core.Download.Clients.QBittorrent namespace NzbDrone.Core.Download.Clients.QBittorrent
{ {
@ -79,6 +80,14 @@ public override string Name
} }
} }
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<DownloadClientItem> GetItems() public override IEnumerable<DownloadClientItem> GetItems()
{ {
List<QBittorrentTorrent> torrents; List<QBittorrentTorrent> torrents;
@ -107,6 +116,11 @@ public override IEnumerable<DownloadClientItem> GetItems()
item.RemainingTime = TimeSpan.FromSeconds(torrent.Eta); item.RemainingTime = TimeSpan.FromSeconds(torrent.Eta);
item.OutputPath = _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(torrent.SavePath)); 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) if (!item.OutputPath.IsEmpty && item.OutputPath.FileName != torrent.Name)
{ {

View File

@ -1,5 +1,4 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using System;
namespace NzbDrone.Core.Download.Clients.QBittorrent namespace NzbDrone.Core.Download.Clients.QBittorrent
{ {