diff --git a/MediaBrowser.Providers/Subtitles/OpenSubtitleDownloader.cs b/MediaBrowser.Providers/Subtitles/OpenSubtitleDownloader.cs index c690fbd84..c25fbee6f 100644 --- a/MediaBrowser.Providers/Subtitles/OpenSubtitleDownloader.cs +++ b/MediaBrowser.Providers/Subtitles/OpenSubtitleDownloader.cs @@ -265,7 +265,7 @@ namespace MediaBrowser.Providers.Subtitles var hasCopy = hash; 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)) .ThenByDescending(x => int.Parse(x.SubDownloadsCnt, _usCulture)) .ThenByDescending(x => double.Parse(x.SubRating, _usCulture)) diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs index c02ad177f..3a17bf8a7 100644 --- a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs +++ b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs @@ -385,7 +385,7 @@ namespace MediaBrowser.Server.Implementations.Channels var val = width.Value; 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)) .ThenByDescending(i => i.Width ?? 0) .ThenBy(list.IndexOf)