mirror of https://github.com/Jackett/Jackett
transmitthenet (nebulance): handle both date settings, #5496
This commit is contained in:
parent
1a548d1c8c
commit
d4e776e23a
|
@ -137,7 +137,10 @@ namespace Jackett.Common.Indexers
|
||||||
release.Category = new List<int> { TvCategoryParser.ParseTvShowQuality(release.Title) };
|
release.Category = new List<int> { TvCategoryParser.ParseTvShowQuality(release.Title) };
|
||||||
|
|
||||||
var timeAnchor = row.QuerySelector("span[class='time']");
|
var timeAnchor = row.QuerySelector("span[class='time']");
|
||||||
release.PublishDate = DateTime.ParseExact(timeAnchor.TextContent.Trim(), "MMM dd yyyy, HH:mm", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal);
|
var publishdate = timeAnchor.GetAttribute("title");
|
||||||
|
release.PublishDate = !string.IsNullOrEmpty(publishdate) && publishdate.Contains(",")
|
||||||
|
? DateTime.ParseExact(publishdate, "MMM dd yyyy, HH:mm", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal)
|
||||||
|
: DateTime.ParseExact(timeAnchor.TextContent.Trim(), "MMM dd yyyy, HH:mm", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal);
|
||||||
release.Seeders = ParseUtil.CoerceInt(timeAnchor.ParentElement.NextElementSibling.NextElementSibling.TextContent.Trim());
|
release.Seeders = ParseUtil.CoerceInt(timeAnchor.ParentElement.NextElementSibling.NextElementSibling.TextContent.Trim());
|
||||||
release.Peers = ParseUtil.CoerceInt(timeAnchor.ParentElement.NextElementSibling.NextElementSibling.NextElementSibling.TextContent.Trim()) + release.Seeders;
|
release.Peers = ParseUtil.CoerceInt(timeAnchor.ParentElement.NextElementSibling.NextElementSibling.NextElementSibling.TextContent.Trim()) + release.Seeders;
|
||||||
release.Size = ReleaseInfo.GetBytes(timeAnchor.ParentElement.PreviousElementSibling.TextContent);
|
release.Size = ReleaseInfo.GetBytes(timeAnchor.ParentElement.PreviousElementSibling.TextContent);
|
||||||
|
|
Loading…
Reference in New Issue