From 30d90741db87b275bac0c6f7ef9ac404f0a319ff Mon Sep 17 00:00:00 2001 From: Vance <40771709+vancez@users.noreply.github.com> Date: Thu, 12 Dec 2024 01:42:25 +0800 Subject: [PATCH] indexers: dedupe duplicated results (#15748) --- src/Jackett.Common/Indexers/BaseIndexer.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Jackett.Common/Indexers/BaseIndexer.cs b/src/Jackett.Common/Indexers/BaseIndexer.cs index 88597546c..dc46c85d0 100644 --- a/src/Jackett.Common/Indexers/BaseIndexer.cs +++ b/src/Jackett.Common/Indexers/BaseIndexer.cs @@ -381,6 +381,10 @@ namespace Jackett.Common.Indexers results = FilterResults(queryCopy, results).ToList(); results = FixResults(queryCopy, results).ToList(); + + // De-dupe releases by Guid so duplicate results aren't returned. + results = results.GroupBy(r => r.Guid).Select(g => g.First()).ToList(); + cacheService.CacheResults(this, queryCopy, results.ToList()); errorCount = 0; expireAt = DateTime.Now.Add(HealthyStatusValidity);