From 73d438fcdb72acc219dceac15c31bb2245352dec Mon Sep 17 00:00:00 2001 From: Florian Dupret <34862846+sephrat@users.noreply.github.com> Date: Thu, 24 Mar 2022 08:56:36 +0100 Subject: [PATCH] Fix issues being merged for items bearing the same name Fixes #4540 --- src/Ombi.Core/Engine/V2/IssuesEngine.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Ombi.Core/Engine/V2/IssuesEngine.cs b/src/Ombi.Core/Engine/V2/IssuesEngine.cs index 830dd4295..177ba599e 100644 --- a/src/Ombi.Core/Engine/V2/IssuesEngine.cs +++ b/src/Ombi.Core/Engine/V2/IssuesEngine.cs @@ -33,7 +33,7 @@ namespace Ombi.Core.Engine.V2 public async Task> GetIssues(int position, int take, IssueStatus status, CancellationToken token) { var issues = await _issues.GetAll().Where(x => x.Status == status && x.ProviderId != null).Skip(position).Take(take).OrderBy(x => x.Title).ToListAsync(token); - var grouped = issues.GroupBy(x => x.Title, (key, g) => new { Title = key, Issues = g }); + var grouped = issues.GroupBy(x => new { x.Title, x.ProviderId }, (key, g) => new { key = key, Issues = g }); var model = new List(); @@ -42,8 +42,8 @@ namespace Ombi.Core.Engine.V2 model.Add(new IssuesSummaryModel { Count = group.Issues.Count(), - Title = group.Title, - ProviderId = group.Issues.FirstOrDefault()?.ProviderId + Title = group.key.Title, + ProviderId = group.key.ProviderId }); }