mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Use foreach for recently added sections
This commit is contained in:
parent
8149076fc5
commit
81c3a43601
1 changed files with 6 additions and 13 deletions
|
@ -139,20 +139,13 @@ export function loadRecentlyAdded(
|
||||||
const excludeViewTypes = ['playlists', 'livetv', 'boxsets', 'channels'];
|
const excludeViewTypes = ['playlists', 'livetv', 'boxsets', 'channels'];
|
||||||
const userExcludeItems = user.Configuration?.LatestItemsExcludes ?? [];
|
const userExcludeItems = user.Configuration?.LatestItemsExcludes ?? [];
|
||||||
|
|
||||||
for (let i = 0, length = userViews.length; i < length; i++) {
|
userViews.forEach(item => {
|
||||||
const item = userViews[i];
|
if (!item.Id || userExcludeItems.indexOf(item.Id) !== -1) {
|
||||||
if (
|
return;
|
||||||
!item.Id
|
|
||||||
|| userExcludeItems.indexOf(item.Id) !== -1
|
|
||||||
) {
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (!item.CollectionType || excludeViewTypes.indexOf(item.CollectionType) !== -1) {
|
||||||
!item.CollectionType
|
return;
|
||||||
|| excludeViewTypes.indexOf(item.CollectionType) !== -1
|
|
||||||
) {
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const frag = document.createElement('div');
|
const frag = document.createElement('div');
|
||||||
|
@ -161,5 +154,5 @@ export function loadRecentlyAdded(
|
||||||
elem.appendChild(frag);
|
elem.appendChild(frag);
|
||||||
|
|
||||||
renderLatestSection(frag, apiClient, user, item, options);
|
renderLatestSection(frag, apiClient, user, item, options);
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue