mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
Cleaner type checking
This commit is contained in:
@@ -92,12 +92,12 @@ namespace Jellyfin.Api.Controllers
|
||||
}
|
||||
};
|
||||
|
||||
var itemList = ((Folder?)item)?.GetItemList(query);
|
||||
if (itemList == null)
|
||||
if (!(item is Folder folder))
|
||||
{
|
||||
return new QueryFiltersLegacy();
|
||||
}
|
||||
|
||||
var itemList = folder.GetItemList(query);
|
||||
return new QueryFiltersLegacy
|
||||
{
|
||||
Years = itemList.Select(i => i.ProductionYear ?? -1)
|
||||
|
||||
Reference in New Issue
Block a user