removed special episodes appearing from thisweeksection

This commit is contained in:
tapframe 2026-01-21 17:56:38 +05:30
parent a042cf5ca6
commit 1931bbc558
3 changed files with 5 additions and 3 deletions

1
server/sync-service Submodule

@ -0,0 +1 @@
Subproject commit e79325ecb97f797801e3499285fca75efb180aa9

View file

@ -142,7 +142,8 @@ export const ThisWeekSection = React.memo(() => {
if (!thisWeekSection) return [];
// Get raw episodes (limit to 60 to be safe for performance but allow grouping)
const rawEpisodes = memoryManager.limitArraySize(thisWeekSection.data, 60);
const rawEpisodes = memoryManager.limitArraySize(thisWeekSection.data.filter(ep => ep.season !== 0), 60);
// Group by series and date
const groups: Record<string, typeof rawEpisodes> = {};

View file

@ -236,8 +236,8 @@ const CalendarScreen = () => {
const allEpisodes = React.useMemo(() => {
if (!uiReady) return [] as CalendarEpisode[];
const episodes = calendarData.reduce((acc: CalendarEpisode[], section: CalendarSection) => {
// Pre-trim section arrays defensively
const trimmed = memoryManager.limitArraySize(section.data, 500);
const trimmed = memoryManager.limitArraySize(section.data.filter(ep => ep.season !== 0), 500);
return acc.length > 1500 ? acc : [...acc, ...trimmed];
}, [] as CalendarEpisode[]);
// Global cap to keep memory bounded