mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-19 16:04:41 +00:00
fix: episode changing via buttons
Some checks are pending
V3 Preview Deployment / Deploy-Preview (push) Waiting to run
Some checks are pending
V3 Preview Deployment / Deploy-Preview (push) Waiting to run
This commit is contained in:
parent
bc7c799f3c
commit
da6639d799
1 changed files with 10 additions and 2 deletions
|
@ -75,6 +75,7 @@ export const ReleasePlayerCustom = (props: {
|
|||
const [playerError, setPlayerError] = useState(null);
|
||||
const [playbackRate, setPlaybackRate] = useState(1);
|
||||
const [isErrorDetailsOpen, setIsErrorDetailsOpen] = useState(false);
|
||||
const [isEpLoadingTimeout, setIsEpLoadingTimeout] = useState(null);
|
||||
|
||||
const [retryCount, setRetryCount] = useState(0);
|
||||
|
||||
|
@ -130,13 +131,20 @@ export const ReleasePlayerCustom = (props: {
|
|||
});
|
||||
};
|
||||
if (episode.selected) {
|
||||
if (isEpLoadingTimeout) {
|
||||
clearTimeout(isEpLoadingTimeout);
|
||||
}
|
||||
setPlayerError(null);
|
||||
SetPlayerProps({
|
||||
src: null,
|
||||
poster: null,
|
||||
type: null,
|
||||
});
|
||||
setPlayerError(null);
|
||||
setIsEpLoadingTimeout(
|
||||
setTimeout(() => {
|
||||
__getInfo();
|
||||
}, 250)
|
||||
);
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [episode.selected, retryCount]);
|
||||
|
|
Loading…
Add table
Reference in a new issue