From 9d11d7e17f1eacd541f7dcae98004c8c8fbdf8e5 Mon Sep 17 00:00:00 2001 From: Erik P Date: Thu, 16 Nov 2023 18:33:53 +0100 Subject: [PATCH] Fixed: (PTP) Add IMDb ID to TV Search capabilities (#1920) Co-authored-by: Erik Persson --- .../Definitions/PassThePopcorn/PassThePopcorn.cs | 2 +- .../PassThePopcorn/PassThePopcornRequestGenerator.cs | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcorn.cs b/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcorn.cs index ea3fc925d..9cb147b48 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcorn.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcorn.cs @@ -45,7 +45,7 @@ namespace NzbDrone.Core.Indexers.Definitions.PassThePopcorn LimitsMax = PageSize, TvSearchParams = new List { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep + TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId }, MovieSearchParams = new List { diff --git a/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornRequestGenerator.cs index b88b793b2..17d9b1813 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornRequestGenerator.cs @@ -45,7 +45,14 @@ namespace NzbDrone.Core.Indexers.Definitions.PassThePopcorn { var pageableRequests = new IndexerPageableRequestChain(); - pageableRequests.Add(GetRequest($"{searchCriteria.SanitizedTvSearchString}", searchCriteria)); + if (searchCriteria.ImdbId.IsNotNullOrWhiteSpace()) + { + pageableRequests.Add(GetRequest(searchCriteria.FullImdbId, searchCriteria)); + } + else + { + pageableRequests.Add(GetRequest($"{searchCriteria.SanitizedTvSearchString}", searchCriteria)); + } return pageableRequests; }