aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/FileSorting/TvFileSorter.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-19 01:50:32 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-19 01:50:32 -0500
commite5ead79139367c6eb396b6d55ba37fe267455e48 (patch)
tree83000cdc2fa985461d70cb95d94a54cd817be536 /MediaBrowser.Server.Implementations/FileSorting/TvFileSorter.cs
parentdaa532ba3fb8f9d1083cc0567b59beec94b69964 (diff)
return a zero score if sorted years don't match
Diffstat (limited to 'MediaBrowser.Server.Implementations/FileSorting/TvFileSorter.cs')
-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);
+ }
}
}