diff options
| author | Cody Robibero <cody@robibe.ro> | 2021-08-28 16:32:50 -0600 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2021-08-28 16:32:50 -0600 |
| commit | cba07b1ca6862ef8450021b0e60ce2f366ff0d33 (patch) | |
| tree | d8a754110b47758445caa89efa4b3a35527bda34 /Jellyfin.Api/Controllers/TvShowsController.cs | |
| parent | e88367fe70f8d5f2a0cec35792739fe23000a818 (diff) | |
Remove more and more warnings
Diffstat (limited to 'Jellyfin.Api/Controllers/TvShowsController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/TvShowsController.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Jellyfin.Api/Controllers/TvShowsController.cs b/Jellyfin.Api/Controllers/TvShowsController.cs index 51d40994e..7c5b8a43b 100644 --- a/Jellyfin.Api/Controllers/TvShowsController.cs +++ b/Jellyfin.Api/Controllers/TvShowsController.cs @@ -228,7 +228,7 @@ namespace Jellyfin.Api.Controllers if (seasonId.HasValue) // Season id was supplied. Get episodes by season id. { var item = _libraryManager.GetItemById(seasonId.Value); - if (!(item is Season seasonItem)) + if (item is not Season seasonItem) { return NotFound("No season exists with Id " + seasonId); } @@ -237,7 +237,7 @@ namespace Jellyfin.Api.Controllers } else if (season.HasValue) // Season number was supplied. Get episodes by season number { - if (!(_libraryManager.GetItemById(seriesId) is Series series)) + if (_libraryManager.GetItemById(seriesId) is not Series series) { return NotFound("Series not found"); } @@ -252,7 +252,7 @@ namespace Jellyfin.Api.Controllers } else // No season number or season id was supplied. Returning all episodes. { - if (!(_libraryManager.GetItemById(seriesId) is Series series)) + if (_libraryManager.GetItemById(seriesId) is not Series series) { return NotFound("Series not found"); } @@ -336,7 +336,7 @@ namespace Jellyfin.Api.Controllers ? _userManager.GetUserById(userId.Value) : null; - if (!(_libraryManager.GetItemById(seriesId) is Series series)) + if (_libraryManager.GetItemById(seriesId) is not Series series) { return NotFound("Series not found"); } |
