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
@@ -254,7 +254,7 @@ namespace NzbDrone.Core.Indexers.Definitions
DownloadUrl = string.Format("{0}/download.php/{1}/download.torrent", _settings.BaseUrl, torrentId),
Guid = details,
PublishDate = DateTimeUtil.FromTimeAgo(qDescCol.ChildNodes.Last().TextContent),
Size = ReleaseInfo.GetBytes(sizeStr),
Size = ParseUtil.GetBytes(sizeStr),
Seeders = seeders,
Peers = ParseUtil.CoerceInt(row.Children[leechersIndex].TextContent.Trim()) + seeders,
DownloadVolumeFactor = row.QuerySelector("font > b:contains(Freeleech)") != null ? 0 : 1,