From fd8a8dfb4aee7662ec846a7bf2af2720fe650bd8 Mon Sep 17 00:00:00 2001 From: chrisk325 Date: Mon, 2 Mar 2026 12:29:05 +0530 Subject: [PATCH] swap timestamp priority from local to trakt first --- src/components/home/ContinueWatchingSection.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/home/ContinueWatchingSection.tsx b/src/components/home/ContinueWatchingSection.tsx index b98a8635..944a0e32 100644 --- a/src/components/home/ContinueWatchingSection.tsx +++ b/src/components/home/ContinueWatchingSection.tsx @@ -1180,11 +1180,11 @@ const ContinueWatchingSection = React.forwardRef((props, re // IMPORTANT: // In Trakt-auth mode, the "most recently watched" ordering should reflect local playback, - // not Trakt's paused_at (which can be stale or even appear newer than local). - // So: if we have any local match, use its timestamp for ordering. - const mergedLastUpdated = (mostRecentLocal.lastUpdated ?? 0) > 0 - ? (mostRecentLocal.lastUpdated ?? 0) - : (it.lastUpdated ?? 0); + // Use Trakt's paused_at as the primary ordering timestamp (it.lastUpdated), + // falling back to local lastUpdated only if Trakt has no timestamp. + const mergedLastUpdated = (it.lastUpdated ?? 0) > 0 + ? (it.lastUpdated ?? 0) + : (mostRecentLocal.lastUpdated ?? 0); try { logger.log('[CW][Trakt][Overlay] item/local summary', {