diff options
| author | Patrick Barron <barronpm@gmail.com> | 2020-04-05 13:00:35 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2020-04-05 13:00:35 -0400 |
| commit | 80cfcf5643b50fd1acfdc82cae849948a39233b9 (patch) | |
| tree | 35a2a05085ae086aa0c206c4261bb2f112fd98a7 /MediaBrowser.Api/Library/LibraryService.cs | |
| parent | 86c06996b16ffa48a63fa364fade5c211be4f294 (diff) | |
Remove unnecessary casts and explicit array types
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryService.cs')
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryService.cs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs index 15284958d..b82247fc6 100644 --- a/MediaBrowser.Api/Library/LibraryService.cs +++ b/MediaBrowser.Api/Library/LibraryService.cs @@ -351,24 +351,24 @@ namespace MediaBrowser.Api.Library switch (contentType) { case CollectionType.BoxSets: - return new string[] { "BoxSet" }; + return new[] { "BoxSet" }; case CollectionType.Playlists: - return new string[] { "Playlist" }; + return new[] { "Playlist" }; case CollectionType.Movies: - return new string[] { "Movie" }; + return new[] { "Movie" }; case CollectionType.TvShows: - return new string[] { "Series", "Season", "Episode" }; + return new[] { "Series", "Season", "Episode" }; case CollectionType.Books: - return new string[] { "Book" }; + return new[] { "Book" }; case CollectionType.Music: - return new string[] { "MusicAlbum", "MusicArtist", "Audio", "MusicVideo" }; + return new[] { "MusicAlbum", "MusicArtist", "Audio", "MusicVideo" }; case CollectionType.HomeVideos: case CollectionType.Photos: - return new string[] { "Video", "Photo" }; + return new[] { "Video", "Photo" }; case CollectionType.MusicVideos: - return new string[] { "MusicVideo" }; + return new[] { "MusicVideo" }; default: - return new string[] { "Series", "Season", "Episode", "Movie" }; + return new[] { "Series", "Season", "Episode", "Movie" }; } } @@ -1086,7 +1086,7 @@ namespace MediaBrowser.Api.Library var item = string.IsNullOrEmpty(request.Id) ? (!request.UserId.Equals(Guid.Empty) ? _libraryManager.GetUserRootFolder() - : (Folder)_libraryManager.RootFolder) + : _libraryManager.RootFolder) : _libraryManager.GetItemById(request.Id); if (item == null) @@ -1152,7 +1152,7 @@ namespace MediaBrowser.Api.Library var item = string.IsNullOrEmpty(request.Id) ? (!request.UserId.Equals(Guid.Empty) ? _libraryManager.GetUserRootFolder() - : (Folder)_libraryManager.RootFolder) + : _libraryManager.RootFolder) : _libraryManager.GetItemById(request.Id); if (item == null) |
