mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 06:23:03 +03:00
Add more tests
This commit is contained in:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user