From 1f9c76024630b61505d1de89dff29dd663c3d465 Mon Sep 17 00:00:00 2001 From: Christian Franchin Date: Sun, 1 Mar 2020 16:05:17 -0300 Subject: [PATCH] bjshare: multiple improvements (#7432) Add details to release when its from the last 24h list; change cat4 to PCGames; Changed category parsing on 24h list; Added parsing from 4K to 2160p --- src/Jackett.Common/Indexers/BJShare.cs | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/Jackett.Common/Indexers/BJShare.cs b/src/Jackett.Common/Indexers/BJShare.cs index dc16641df..7ec9c45f6 100644 --- a/src/Jackett.Common/Indexers/BJShare.cs +++ b/src/Jackett.Common/Indexers/BJShare.cs @@ -89,7 +89,7 @@ namespace Jackett.Common.Indexers AddCategoryMapping(13, TorznabCatType.TV, "Stand Up Comedy"); AddCategoryMapping(11, TorznabCatType.Other, "Video-Aula"); AddCategoryMapping(6, TorznabCatType.TV, "Vídeos de TV"); - AddCategoryMapping(4, TorznabCatType.Other, "Jogos"); + AddCategoryMapping(4, TorznabCatType.PCGames, "Jogos"); AddCategoryMapping(199, TorznabCatType.XXX, "Filmes Adultos"); AddCategoryMapping(200, TorznabCatType.XXX, "Jogos Adultos"); AddCategoryMapping(201, TorznabCatType.XXXImageset, "Fotos Adultas"); @@ -222,6 +222,7 @@ namespace Jackett.Common.Indexers var year = ""; release.Description = ""; + var extra_info = ""; foreach (var child in qBJinfoBox.ChildNodes) { var type = child.NodeType; @@ -245,16 +246,28 @@ namespace Jackett.Common.Indexers else if (line.StartsWith("Ano:")) { year = line.Substring("Ano: ".Length); - ; } else { release.Description += line + "\n"; + if (line.Contains(":")) + { + if(!(line.StartsWith("Lançado") || line.StartsWith("Resolução") || line.StartsWith("Idioma") || line.StartsWith("Autor"))) + { + var info = line.Substring(line.IndexOf(": ") + 2); + if (info == "Dual Áudio") + { + info = "Dual"; + } + extra_info += info + " "; + } + } } } + extra_info.Trim(); - var catStr = qCatLink.GetAttribute("href").Split('=')[1]; + var catStr = qCatLink.GetAttribute("href").Split('=')[1].Split('&')[0]; release.Title = FixAbsoluteNumbering(release.Title); if (year != "") @@ -268,6 +281,9 @@ namespace Jackett.Common.Indexers switch (quality) { + case "4K": + release.Title += " 2160p"; + break; case "Full HD": release.Title += " 1080p"; break; @@ -280,6 +296,8 @@ namespace Jackett.Common.Indexers } } + release.Title += " " + extra_info; + release.Category = MapTrackerCatToNewznab(catStr); release.Link = new Uri(SiteLink + qDlLink.GetAttribute("href")); release.Comments = new Uri(SiteLink + qDetailsLink.GetAttribute("href"));