From 75c30dd318ddb8707aef98d174b46054cb1aaf72 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 4 Oct 2023 19:51:49 +0300 Subject: [PATCH] Add year to XML results --- src/NzbDrone.Core/IndexerSearch/NewznabResults.cs | 1 + .../Indexers/Definitions/PassThePopcorn/PassThePopcornParser.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/NzbDrone.Core/IndexerSearch/NewznabResults.cs b/src/NzbDrone.Core/IndexerSearch/NewznabResults.cs index 2845b8972..e41d758d4 100644 --- a/src/NzbDrone.Core/IndexerSearch/NewznabResults.cs +++ b/src/NzbDrone.Core/IndexerSearch/NewznabResults.cs @@ -108,6 +108,7 @@ from r in Releases GetNabElement("files", r.Files, protocol), GetNabElement("grabs", r.Grabs, protocol), GetNabElement("peers", t.Peers, protocol), + r.Year == 0 ? null : GetNabElement("year", r.Year, protocol), GetNabElement("author", RemoveInvalidXMLChars(r.Author), protocol), GetNabElement("booktitle", RemoveInvalidXMLChars(r.BookTitle), protocol), GetNabElement("artist", RemoveInvalidXMLChars(r.Artist), protocol), diff --git a/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornParser.cs b/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornParser.cs index 40e6915e7..c5680d6f1 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornParser.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornParser.cs @@ -74,6 +74,7 @@ public IList ParseResponse(IndexerResponse indexerResponse) { Guid = $"PassThePopcorn-{id}", Title = torrent.ReleaseName, + Year = int.Parse(result.Year), InfoUrl = GetInfoUrl(result.GroupId, id), DownloadUrl = GetDownloadUrl(id, jsonResponse.AuthKey, jsonResponse.PassKey), Categories = new List { NewznabStandardCategory.Movies },