From a93f154e9d54e871526bb7093f8ba0d75f2451d9 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sat, 3 Aug 2024 13:32:46 +0300 Subject: [PATCH] assorted: fix imdbid parsing --- src/Jackett.Common/Indexers/Definitions/HDTorrents.cs | 3 +-- src/Jackett.Common/Indexers/Definitions/MTeamTp.cs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Jackett.Common/Indexers/Definitions/HDTorrents.cs b/src/Jackett.Common/Indexers/Definitions/HDTorrents.cs index 7191dc599..bd1a54d20 100644 --- a/src/Jackett.Common/Indexers/Definitions/HDTorrents.cs +++ b/src/Jackett.Common/Indexers/Definitions/HDTorrents.cs @@ -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 { diff --git a/src/Jackett.Common/Indexers/Definitions/MTeamTp.cs b/src/Jackett.Common/Indexers/Definitions/MTeamTp.cs index 98d20e68b..5a82690d7 100644 --- a/src/Jackett.Common/Indexers/Definitions/MTeamTp.cs +++ b/src/Jackett.Common/Indexers/Definitions/MTeamTp.cs @@ -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 &&