From 1467c52e03ca711f54f202340bb68eabe2e5c50d Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 20 May 2018 22:57:53 -0700 Subject: [PATCH] Fixed: Multi-file torrents in Vuze with different folder and file names Fixes #2571 --- .../Clients/Transmission/TransmissionProxy.cs | 3 ++- .../Clients/Transmission/TransmissionTorrent.cs | 14 +------------- src/NzbDrone.Core/Download/Clients/Vuze/Vuze.cs | 2 +- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionProxy.cs b/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionProxy.cs index 567001e06..a461a5fa9 100644 --- a/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionProxy.cs @@ -172,7 +172,8 @@ namespace NzbDrone.Core.Download.Clients.Transmission "errorString", "uploadedEver", "downloadedEver", - "seedRatioLimit" + "seedRatioLimit", + "fileCount" }; var arguments = new Dictionary(); diff --git a/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionTorrent.cs b/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionTorrent.cs index c3369e337..377cc01f2 100644 --- a/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionTorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionTorrent.cs @@ -3,31 +3,19 @@ public class TransmissionTorrent { public int Id { get; set; } - public string HashString { get; set; } - public string Name { get; set; } - public string DownloadDir { get; set; } - public long TotalSize { get; set; } - public long LeftUntilDone { get; set; } - public bool IsFinished { get; set; } - public int Eta { get; set; } - public TransmissionTorrentStatus Status { get; set; } - public int SecondsDownloading { get; set; } - public string ErrorString { get; set; } - public long DownloadedEver { get; set; } - public long UploadedEver { get; set; } - public long SeedRatioLimit { get; set; } + public int FileCount { get; set; } } } diff --git a/src/NzbDrone.Core/Download/Clients/Vuze/Vuze.cs b/src/NzbDrone.Core/Download/Clients/Vuze/Vuze.cs index dc3bb712e..679294d32 100644 --- a/src/NzbDrone.Core/Download/Clients/Vuze/Vuze.cs +++ b/src/NzbDrone.Core/Download/Clients/Vuze/Vuze.cs @@ -30,7 +30,7 @@ namespace NzbDrone.Core.Download.Clients.Vuze // - A multi-file torrent is downloaded in a job folder and 'outputPath' points to that directory directly. // - A single-file torrent is downloaded in the root folder and 'outputPath' poinst to that root folder. // We have to make sure the return value points to the job folder OR file. - if (outputPath == null || outputPath.FileName == torrent.Name) + if (outputPath == null || outputPath.FileName == torrent.Name || torrent.FileCount > 1) { _logger.Trace("Vuze output directory: {0}", outputPath); }