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

@ -25,15 +25,15 @@ export function addSection(
items: BaseItemDto[] | null | undefined,
cardOptions?: CardOptions
) {
if (items && items?.length > 0 && items[0].Type) {
sections.push({ title, items, sectionType: items[0].Type, cardOptions });
if (items && items?.length > 0) {
sections.push({ title, items, cardOptions });
}
}
export function sortSections(sections: Section[]) {
return sections.sort((a, b) => {
const indexA = SEARCH_SECTIONS_SORT_ORDER.indexOf(a.sectionType);
const indexB = SEARCH_SECTIONS_SORT_ORDER.indexOf(b.sectionType);
const indexA = SEARCH_SECTIONS_SORT_ORDER.indexOf(a.title);
const indexB = SEARCH_SECTIONS_SORT_ORDER.indexOf(b.title);
if (indexA > indexB) {
return 1;