More warn

This commit is contained in:
Bond_009
2020-08-19 18:02:34 +02:00
parent e77a45adcf
commit 68edccd9f4
4 changed files with 22 additions and 15 deletions

View File

@@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -672,9 +674,7 @@ namespace MediaBrowser.Controller.Entities
var isPlaceHolder = false;
var hasPlaceHolder = item as ISupportsPlaceHolders;
if (hasPlaceHolder != null)
if (item is ISupportsPlaceHolders hasPlaceHolder)
{
isPlaceHolder = hasPlaceHolder.IsPlaceHolder;
}
@@ -689,13 +689,11 @@ namespace MediaBrowser.Controller.Entities
{
var filterValue = query.HasSpecialFeature.Value;
var movie = item as IHasSpecialFeatures;
if (movie != null)
if (item is IHasSpecialFeatures movie)
{
var ok = filterValue
? movie.SpecialFeatureIds.Length > 0
: movie.SpecialFeatureIds.Length == 0;
? movie.SpecialFeatureIds.Count > 0
: movie.SpecialFeatureIds.Count == 0;
if (!ok)
{