diff options
| author | Bond_009 <bond.009@outlook.com> | 2023-02-04 21:08:21 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2023-02-04 21:08:30 +0100 |
| commit | eb7fee95906f1c9d8d104777e0214de9115ca82f (patch) | |
| tree | e7cc620c3f37175d5102f0ac592e6ec0669db345 /Jellyfin.Api/Controllers/LibraryController.cs | |
| parent | 52230d1c30b76f34132c8c3ad21a09deea72d9d8 (diff) | |
Add more tests
Diffstat (limited to 'Jellyfin.Api/Controllers/LibraryController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/LibraryController.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Jellyfin.Api/Controllers/LibraryController.cs b/Jellyfin.Api/Controllers/LibraryController.cs index a311554b4..c4309412c 100644 --- a/Jellyfin.Api/Controllers/LibraryController.cs +++ b/Jellyfin.Api/Controllers/LibraryController.cs @@ -283,6 +283,11 @@ public class LibraryController : BaseJellyfinApiController userId, inheritFromParent); + if (themeSongs.Result is NotFoundObjectResult || themeVideos.Result is NotFoundObjectResult) + { + return NotFound(); + } + return new AllThemeMediaResult { ThemeSongsResult = themeSongs?.Value, @@ -676,6 +681,11 @@ public class LibraryController : BaseJellyfinApiController : _libraryManager.GetUserRootFolder()) : _libraryManager.GetItemById(itemId); + if (item is null) + { + return NotFound(); + } + if (item is Episode || (item is IItemByName && item is not MusicArtist)) { return new QueryResult<BaseItemDto>(); |
