Fix Continue Watching and Next Up not appearing correctly

This commit is contained in:
HighImKevin
2026-09-10 09:20:29 -04:00
parent b21497a194
commit 773393ef3e
6 changed files with 92 additions and 216 deletions
-49
View File
@@ -737,32 +737,6 @@
});
}
// Handle MergeNextUp setting - check if continueWatchingAndNextUp should be enabled
const mergeNextUp = await getMergeNextUpSetting();
if (mergeNextUp) {
// Find and disable nextUp and continueWatching sections when merged
const nextUpIndex = merged.findIndex(s => s.id === 'nextUp');
const continueWatchingIndex = merged.findIndex(s => s.id === 'continueWatching');
if (nextUpIndex !== -1) {
merged[nextUpIndex].enabled = false;
}
if (continueWatchingIndex !== -1) {
merged[continueWatchingIndex].enabled = false;
}
// Enable the merged section
const mergedIndex = merged.findIndex(s => s.id === 'continueWatchingAndNextUp');
if (mergedIndex !== -1) {
merged[mergedIndex].enabled = true;
LOG('MergeNextUp enabled: Using continueWatchingAndNextUp section');
}
} else {
// Disable merged section if merge is not enabled
const mergedIndex = merged.findIndex(s => s.id === 'continueWatchingAndNextUp');
if (mergedIndex !== -1) {
merged[mergedIndex].enabled = false;
}
}
// Filter seasonal sections based on date
const filteredMerged = merged.filter(section => {
if (section.startDate && section.endDate) {
@@ -1135,7 +1109,6 @@
let performanceDuration;
const performanceTimes = [];
const mergeNextUp = await getMergeNextUpSetting();
for (const sectionConfig of sortedSections) {
const loopStartTime = performance.now();
@@ -1158,19 +1131,6 @@
continue;
}
// Check merge setting for continueWatchingAndNextUp
if (sectionConfig.id === 'continueWatchingAndNextUp' && !mergeNextUp) {
LOG(`Skipping continueWatchingAndNextUp: merge not enabled`);
continue;
}
// Skip individual sections when merge is enabled
if (mergeNextUp &&
(sectionConfig.id === 'continueWatching' || sectionConfig.id === 'nextUp')) {
LOG(`Skipping ${sectionConfig.id}: merge enabled, using continueWatchingAndNextUp`);
continue;
}
sectionPromises.push(loadSectionForRendering(sectionConfig));
const loopEndTime = performance.now();
@@ -1252,15 +1212,6 @@
return date.toLocaleDateString('en-US', options);
}
async function getMergeNextUpSetting() {
const config = await window.KefinHomeScreen.getConfig();
const mergeNextUp = config.MERGE_NEXT_UP;
if (mergeNextUp !== undefined) {
return mergeNextUp;
}
return false;
}
let _displayPreferencesPromise = null;
async function fetchDisplayPreferences() {
+1 -8
View File
@@ -75,7 +75,6 @@
name: 'Continue Watching',
jellyfinId: 'resume',
enabled: false,
hidden: false,
order: 10,
cardFormat: 'Thumb',
ttl: CACHE_CONFIG.FORCE_REFRESH_TTL,
@@ -99,7 +98,6 @@
name: 'Next Up',
jellyfinId: 'nextup',
enabled: false,
hidden: false,
order: 11,
cardFormat: 'Thumb',
ttl: CACHE_CONFIG.FORCE_REFRESH_TTL,
@@ -122,9 +120,8 @@
id: 'continueWatchingAndNextUp',
name: 'Continue Watching and Next Up',
jellyfinId: 'resume',
enabled: false, // Disabled by default - only used when merge setting is enabled
enabled: false,
order: 10,
hidden: true,
cardFormat: 'Thumb',
ttl: CACHE_CONFIG.FORCE_REFRESH_TTL,
sortBy: 'DatePlayed', // Used to sort merged results from both queries
@@ -161,7 +158,6 @@
name: 'Continue Listening',
jellyfinId: 'resumeaudio',
enabled: false,
hidden: false,
order: 10,
cardFormat: 'Square',
ttl: CACHE_CONFIG.FORCE_REFRESH_TTL,
@@ -185,7 +181,6 @@
name: 'Continue Reading',
jellyfinId: 'resumebook',
enabled: false,
hidden: false,
order: 10,
cardFormat: 'Poster',
ttl: CACHE_CONFIG.FORCE_REFRESH_TTL,
@@ -1542,7 +1537,6 @@
DISCOVERY_SECTION_GROUPS: KEFINTWEAKS_DISCOVERY_SECTION_GROUPS,
CUSTOM_SECTION_GROUPS: [], // Empty by default - user-created/imported sections
REMOVE_CONFLICTING_SECTIONS: true,
MERGE_NEXT_UP: false,
HOME_SETTINGS: HOME_SETTINGS,
USER_HOME_SCREEN_SETTINGS: USER_HOME_SCREEN_SETTINGS,
DISCOVERY_SETTINGS: DISCOVERY_SETTINGS,
@@ -1558,7 +1552,6 @@
DISCOVERY_SECTION_GROUPS: KEFINTWEAKS_DISCOVERY_SECTION_GROUPS, // modified by user configuration
CUSTOM_SECTION_GROUPS: [], // Empty by default - user-created/imported sections // modified by user configuration
REMOVE_CONFLICTING_SECTIONS: true,
MERGE_NEXT_UP: false,
HOME_SETTINGS: HOME_SETTINGS,
DISCOVERY_SETTINGS: DISCOVERY_SETTINGS,
SEASONAL_THEME_SETTINGS: SEASONAL_THEME_SETTINGS,