added media stream helpers

This commit is contained in:
Luke Pulverenti
2014-05-09 19:08:08 -04:00
parent eb6d72a4e2
commit b9a2af1fd5
7 changed files with 149 additions and 114 deletions

View File

@@ -1165,7 +1165,7 @@ namespace MediaBrowser.Server.Implementations.Dto
}).ThenBy(i => i.Video3DFormat.HasValue ? 1 : 0)
.ThenByDescending(i =>
{
var stream = i.MediaStreams.FirstOrDefault(m => m.Type == MediaStreamType.Video);
var stream = i.VideoStream;
return stream == null || stream.Width == null ? 0 : stream.Width.Value;
})