Use pattern matching for null checks (#13793)

Fix the few that slipped through
This commit is contained in:
Bond-009
2025-04-01 01:38:25 +02:00
committed by GitHub
parent 3fc3b04daf
commit e9729a536f
8 changed files with 12 additions and 12 deletions

View File

@@ -95,7 +95,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
originalTitle.Append(" / ").Append(additionalEpisode.Item.OriginalTitle);
}
if (additionalEpisode.Item.IndexNumber != null)
if (additionalEpisode.Item.IndexNumber is not null)
{
item.Item.IndexNumberEnd = Math.Max((int)additionalEpisode.Item.IndexNumber, item.Item.IndexNumberEnd ?? (int)additionalEpisode.Item.IndexNumber);
}

View File

@@ -1020,12 +1020,12 @@ namespace MediaBrowser.XbmcMetadata.Savers
protected static string SortNameOrName(BaseItem item)
{
if (item == null)
if (item is null)
{
return string.Empty;
}
if (item.SortName != null)
if (item.SortName is not null)
{
string trimmed = item.SortName.Trim();
if (trimmed.Length > 0)