pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update WatchPartyResetter.tsx

Pas 0003ef1e 83840594

+10 -2
+10 -2
src/components/player/internals/WatchPartyResetter.tsx
··· 24 24 return `${meta.type}-${meta.tmdbId}`; 25 25 }, [meta]); 26 26 27 + // Handle media changes (when switching to a different show/movie) 27 28 useEffect(() => { 28 29 // If base media has changed (different show/movie), reset watch party 29 30 if ( ··· 41 42 42 43 // Update the ref with current base media 43 44 previousBaseMediaRef.current = baseMediaId; 45 + }, [baseMediaId, disable]); 44 46 45 - // Also reset when component unmounts (player exited) 47 + // Handle component unmount (player exited) - separate effect 48 + useEffect(() => { 46 49 return () => { 50 + // Only disable when component actually unmounts 51 + // eslint-disable-next-line no-console 52 + console.log("WatchPartyResetter unmounting, disabling watch party"); 47 53 disable(); 48 54 }; 49 - }, [baseMediaId, disable]); 55 + // Empty dependency array means this cleanup only runs on unmount 56 + // eslint-disable-next-line react-hooks/exhaustive-deps 57 + }, []); 50 58 51 59 return null; // This component doesn't render anything 52 60 }