From 6e4074ab8a3fb583b76857384349dd537ca12a10 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 31 Mar 2017 15:04:50 -0400 Subject: [PATCH] update multi-version preferences --- MediaBrowser.Model/Dlna/StreamInfoSorter.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/MediaBrowser.Model/Dlna/StreamInfoSorter.cs b/MediaBrowser.Model/Dlna/StreamInfoSorter.cs index 425fb9c93..badd3c5b1 100644 --- a/MediaBrowser.Model/Dlna/StreamInfoSorter.cs +++ b/MediaBrowser.Model/Dlna/StreamInfoSorter.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Model.MediaInfo; +using System; +using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.Session; using System.Collections.Generic; using System.Linq; @@ -47,16 +48,11 @@ namespace MediaBrowser.Model.Dlna { if (i.MediaSource.Bitrate.HasValue) { - if (i.MediaSource.Bitrate.Value <= maxBitrate.Value) - { - return 0; - } - - return 2; + return Math.Abs(i.MediaSource.Bitrate.Value - maxBitrate.Value); } } - return 1; + return 0; }).ToList(); }