From 1732e23945370b51461667a15f2520c5d0e24916 Mon Sep 17 00:00:00 2001 From: Qstick Date: Fri, 4 Nov 2022 20:17:54 -0500 Subject: [PATCH] Fixed: Prevent Media Info error if no tags exist --- src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs b/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs index 01e18f5c0..09bf679fe 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs @@ -75,7 +75,7 @@ public MediaInfoModel GetMediaInfo(string filename) mediaInfoModel.VideoCodecID = analysis.PrimaryVideoStream?.CodecTagString; mediaInfoModel.VideoProfile = analysis.PrimaryVideoStream?.Profile; mediaInfoModel.VideoBitrate = analysis.PrimaryVideoStream?.BitRate ?? 0; - mediaInfoModel.VideoMultiViewCount = analysis.PrimaryVideoStream?.Tags.ContainsKey("stereo_mode") ?? false ? 2 : 1; + mediaInfoModel.VideoMultiViewCount = analysis.PrimaryVideoStream?.Tags?.ContainsKey("stereo_mode") ?? false ? 2 : 1; mediaInfoModel.VideoBitDepth = GetPixelFormat(analysis.PrimaryVideoStream?.PixelFormat)?.Components.Min(x => x.BitDepth) ?? 8; mediaInfoModel.VideoColourPrimaries = analysis.PrimaryVideoStream?.ColorPrimaries; mediaInfoModel.VideoTransferCharacteristics = analysis.PrimaryVideoStream?.ColorTransfer;