From 2e5c7e00732a6c29540f624493b23fa5a8cbfb42 Mon Sep 17 00:00:00 2001 From: Qstick Date: Mon, 30 Dec 2019 22:30:17 -0500 Subject: [PATCH] Fixed: Fallback to Title and Year for PTP if IMDB doesn't exist Fixes #3509 --- .../PassThePopcorn/PassThePopcornRequestGenerator.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornRequestGenerator.cs b/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornRequestGenerator.cs index d0e91f161..d98339c16 100644 --- a/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornRequestGenerator.cs @@ -28,7 +28,16 @@ public virtual IndexerPageableRequestChain GetRecentRequests() public IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); - pageableRequests.Add(GetRequest(searchCriteria.Movie.ImdbId)); + + if (searchCriteria.Movie.ImdbId.IsNotNullOrWhiteSpace()) + { + pageableRequests.Add(GetRequest(searchCriteria.Movie.ImdbId)); + } + else if (searchCriteria.Movie.Year > 0) + { + pageableRequests.Add(GetRequest(string.Format("{0}&year={1}", searchCriteria.Movie.Title, searchCriteria.Movie.Year))); + } + return pageableRequests; }