From 0b0d6b7590f36972ad23fd1ee7a2674014f5044c Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 13 Sep 2023 12:29:26 +0300 Subject: [PATCH] Fixed: (SubsPlease) Update category mappings for movie releases Co-authored-by: Lemres <45440100+Calemy@users.noreply.github.com> Fixes #1866 --- .../Indexers/Definitions/SubsPlease.cs | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/NzbDrone.Core/Indexers/Definitions/SubsPlease.cs b/src/NzbDrone.Core/Indexers/Definitions/SubsPlease.cs index 1ad3f125b..d395e0ba1 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/SubsPlease.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/SubsPlease.cs @@ -43,7 +43,7 @@ namespace NzbDrone.Core.Indexers.Definitions public override IIndexerRequestGenerator GetRequestGenerator() { - return new SubsPleaseRequestGenerator() { Settings = Settings, Capabilities = Capabilities }; + return new SubsPleaseRequestGenerator { Settings = Settings, Capabilities = Capabilities }; } public override IParseIndexerResponse GetParser() @@ -56,12 +56,17 @@ namespace NzbDrone.Core.Indexers.Definitions var caps = new IndexerCapabilities { TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, + { + TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep + }, + MovieSearchParams = new List + { + MovieSearchParam.Q + } }; - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.TVAnime, "Anime"); + caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.TVAnime); + caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.MoviesOther); return caps; } @@ -205,6 +210,11 @@ namespace NzbDrone.Core.Indexers.Definitions UploadVolumeFactor = 1 }; + if (value.Episode.ToLowerInvariant() == "movie") + { + release.Categories.Add(NewznabStandardCategory.MoviesOther); + } + // Ex: [SubsPlease] Shingeki no Kyojin (The Final Season) - 64 (1080p) release.Title += $"[SubsPlease] {value.Show} - {value.Episode} ({d.Res}p)"; release.MagnetUrl = d.Magnet;