aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/FileSorting
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/FileSorting')
-rw-r--r--MediaBrowser.Server.Implementations/FileSorting/TvFileSorter.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/FileSorting/TvFileSorter.cs b/MediaBrowser.Server.Implementations/FileSorting/TvFileSorter.cs
index ba3ba9212..3be1bfe19 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, int>(series, 0);
+ }
}
}