Skip to content

Commit 3705467

Browse files
committed
Fixed: Too big eta in qbit api still occurring on official builds.
1 parent 86bc5c5 commit 3705467

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

build.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,6 @@ CleanFolder()
5252
find $path -depth -empty -type d -exec rm -r "{}" \;
5353
}
5454

55-
56-
57-
AddJsonNet()
58-
{
59-
rm $outputFolder/Newtonsoft.Json.*
60-
cp $sourceFolder/packages/Newtonsoft.Json.*/lib/net35/*.dll $outputFolder
61-
cp $sourceFolder/packages/Newtonsoft.Json.*/lib/net35/*.dll $outputFolder/NzbDrone.Update
62-
}
63-
6455
BuildWithMSBuild()
6556
{
6657
export PATH=$msBuild:$PATH
@@ -91,8 +82,6 @@ Build()
9182

9283
CleanFolder $outputFolder false
9384

94-
AddJsonNet
95-
9685
echo "Removing Mono.Posix.dll"
9786
rm $outputFolder/Mono.Posix.dll
9887

src/NzbDrone.Core.Test/Download/DownloadClientTests/QBittorrentTests/QBittorrentFixture.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,5 +495,18 @@ public void should_get_category_from_the_label_if_the_category_is_not_available(
495495
var item = Subject.GetItems().Single();
496496
item.Category.Should().Be(category);
497497
}
498+
499+
[Test]
500+
public void should_handle_eta_biginteger()
501+
{
502+
// Let this stand as a lesson to never write temporary unit tests on your dev machine and claim it works.
503+
// Commit the tests and let it run with the official build on the official build agents.
504+
// (Also don't replace library versions in your build script)
505+
506+
var json = "{ \"eta\": 18446744073709335000 }";
507+
var torrent = Newtonsoft.Json.JsonConvert.DeserializeObject<QBittorrentTorrent>(json);
508+
torrent.Eta.ToString().Should().Be("18446744073709335000");
509+
510+
}
498511
}
499512
}

0 commit comments

Comments
 (0)