diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2020-04-13 14:38:19 +0900 |
|---|---|---|
| committer | dkanada <dkanada@users.noreply.github.com> | 2020-04-13 14:38:19 +0900 |
| commit | cb2523e2efb3c91862e035c1ce969e6d069775cd (patch) | |
| tree | cc74c5ac997fe67ed2f4dcd0f9fcb789212122e9 /MediaBrowser.Api/VideosService.cs | |
| parent | ff065df9863f30a4eec52a95d260cdadcced7b1e (diff) | |
| parent | 9a0a4575adbba04b6b7f3294e70175a98b864a90 (diff) | |
merge branch master into plugin
Diffstat (limited to 'MediaBrowser.Api/VideosService.cs')
| -rw-r--r-- | MediaBrowser.Api/VideosService.cs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/MediaBrowser.Api/VideosService.cs b/MediaBrowser.Api/VideosService.cs index 46b6d5a94..b11fd48d3 100644 --- a/MediaBrowser.Api/VideosService.cs +++ b/MediaBrowser.Api/VideosService.cs @@ -139,17 +139,11 @@ namespace MediaBrowser.Api .ToList(); var primaryVersion = videosWithVersions.FirstOrDefault(); - if (primaryVersion == null) { primaryVersion = items.OrderBy(i => { - if (i.Video3DFormat.HasValue) - { - return 1; - } - - if (i.VideoType != Model.Entities.VideoType.VideoFile) + if (i.Video3DFormat.HasValue || i.VideoType != Model.Entities.VideoType.VideoFile) { return 1; } @@ -158,10 +152,7 @@ namespace MediaBrowser.Api }) .ThenByDescending(i => { - var stream = i.GetDefaultVideoStream(); - - return stream == null || stream.Width == null ? 0 : stream.Width.Value; - + return i.GetDefaultVideoStream()?.Width ?? 0; }).First(); } |
