mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
Use pattern matching for null checks (#13793)
Fix the few that slipped through
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user