Replace == null with is null

This commit is contained in:
Bond_009
2022-12-05 15:00:20 +01:00
parent b2def4c9ea
commit c7d50d640e
206 changed files with 627 additions and 627 deletions

View File

@@ -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;
}

View File

@@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.Library
private static string RemoveDiacritics(string? name)
{
if (name == null)
if (name is null)
{
return string.Empty;
}