diff options
| author | Bond_009 <bond.009@outlook.com> | 2022-12-05 15:01:13 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2022-12-05 15:01:13 +0100 |
| commit | 52194f56b5f07e3ae01e2fb6d121452e37d1e93f (patch) | |
| tree | fd638972f72ec49734ad07f831a3aae3b2501a1d /MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs | |
| parent | c7d50d640e614a3c13699e3041fbfcb258861c5a (diff) | |
Replace != null with is not null
Diffstat (limited to 'MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs')
| -rw-r--r-- | MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs index 5bd0c90ce..58b23a36d 100644 --- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs +++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs @@ -180,7 +180,7 @@ namespace MediaBrowser.Providers.MediaInfo var startIndex = mediaStreams.Count == 0 ? 0 : (mediaStreams.Max(i => i.Index) + 1); - if (mediaInfo != null) + if (mediaInfo is not null) { foreach (var mediaStream in mediaInfo.MediaStreams) { @@ -218,7 +218,7 @@ namespace MediaBrowser.Providers.MediaInfo video.Container = mediaInfo.Container; chapters = mediaInfo.Chapters ?? Array.Empty<ChapterInfo>(); - if (blurayInfo != null) + if (blurayInfo is not null) { FetchBdInfo(video, ref chapters, mediaStreams, blurayInfo); } @@ -241,7 +241,7 @@ namespace MediaBrowser.Providers.MediaInfo var libraryOptions = _libraryManager.GetLibraryOptions(video); - if (mediaInfo != null) + if (mediaInfo is not null) { FetchEmbeddedInfo(video, mediaInfo, options, libraryOptions); FetchPeople(video, mediaInfo, options); @@ -288,7 +288,7 @@ namespace MediaBrowser.Providers.MediaInfo NormalizeChapterNames(chapters); var extractDuringScan = false; - if (libraryOptions != null) + if (libraryOptions is not null) { extractDuringScan = libraryOptions.ExtractChapterImagesDuringLibraryScan; } @@ -333,7 +333,7 @@ namespace MediaBrowser.Providers.MediaInfo var videoStream = mediaStreams.FirstOrDefault(s => s.Type == MediaStreamType.Video); // Grab the values that ffprobe recorded - if (videoStream != null) + if (videoStream is not null) { currentBitRate = videoStream.BitRate; currentWidth = videoStream.Width; @@ -349,7 +349,7 @@ namespace MediaBrowser.Providers.MediaInfo video.RunTimeTicks = blurayInfo.RunTimeTicks; } - if (blurayInfo.Chapters != null) + if (blurayInfo.Chapters is not null) { double[] brChapter = blurayInfo.Chapters; chapters = new ChapterInfo[brChapter.Length]; @@ -365,7 +365,7 @@ namespace MediaBrowser.Providers.MediaInfo videoStream = mediaStreams.FirstOrDefault(s => s.Type == MediaStreamType.Video); // Use the ffprobe values if these are empty - if (videoStream != null) + if (videoStream is not null) { videoStream.BitRate = IsEmpty(videoStream.BitRate) ? currentBitRate : videoStream.BitRate; videoStream.Width = IsEmpty(videoStream.Width) ? currentWidth : videoStream.Width; @@ -693,7 +693,7 @@ namespace MediaBrowser.Providers.MediaInfo byte? titleNumber = null; - if (primaryTitle != null) + if (primaryTitle is not null) { titleNumber = primaryTitle.VideoTitleSetNumber; item.RunTimeTicks = GetRuntime(primaryTitle); |
