1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-02-24 23:22:46 +00:00

DanishBits: Add new attributes

This commit is contained in:
kaso17 2016-12-02 14:43:29 +01:00
parent d84bd074c0
commit c134e72979

View file

@ -13,7 +13,8 @@ using System.Threading.Tasks;
using System.Web;
using CsQuery.ExtensionMethods;
using Jackett.Models.IndexerConfig;
using Jackett.Utils;
namespace Jackett.Indexers
{
public class DanishBits : BaseIndexer, IIndexer
@ -264,6 +265,23 @@ namespace Jackett.Indexers
var referrerUrl = imdbAnchor.GetAttribute("href");
release.Imdb = long.Parse(Regex.Match(referrerUrl, "tt(?<imdbId>[0-9]+)").Groups["imdbId"].Value);
}
var Files = qRow.Find("td:nth-child(3) > div");
release.Files = ParseUtil.CoerceLong(Files.Text().Split(' ')[0]);
var Grabs = qRow.Find("td:nth-child(6)");
release.Grabs = ParseUtil.CoerceLong(Grabs.Text());
if (qRow.Find("img[src=\"/static/common/torrents/gratis.png\"]").Length >= 1)
release.DownloadVolumeFactor = 0;
else
release.DownloadVolumeFactor = 1;
if (qRow.Find("img[src=\"/static/common/torrents/toxupload.png\"]").Length >= 1)
release.UploadVolumeFactor = 2;
else
release.UploadVolumeFactor = 1;
releases.Add(release);
}
}