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 /Emby.Naming | |
| parent | c7d50d640e614a3c13699e3041fbfcb258861c5a (diff) | |
Replace != null with is not null
Diffstat (limited to 'Emby.Naming')
| -rw-r--r-- | Emby.Naming/AudioBook/AudioBookListResolver.cs | 2 | ||||
| -rw-r--r-- | Emby.Naming/ExternalFiles/ExternalPathParser.cs | 4 | ||||
| -rw-r--r-- | Emby.Naming/TV/EpisodePathParser.cs | 2 | ||||
| -rw-r--r-- | Emby.Naming/TV/SeriesPathParser.cs | 2 | ||||
| -rw-r--r-- | Emby.Naming/Video/ExtraRuleResolver.cs | 2 | ||||
| -rw-r--r-- | Emby.Naming/Video/VideoListResolver.cs | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/Emby.Naming/AudioBook/AudioBookListResolver.cs b/Emby.Naming/AudioBook/AudioBookListResolver.cs index 7a241aab2..bdae20b6b 100644 --- a/Emby.Naming/AudioBook/AudioBookListResolver.cs +++ b/Emby.Naming/AudioBook/AudioBookListResolver.cs @@ -69,7 +69,7 @@ namespace Emby.Naming.AudioBook extras = new List<AudioBookFileInfo>(); alternativeVersions = new List<AudioBookFileInfo>(); - var haveChaptersOrPages = stackFiles.Any(x => x.ChapterNumber != null || x.PartNumber != null); + var haveChaptersOrPages = stackFiles.Any(x => x.ChapterNumber is not null || x.PartNumber is not null); var groupedBy = stackFiles.GroupBy(file => new { file.ChapterNumber, file.PartNumber }); var nameWithReplacedDots = nameParserResult.Name.Replace(' ', '.'); diff --git a/Emby.Naming/ExternalFiles/ExternalPathParser.cs b/Emby.Naming/ExternalFiles/ExternalPathParser.cs index cfe3256e3..953129671 100644 --- a/Emby.Naming/ExternalFiles/ExternalPathParser.cs +++ b/Emby.Naming/ExternalFiles/ExternalPathParser.cs @@ -94,12 +94,12 @@ namespace Emby.Naming.ExternalFiles // Try to translate to three character code var culture = _localizationManager.FindLanguageInfo(currentSliceWithoutSeparator); - if (culture != null && pathInfo.Language is null) + if (culture is not null && pathInfo.Language is null) { pathInfo.Language = culture.ThreeLetterISOLanguageName; extraString = extraString.Replace(currentSlice, string.Empty, StringComparison.OrdinalIgnoreCase); } - else if (culture != null && pathInfo.Language == "hin") + else if (culture is not null && pathInfo.Language == "hin") { // Hindi language code "hi" collides with a hearing impaired flag - use as Hindi only if no other language is set pathInfo.IsHearingImpaired = true; diff --git a/Emby.Naming/TV/EpisodePathParser.cs b/Emby.Naming/TV/EpisodePathParser.cs index 6d0597356..d706be280 100644 --- a/Emby.Naming/TV/EpisodePathParser.cs +++ b/Emby.Naming/TV/EpisodePathParser.cs @@ -76,7 +76,7 @@ namespace Emby.Naming.TV } } - if (result != null && fillExtendedInfo) + if (result is not null && fillExtendedInfo) { FillAdditional(path, result); diff --git a/Emby.Naming/TV/SeriesPathParser.cs b/Emby.Naming/TV/SeriesPathParser.cs index 23067e6a4..94b4b5c82 100644 --- a/Emby.Naming/TV/SeriesPathParser.cs +++ b/Emby.Naming/TV/SeriesPathParser.cs @@ -28,7 +28,7 @@ namespace Emby.Naming.TV } } - if (result != null) + if (result is not null) { if (!string.IsNullOrEmpty(result.SeriesName)) { diff --git a/Emby.Naming/Video/ExtraRuleResolver.cs b/Emby.Naming/Video/ExtraRuleResolver.cs index 0970e509a..21d0da364 100644 --- a/Emby.Naming/Video/ExtraRuleResolver.cs +++ b/Emby.Naming/Video/ExtraRuleResolver.cs @@ -76,7 +76,7 @@ namespace Emby.Naming.Video } } - if (result.ExtraType != null) + if (result.ExtraType is not null) { return result; } diff --git a/Emby.Naming/Video/VideoListResolver.cs b/Emby.Naming/Video/VideoListResolver.cs index 1366bdb2c..804832040 100644 --- a/Emby.Naming/Video/VideoListResolver.cs +++ b/Emby.Naming/Video/VideoListResolver.cs @@ -109,7 +109,7 @@ namespace Emby.Naming.Video for (var i = 0; i < videos.Count; i++) { var video = videos[i]; - if (video.ExtraType != null) + if (video.ExtraType is not null) { continue; } |
