From e5ead79139367c6eb396b6d55ba37fe267455e48 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 19 Jan 2014 01:50:32 -0500 Subject: [PATCH] return a zero score if sorted years don't match --- .../FileSorting/TvFileSorter.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Server.Implementations/FileSorting/TvFileSorter.cs b/MediaBrowser.Server.Implementations/FileSorting/TvFileSorter.cs index ba3ba9212b..3be1bfe19a 100644 --- a/MediaBrowser.Server.Implementations/FileSorting/TvFileSorter.cs +++ b/MediaBrowser.Server.Implementations/FileSorting/TvFileSorter.cs @@ -133,12 +133,17 @@ namespace MediaBrowser.Server.Implementations.FileSorting { score++; - if (year.HasValue) + if (year.HasValue && series.ProductionYear.HasValue) { - if (series.ProductionYear.HasValue && year.Value == series.ProductionYear.Value) + if (year.Value == series.ProductionYear.Value) { score++; } + else + { + // Regardless of name, return a 0 score if the years don't match + return new Tuple(series, 0); + } } }