Luke Pulverenti 11 anni fa
parent
commit
21c3430ac4

+ 1 - 1
MediaBrowser.Providers/Subtitles/OpenSubtitleDownloader.cs

@@ -265,7 +265,7 @@ namespace MediaBrowser.Providers.Subtitles
             var hasCopy = hash;
             var hasCopy = hash;
 
 
             return results.Where(x => x.SubBad == "0" && mediaFilter(x))
             return results.Where(x => x.SubBad == "0" && mediaFilter(x))
-                    .OrderBy(x => x.MovieHash == hash)
+                    .OrderBy(x => (x.MovieHash == hash ? 0 : 1))
                     .ThenBy(x => Math.Abs(long.Parse(x.MovieByteSize, _usCulture) - movieByteSize))
                     .ThenBy(x => Math.Abs(long.Parse(x.MovieByteSize, _usCulture) - movieByteSize))
                     .ThenByDescending(x => int.Parse(x.SubDownloadsCnt, _usCulture))
                     .ThenByDescending(x => int.Parse(x.SubDownloadsCnt, _usCulture))
                     .ThenByDescending(x => double.Parse(x.SubRating, _usCulture))
                     .ThenByDescending(x => double.Parse(x.SubRating, _usCulture))

+ 1 - 1
MediaBrowser.Server.Implementations/Channels/ChannelManager.cs

@@ -385,7 +385,7 @@ namespace MediaBrowser.Server.Implementations.Channels
                 var val = width.Value;
                 var val = width.Value;
 
 
                 var res = list
                 var res = list
-                    .OrderBy(i => i.Width.HasValue && i.Width.Value <= val)
+                    .OrderBy(i => (i.Width.HasValue && i.Width.Value <= val ? 0 : 1))
                     .ThenBy(i => Math.Abs((i.Width ?? 0) - val))
                     .ThenBy(i => Math.Abs((i.Width ?? 0) - val))
                     .ThenByDescending(i => i.Width ?? 0)
                     .ThenByDescending(i => i.Width ?? 0)
                     .ThenBy(list.IndexOf)
                     .ThenBy(list.IndexOf)