mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 22:13:06 +03:00
Fix null reference when getting filters of an empty library
This commit is contained in:
@@ -92,7 +92,12 @@ namespace Jellyfin.Api.Controllers
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var itemList = ((Folder)item!).GetItemList(query);
|
var itemList = ((Folder?)item)?.GetItemList(query);
|
||||||
|
if (itemList == null)
|
||||||
|
{
|
||||||
|
return new QueryFiltersLegacy();
|
||||||
|
}
|
||||||
|
|
||||||
return new QueryFiltersLegacy
|
return new QueryFiltersLegacy
|
||||||
{
|
{
|
||||||
Years = itemList.Select(i => i.ProductionYear ?? -1)
|
Years = itemList.Select(i => i.ProductionYear ?? -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user