mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-27 09:08:31 +01:00
fix: possible fix for edge of episode issue
possible fix(untested) to fix an issue when exiting as next episode countdown is active Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
This commit is contained in:
@@ -1041,7 +1041,7 @@ export default function page() {
|
||||
|
||||
// TV: Navigate to next item
|
||||
const goToNextItem = useCallback(() => {
|
||||
if (!nextItem || !settings) return;
|
||||
if (!nextItem || !settings || isPlaybackStopped) return;
|
||||
|
||||
const {
|
||||
mediaSource: newMediaSource,
|
||||
@@ -1074,6 +1074,7 @@ export default function page() {
|
||||
stream?.mediaSource,
|
||||
bitrateValue,
|
||||
router,
|
||||
isPlaybackStopped,
|
||||
]);
|
||||
|
||||
// Apply subtitle settings when video loads
|
||||
|
||||
@@ -131,6 +131,11 @@ export const TVNextEpisodeCountdown: FC<TVNextEpisodeCountdownProps> = ({
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
// Cancel animation on unmount to prevent onFinish from firing after exit
|
||||
return () => {
|
||||
cancelAnimation(progress);
|
||||
};
|
||||
}, [show, isPlaying, progress]);
|
||||
|
||||
const progressStyle = useAnimatedStyle(() => ({
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
View,
|
||||
} from "react-native";
|
||||
import Animated, {
|
||||
cancelAnimation,
|
||||
Easing,
|
||||
runOnJS,
|
||||
useAnimatedStyle,
|
||||
@@ -45,6 +46,11 @@ const NextEpisodeCountDownButton: React.FC<NextEpisodeCountDownButtonProps> = ({
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
// Cancel animation on unmount to prevent onFinish from firing after exit
|
||||
return () => {
|
||||
cancelAnimation(progress);
|
||||
};
|
||||
}
|
||||
}, [show, onFinish]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user