New: Improve size and number parsing

This commit is contained in:
Qstick
2021-10-06 21:55:35 -05:00
parent 25bb10d62b
commit 293b32ea0e
25 changed files with 103 additions and 68 deletions
@@ -280,7 +280,7 @@ namespace NzbDrone.Core.Indexers.Definitions
release.PublishDate = DateTime.ParseExact(dateString, "yyyy-MM-dd hh:mm tt", CultureInfo.InvariantCulture);
var sizeStr = row.QuerySelector("td:nth-of-type(5)").TextContent.Trim();
release.Size = ReleaseInfo.GetBytes(sizeStr);
release.Size = ParseUtil.GetBytes(sizeStr);
release.Seeders = ParseUtil.CoerceInt(row.QuerySelector("td:nth-of-type(7)").TextContent.Trim());
release.Peers = ParseUtil.CoerceInt(row.QuerySelector("td:nth-of-type(8)").TextContent.Trim()) + release.Seeders;