assorted: fix imdbid parsing

This commit is contained in:
Bogdan 2024-08-03 13:32:46 +03:00
parent d996bec024
commit a93f154e9d
2 changed files with 2 additions and 3 deletions

View File

@ -246,8 +246,7 @@ namespace Jackett.Common.Indexers.Definitions
else if (row.QuerySelector("img[src$=\"75.png\"]") != null)
dlVolumeFactor = 0.25;
var imdbLink = row.QuerySelector("a[href*=\"www.imdb.com/title/\"]")?.GetAttribute("href");
var imdb = !string.IsNullOrWhiteSpace(imdbLink) ? ParseUtil.GetLongFromString(imdbLink) : null;
var imdb = ParseUtil.GetImdbId(row.QuerySelector("a[href*=\"www.imdb.com/title/\"]")?.GetAttribute("href")?.TrimEnd('/')?.Split('/')?.LastOrDefault());
var release = new ReleaseInfo
{

View File

@ -290,7 +290,7 @@ namespace Jackett.Common.Indexers.Definitions
if (torrent.Imdb.IsNotNullOrWhiteSpace())
{
release.Imdb = ParseUtil.GetImdbId(torrent.Imdb.Split('/').LastOrDefault()).GetValueOrDefault();
release.Imdb = ParseUtil.GetImdbId(torrent.Imdb.TrimEnd('/').Split('/').LastOrDefault()).GetValueOrDefault();
}
if (torrent.Status?.CreatedDate != null &&