瀏覽代碼

return a zero score if sorted years don't match

Luke Pulverenti 11 年之前
父節點
當前提交
e5ead79139
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7 2
      MediaBrowser.Server.Implementations/FileSorting/TvFileSorter.cs

+ 7 - 2
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);
+                    }
                 }
             }