From 426ff20273559598673bf01a5ac842fda614d78c Mon Sep 17 00:00:00 2001 From: Roger Far Date: Thu, 11 Feb 2021 15:35:38 -0700 Subject: [PATCH] no message --- server/RdtClient.Service/Services/QBittorrent.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/RdtClient.Service/Services/QBittorrent.cs b/server/RdtClient.Service/Services/QBittorrent.cs index d941233..a544da8 100644 --- a/server/RdtClient.Service/Services/QBittorrent.cs +++ b/server/RdtClient.Service/Services/QBittorrent.cs @@ -445,15 +445,14 @@ namespace RdtClient.Service.Services var torrentsToGroup = torrents.Where(m => !String.IsNullOrWhiteSpace(m.Category)) .Select(m => m.Category.ToLower()) + .Distinct() .ToList(); var results = new Dictionary(); if (torrentsToGroup.Count > 0) { - results = torrentsToGroup.GroupBy(m => m) - .First() - .ToDictionary(m => m, + results = torrentsToGroup.ToDictionary(m => m, m => new TorrentCategory { Name = m,