brasiltracker: fix imdb #13315

This commit is contained in:
Garfield69
2022-06-26 09:01:12 +12:00
parent 81c93f5d3a
commit 9b07b7dd32

View File

@@ -149,6 +149,8 @@ namespace Jackett.Common.Indexers
string groupTitle = null; string groupTitle = null;
string groupYearStr = null; string groupYearStr = null;
Uri groupPoster = null; Uri groupPoster = null;
string imdbLink = null;
string tmdbLink = null;
foreach (var row in rows) foreach (var row in rows)
try try
{ {
@@ -202,6 +204,8 @@ namespace Jackett.Common.Indexers
{ {
groupTitle = title; groupTitle = title;
groupYearStr = yearStr; groupYearStr = yearStr;
imdbLink = row.QuerySelector("a[href*=\"imdb.com/title/tt\"]")?.GetAttribute("href");
tmdbLink = row.QuerySelector("a[href*=\"themoviedb.org/\"]")?.GetAttribute("href");
continue; continue;
} }
} }
@@ -226,11 +230,11 @@ namespace Jackett.Common.Indexers
{ {
release.Description = row.QuerySelector("div.torrent_info").TextContent; release.Description = row.QuerySelector("div.torrent_info").TextContent;
release.Title = ParseTitle(title, seasonEp, yearStr); release.Title = ParseTitle(title, seasonEp, yearStr);
imdbLink = row.QuerySelector("a[href*=\"imdb.com/title/tt\"]")?.GetAttribute("href");
tmdbLink = row.QuerySelector("a[href*=\"themoviedb.org/\"]")?.GetAttribute("href");
} }
release.Poster = groupPoster; release.Poster = groupPoster;
var imdbLink = row.QuerySelector("a[href*=\"imdb.com/title/tt\"]")?.GetAttribute("href");
release.Imdb = ParseUtil.GetLongFromString(imdbLink); release.Imdb = ParseUtil.GetLongFromString(imdbLink);
var tmdbLink = row.QuerySelector("a[href*=\"themoviedb.org/\"]")?.GetAttribute("href");
release.TMDb = ParseUtil.GetLongFromString(tmdbLink); release.TMDb = ParseUtil.GetLongFromString(tmdbLink);
release.Category = category; release.Category = category;
release.Description = release.Description.Replace(" / Free", ""); // Remove Free Tag release.Description = release.Description.Replace(" / Free", ""); // Remove Free Tag