mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-08 04:18:06 +02:00
Cleaner type checking
This commit is contained in:
parent
41e127d1d2
commit
08be7f094a
1 changed files with 2 additions and 2 deletions
|
@ -92,12 +92,12 @@ namespace Jellyfin.Api.Controllers
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var itemList = ((Folder?)item)?.GetItemList(query);
|
if (!(item is Folder folder))
|
||||||
if (itemList == null)
|
|
||||||
{
|
{
|
||||||
return new QueryFiltersLegacy();
|
return new QueryFiltersLegacy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var itemList = folder.GetItemList(query);
|
||||||
return new QueryFiltersLegacy
|
return new QueryFiltersLegacy
|
||||||
{
|
{
|
||||||
Years = itemList.Select(i => i.ProductionYear ?? -1)
|
Years = itemList.Select(i => i.ProductionYear ?? -1)
|
||||||
|
|
Loading…
Reference in a new issue