mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 01:34:45 +03:00
Replace != null with is not null
This commit is contained in:
@@ -483,7 +483,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
});
|
||||
|
||||
if (container != null)
|
||||
if (container is not null)
|
||||
{
|
||||
await RefreshAllMetadataForContainer(container, refreshOptions, innerProgress, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
@@ -515,7 +515,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
async () =>
|
||||
{
|
||||
var series = container as Series;
|
||||
if (series != null)
|
||||
if (series is not null)
|
||||
{
|
||||
await series.RefreshMetadata(refreshOptions, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
@@ -529,7 +529,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
var container = child as IMetadataContainer;
|
||||
|
||||
if (container != null)
|
||||
if (container is not null)
|
||||
{
|
||||
await RefreshAllMetadataForContainer(container, refreshOptions, progress, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
@@ -741,7 +741,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
IEnumerable<BaseItem> itemsList = LibraryManager.GetItemList(query);
|
||||
var user = query.User;
|
||||
|
||||
if (user != null)
|
||||
if (user is not null)
|
||||
{
|
||||
// needed for boxsets
|
||||
itemsList = itemsList.Where(i => i.IsVisibleStandalone(query.User));
|
||||
@@ -984,7 +984,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
var user = query.User;
|
||||
|
||||
// Check recursive - don't substitute in plain folder views
|
||||
if (user != null)
|
||||
if (user is not null)
|
||||
{
|
||||
items = CollapseBoxSetItemsIfNeeded(items, query, this, user, ConfigurationManager, CollectionManager);
|
||||
}
|
||||
@@ -1069,7 +1069,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
if (!param.HasValue)
|
||||
{
|
||||
if (user != null && !configurationManager.Configuration.EnableGroupingIntoCollections)
|
||||
if (user is not null && !configurationManager.Configuration.EnableGroupingIntoCollections)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1441,7 +1441,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
var child = GetLinkedChild(i);
|
||||
|
||||
if (child != null)
|
||||
if (child is not null)
|
||||
{
|
||||
list.Add(child);
|
||||
}
|
||||
@@ -1467,7 +1467,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
var child = GetLinkedChild(i);
|
||||
|
||||
if (child != null && child.Id.Equals(itemId))
|
||||
if (child is not null && child.Id.Equals(itemId))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -1547,7 +1547,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return LinkedChildren
|
||||
.Select(i => new Tuple<LinkedChild, BaseItem>(i, GetLinkedChild(i)))
|
||||
.Where(i => i.Item2 != null);
|
||||
.Where(i => i.Item2 is not null);
|
||||
}
|
||||
|
||||
protected override async Task<bool> RefreshedOwnedItems(MetadataRefreshOptions options, IReadOnlyList<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
|
||||
@@ -1605,7 +1605,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.Where(i => i != null)
|
||||
.Where(i => i is not null)
|
||||
.ToList();
|
||||
|
||||
var currentShortcutLinks = LinkedChildren.Where(i => i.Type == LinkedChildType.Shortcut).ToList();
|
||||
@@ -1662,7 +1662,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
// The querying doesn't support virtual unaired
|
||||
var episode = item as Episode;
|
||||
if (episode != null && episode.IsUnaired)
|
||||
if (episode is not null && episode.IsUnaired)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -1719,7 +1719,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return;
|
||||
}
|
||||
|
||||
if (itemDto != null)
|
||||
if (itemDto is not null)
|
||||
{
|
||||
if (fields.ContainsField(ItemFields.RecursiveItemCount))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user