mirror of https://github.com/Radarr/Radarr
Fixed: CustomFormat size specs in already grabbed check
Sizes need to be parsed as a long not an int else anything with a size > 2GiB will fail to be parsed and be set with size 0 Fixes #4262
This commit is contained in:
parent
1dd0df58ca
commit
09fe1bfc96
|
@ -79,9 +79,9 @@ namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests.AugmentersTests
|
||||||
[Test]
|
[Test]
|
||||||
public void should_add_size()
|
public void should_add_size()
|
||||||
{
|
{
|
||||||
var history = HistoryWithData("Size", 1500.ToString());
|
var history = HistoryWithData("Size", 9663676416.ToString());
|
||||||
var movieInfo = Subject.AugmentMovieInfo(MovieInfo, history);
|
var movieInfo = Subject.AugmentMovieInfo(MovieInfo, history);
|
||||||
movieInfo.ExtraInfo["Size"].ShouldBeEquivalentTo(1500);
|
movieInfo.ExtraInfo["Size"].ShouldBeEquivalentTo(9663676416);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace NzbDrone.Core.Parser.Augmenters
|
||||||
releaseInfo.IndexerId = indexerId;
|
releaseInfo.IndexerId = indexerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (int.TryParse(history.Data.GetValueOrDefault("size"), out var size))
|
if (long.TryParse(history.Data.GetValueOrDefault("size"), out var size))
|
||||||
{
|
{
|
||||||
releaseInfo.Size = size;
|
releaseInfo.Size = size;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue