diff options
| author | Bond-009 <bond.009@outlook.com> | 2021-09-03 16:17:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-03 16:17:02 +0200 |
| commit | 79e51b7fa20dbcb013ddd335fa829f83802dae71 (patch) | |
| tree | 046d44c729b1f6b3a2370c78403517daa0a174d6 /Jellyfin.Api/Controllers/TvShowsController.cs | |
| parent | 2f360151c266ff0885589338fdcdebd2a0c57fae (diff) | |
| parent | bfb37a9ed9989f63ee8b00f41f4efef7a92fc157 (diff) | |
Merge pull request #6475 from crobibero/warn-259810
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"); } |
