diff options
| author | Bond_009 <bond.009@outlook.com> | 2022-12-05 15:00:20 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2022-12-05 15:00:20 +0100 |
| commit | c7d50d640e614a3c13699e3041fbfcb258861c5a (patch) | |
| tree | 85ce1a16c1af479160b805ec098463ae457b5228 /MediaBrowser.Controller/Library | |
| parent | b2def4c9ea6cf5e406bf5f865867d6cb5b54f640 (diff) | |
Replace == null with is null
Diffstat (limited to 'MediaBrowser.Controller/Library')
| -rw-r--r-- | MediaBrowser.Controller/Library/ItemResolveArgs.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Library/NameExtensions.cs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Controller/Library/ItemResolveArgs.cs b/MediaBrowser.Controller/Library/ItemResolveArgs.cs index 91d162b41..f93c890fe 100644 --- a/MediaBrowser.Controller/Library/ItemResolveArgs.cs +++ b/MediaBrowser.Controller/Library/ItemResolveArgs.cs @@ -47,7 +47,7 @@ namespace MediaBrowser.Controller.Library public LibraryOptions LibraryOptions { - get => _libraryOptions ??= Parent == null ? new LibraryOptions() : BaseItem.LibraryManager.GetLibraryOptions(Parent); + get => _libraryOptions ??= Parent is null ? new LibraryOptions() : BaseItem.LibraryManager.GetLibraryOptions(Parent); set => _libraryOptions = value; } @@ -119,7 +119,7 @@ namespace MediaBrowser.Controller.Library get { var paths = string.IsNullOrEmpty(Path) ? Array.Empty<string>() : new[] { Path }; - return AdditionalLocations == null ? paths : paths.Concat(AdditionalLocations).ToArray(); + return AdditionalLocations is null ? paths : paths.Concat(AdditionalLocations).ToArray(); } } @@ -136,7 +136,7 @@ namespace MediaBrowser.Controller.Library // Just in case the user decided to nest episodes. // Not officially supported but in some cases we can handle it. - if (item == null) + if (item is null) { var parents = parent.GetParents(); foreach (var currentParent in parents) @@ -289,7 +289,7 @@ namespace MediaBrowser.Controller.Library { if (args != null) { - if (args.Path == null && Path == null) + if (args.Path is null && Path is null) { return true; } diff --git a/MediaBrowser.Controller/Library/NameExtensions.cs b/MediaBrowser.Controller/Library/NameExtensions.cs index 9d78b8b6c..919570e89 100644 --- a/MediaBrowser.Controller/Library/NameExtensions.cs +++ b/MediaBrowser.Controller/Library/NameExtensions.cs @@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.Library private static string RemoveDiacritics(string? name) { - if (name == null) + if (name is null) { return string.Empty; } |
