1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-29 16:07:40 +01:00

Troubleshoot #1

This commit is contained in:
Cooper Ransom 2024-03-21 19:13:22 -04:00
parent 08163ede9b
commit 4446c7566a

View file

@ -96,7 +96,7 @@ export function NextEpisodeButton(props: {
}, 1000); }, 1000);
return () => clearInterval(interval); return () => clearInterval(interval);
}, [time, duration]); }, []);
useEffect(() => { useEffect(() => {
if (seconds === 0) { if (seconds === 0) {
@ -105,6 +105,10 @@ export function NextEpisodeButton(props: {
} }
}, [seconds, loadNextEpisode]); }, [seconds, loadNextEpisode]);
useEffect(() => {
setSeconds(15);
}, [time, duration]);
if (!meta?.episode || !nextEp) return null; if (!meta?.episode || !nextEp) return null;
if (metaType !== "show") return null; if (metaType !== "show") return null;
@ -131,7 +135,7 @@ export function NextEpisodeButton(props: {
className="bg-buttons-primary hover:bg-buttons-primaryHover text-buttons-primaryText flex justify-center items-center" className="bg-buttons-primary hover:bg-buttons-primaryHover text-buttons-primaryText flex justify-center items-center"
> >
<Icon className="text-xl mr-1" icon={Icons.SKIP_EPISODE} /> <Icon className="text-xl mr-1" icon={Icons.SKIP_EPISODE} />
{t(`player.nextEpisode.next ${seconds > 0 ? ` in ${seconds}` : ""}`)} {t(`Next episode ${seconds > 0 ? ` in ${seconds}` : ""}`)}
</Button> </Button>
</div> </div>
</Transition> </Transition>