1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Make LiveTV synchronous

This commit is contained in:
viown 2025-03-06 10:44:03 +03:00
parent cd19e9e5e1
commit 1fd314213a
5 changed files with 63 additions and 60 deletions

View file

@ -33,6 +33,10 @@ export const useSearchItems = (
return useQuery({
queryKey: ['SearchItems', collectionType, parentId, searchTerm],
queryFn: async ({ signal }) => {
if (liveTvSections) {
return sortSections(liveTvSections);
}
const sections: Section[] = [];
addSection(sections, 'Artists', artists?.Items, {
@ -47,10 +51,6 @@ export const useSearchItems = (
showParentTitle: true
});
if (liveTvSections) {
sections.push(...liveTvSections);
}
const itemTypes: BaseItemKind[] = getItemTypesFromCollectionType(collectionType);
const searchData = await fetchItemsByType(