Add more tests

This commit is contained in:
Bond_009
2023-02-04 21:08:21 +01:00
parent 52230d1c30
commit eb7fee9590
7 changed files with 184 additions and 18 deletions

View File

@@ -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>();