diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-12-26 23:20:31 +0100 |
|---|---|---|
| committer | dkanada <dkanada@users.noreply.github.com> | 2020-01-08 01:24:12 +0900 |
| commit | 8a0ef4103632b2888249af2f385e1e7bfc06fbfe (patch) | |
| tree | 8d6904f9acfb4bee696b60a67743156ae0966d13 /MediaBrowser.Providers | |
| parent | a253fa616da3fd982ca2190b69d25853893665f1 (diff) | |
Minor improvements
Diffstat (limited to 'MediaBrowser.Providers')
| -rw-r--r-- | MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs index ae3e584d4b..2b178d4d4e 100644 --- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs +++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs @@ -158,7 +158,7 @@ namespace MediaBrowser.Providers.MediaInfo MetadataRefreshOptions options) { List<MediaStream> mediaStreams; - List<MediaAttachment> mediaAttachments; + IReadOnlyList<MediaAttachment> mediaAttachments; List<ChapterInfo> chapters; if (mediaInfo != null) @@ -200,7 +200,7 @@ namespace MediaBrowser.Providers.MediaInfo else { mediaStreams = new List<MediaStream>(); - mediaAttachments = new List<MediaAttachment>(); + mediaAttachments = Array.Empty<MediaAttachment>(); chapters = new List<ChapterInfo>(); } @@ -213,13 +213,13 @@ namespace MediaBrowser.Providers.MediaInfo FetchEmbeddedInfo(video, mediaInfo, options, libraryOptions); FetchPeople(video, mediaInfo, options); video.Timestamp = mediaInfo.Timestamp; - video.Video3DFormat = video.Video3DFormat ?? mediaInfo.Video3DFormat; + video.Video3DFormat ??= mediaInfo.Video3DFormat; } var videoStream = mediaStreams.FirstOrDefault(i => i.Type == MediaStreamType.Video); - video.Height = videoStream == null ? 0 : videoStream.Height ?? 0; - video.Width = videoStream == null ? 0 : videoStream.Width ?? 0; + video.Height = videoStream?.Height ?? 0; + video.Width = videoStream?.Width ?? 0; video.DefaultVideoStreamIndex = videoStream == null ? (int?)null : videoStream.Index; |
