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:
parent
cd19e9e5e1
commit
1fd314213a
5 changed files with 63 additions and 60 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue