mirror of
https://github.com/Radarr/Radarr
synced 2024-12-31 20:35:37 +00:00
Remove duplicate episodes from trakt before processing (by season and episode numbers)
Fixed: Better handling of duplicate episodes from trakt
This commit is contained in:
parent
bd1a9db0ef
commit
5f93cbc83b
2 changed files with 3 additions and 1 deletions
Binary file not shown.
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
using NzbDrone.Core.Tv.Events;
|
||||
|
||||
|
@ -36,8 +37,9 @@ public void RefreshEpisodeInfo(Series series, IEnumerable<Episode> remoteEpisode
|
|||
|
||||
var updateList = new List<Episode>();
|
||||
var newList = new List<Episode>();
|
||||
var dupeFreeRemoteEpisodes = remoteEpisodes.DistinctBy(m => new { m.SeasonNumber, m.EpisodeNumber }).ToList();
|
||||
|
||||
foreach (var episode in remoteEpisodes.OrderBy(e => e.SeasonNumber).ThenBy(e => e.EpisodeNumber))
|
||||
foreach (var episode in dupeFreeRemoteEpisodes.OrderBy(e => e.SeasonNumber).ThenBy(e => e.EpisodeNumber))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue