aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/UserLibrary/ItemsService.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2020-04-11 19:30:23 +0200
committerGitHub <noreply@github.com>2020-04-11 19:30:23 +0200
commit14674d446954b24c9754431f550c590083e7a94c (patch)
treefc766140d5d96d63a512a1b962fd86e0ba91d161 /MediaBrowser.Api/UserLibrary/ItemsService.cs
parent299541f1b26136ef89741f28c7949cda4e5e485f (diff)
parent555651aae23e788b10760d58840114d8a010da90 (diff)
Merge pull request #2772 from barronpm/codecleanup
MediaBrowser.Api code cleanup
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs')
-rw-r--r--MediaBrowser.Api/UserLibrary/ItemsService.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs
index 22e4eea0b..ac59c3030 100644
--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs
@@ -199,14 +199,12 @@ namespace MediaBrowser.Api.UserLibrary
item = _libraryManager.GetUserRootFolder();
}
- Folder folder = item as Folder;
- if (folder == null)
+ if (!(item is Folder folder))
{
folder = _libraryManager.GetUserRootFolder();
}
- var hasCollectionType = folder as IHasCollectionType;
- if (hasCollectionType != null
+ if (folder is IHasCollectionType hasCollectionType
&& string.Equals(hasCollectionType.CollectionType, CollectionType.Playlists, StringComparison.OrdinalIgnoreCase))
{
request.Recursive = true;