mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-27 16:20:30 +01:00
feat(tv): add 60s background refresh for idle screens
This commit is contained in:
@@ -293,6 +293,7 @@ export const TVSeriesPage: React.FC<TVSeriesPageProps> = ({
|
||||
return response.data.Items || [];
|
||||
},
|
||||
staleTime: isOffline ? Infinity : 60 * 1000,
|
||||
refetchInterval: !isOffline ? 60 * 1000 : undefined,
|
||||
enabled: isOffline || (!!api && !!user?.Id && !!item.Id),
|
||||
});
|
||||
|
||||
@@ -345,7 +346,8 @@ export const TVSeriesPage: React.FC<TVSeriesPageProps> = ({
|
||||
});
|
||||
return res.data.Items || [];
|
||||
},
|
||||
staleTime: isOffline ? Infinity : 0,
|
||||
staleTime: isOffline ? Infinity : 60 * 1000,
|
||||
refetchInterval: !isOffline ? 60 * 1000 : undefined,
|
||||
enabled: isOffline
|
||||
? !!item.Id && selectedSeasonNumber !== null
|
||||
: !!api && !!user?.Id && !!item.Id && !!selectedSeasonId,
|
||||
|
||||
Reference in New Issue
Block a user