mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 09:34:44 +01:00
Remove more and more warnings
This commit is contained in:
@@ -112,7 +112,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
private string _name;
|
||||
|
||||
public static char SlugChar = '-';
|
||||
public const char SlugChar = '-';
|
||||
|
||||
protected BaseItem()
|
||||
{
|
||||
@@ -2050,7 +2050,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public virtual string GetClientTypeName()
|
||||
{
|
||||
if (IsFolder && SourceType == SourceType.Channel && !(this is Channel))
|
||||
if (IsFolder && SourceType == SourceType.Channel && this is not Channel)
|
||||
{
|
||||
return "ChannelFolderItem";
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public override bool IsVisible(User user)
|
||||
{
|
||||
if (this is ICollectionFolder && !(this is BasePluginFolder))
|
||||
if (this is ICollectionFolder && this is not BasePluginFolder)
|
||||
{
|
||||
var blockedMediaFolders = user.GetPreferenceValues<Guid>(PreferenceKind.BlockedMediaFolders);
|
||||
if (blockedMediaFolders.Length > 0)
|
||||
@@ -673,7 +673,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
if (LinkedChildren.Length > 0)
|
||||
{
|
||||
if (!(this is ICollectionFolder))
|
||||
if (this is not ICollectionFolder)
|
||||
{
|
||||
return GetChildren(user, true).Count;
|
||||
}
|
||||
@@ -730,7 +730,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return PostFilterAndSort(items, query, true);
|
||||
}
|
||||
|
||||
if (!(this is UserRootFolder) && !(this is AggregateFolder) && query.ParentId == Guid.Empty)
|
||||
if (this is not UserRootFolder && this is not AggregateFolder && query.ParentId == Guid.Empty)
|
||||
{
|
||||
query.Parent = this;
|
||||
}
|
||||
@@ -805,7 +805,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
if (LinkedChildren.Length > 0)
|
||||
{
|
||||
if (!(this is ICollectionFolder))
|
||||
if (this is not ICollectionFolder)
|
||||
{
|
||||
Logger.LogDebug("Query requires post-filtering due to LinkedChildren. Type: " + GetType().Name);
|
||||
return true;
|
||||
@@ -1545,7 +1545,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
var childOwner = child.GetOwner() ?? child;
|
||||
|
||||
if (childOwner != null && !(child is IItemByName))
|
||||
if (child is not IItemByName)
|
||||
{
|
||||
var childProtocol = childOwner.PathProtocol;
|
||||
if (!childProtocol.HasValue || childProtocol.Value != Model.MediaInfo.MediaProtocol.File)
|
||||
|
||||
@@ -296,7 +296,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
// Refresh seasons
|
||||
foreach (var item in items)
|
||||
{
|
||||
if (!(item is Season))
|
||||
if (item is not Season)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user