From ed94d47cdd356ec69a86ebc9cb0b09c702ba06be Mon Sep 17 00:00:00 2001 From: Qstick Date: Tue, 7 Aug 2018 21:24:26 -0400 Subject: [PATCH] Fixed: Too big eta in qbit api still occurring on official builds Co-Authored-By: taloth --- build.sh | 9 --------- .../QBittorrentTests/QBittorrentFixture.cs | 8 ++++++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/build.sh b/build.sh index 5b26dedb1..b0fe7c999 100755 --- a/build.sh +++ b/build.sh @@ -67,13 +67,6 @@ CleanFolder() find $path -depth -empty -type d -exec rm -r "{}" \; } -AddJsonNet() -{ - rm $outputFolder/Newtonsoft.Json.* - cp $sourceFolder/packages/Newtonsoft.Json.*/lib/net45/*.dll $outputFolder - cp $sourceFolder/packages/Newtonsoft.Json.*/lib/net45/*.dll $updateFolder -} - BuildWithMSBuild() { installationPath=`$vswhere -latest -products \* -requires Microsoft.Component.MSBuild -property installationPath` @@ -121,8 +114,6 @@ Build() CleanFolder $outputFolder false - AddJsonNet - echo "Removing Mono.Posix.dll" rm $outputFolder/Mono.Posix.dll diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/QBittorrentTests/QBittorrentFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/QBittorrentTests/QBittorrentFixture.cs index 674eefd04..35cd9e9ab 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/QBittorrentTests/QBittorrentFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/QBittorrentTests/QBittorrentFixture.cs @@ -495,5 +495,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests var item = Subject.GetItems().Single(); item.Category.Should().Be(category); } + + [Test] + public void should_handle_eta_biginteger() + { + var json = "{ \"eta\": 18446744073709335000 }"; + var torrent = Newtonsoft.Json.JsonConvert.DeserializeObject(json); + torrent.Eta.ToString().Should().Be("18446744073709335000"); + } } }