diff --git a/src/components/player/AndroidVideoPlayer.tsx b/src/components/player/AndroidVideoPlayer.tsx index 4dc1857b..aa110cc1 100644 --- a/src/components/player/AndroidVideoPlayer.tsx +++ b/src/components/player/AndroidVideoPlayer.tsx @@ -200,6 +200,9 @@ const AndroidVideoPlayer: React.FC = () => { // Next episode button state const [showNextEpisodeButton, setShowNextEpisodeButton] = useState(false); const [isLoadingNextEpisode, setIsLoadingNextEpisode] = useState(false); + const [nextLoadingProvider, setNextLoadingProvider] = useState(null); + const [nextLoadingQuality, setNextLoadingQuality] = useState(null); + const [nextLoadingTitle, setNextLoadingTitle] = useState(null); const nextEpisodeButtonOpacity = useRef(new Animated.Value(0)).current; const nextEpisodeButtonScale = useRef(new Animated.Value(0.8)).current; // Get metadata to access logo (only if we have a valid id) @@ -1307,6 +1310,12 @@ const AndroidVideoPlayer: React.FC = () => { bestStream = sortedStreams[0]; streamFound = true; hasNavigated = true; + + // Update loading details for the chip + const qualityText = (bestStream.title?.match(/(\d+)p/) || [])[1] || null; + setNextLoadingProvider(addonName || addonId || null); + setNextLoadingQuality(qualityText); + setNextLoadingTitle(bestStream.name || bestStream.title || null); logger.log('[AndroidVideoPlayer] Found stream for next episode:', bestStream); @@ -2013,6 +2022,13 @@ const AndroidVideoPlayer: React.FC = () => { S{nextEpisode.season_number}E{nextEpisode.episode_number} {nextEpisode.name ? `: ${nextEpisode.name}` : ''} + {isLoadingNextEpisode && ( + + {nextLoadingProvider ? `${nextLoadingProvider}` : 'Finding source…'} + {nextLoadingQuality ? ` • ${nextLoadingQuality}p` : ''} + {nextLoadingTitle ? ` • ${nextLoadingTitle}` : ''} + + )} diff --git a/src/components/player/VideoPlayer.tsx b/src/components/player/VideoPlayer.tsx index 9e34b764..480b1867 100644 --- a/src/components/player/VideoPlayer.tsx +++ b/src/components/player/VideoPlayer.tsx @@ -220,6 +220,9 @@ const VideoPlayer: React.FC = () => { // Next episode button state const [showNextEpisodeButton, setShowNextEpisodeButton] = useState(false); const [isLoadingNextEpisode, setIsLoadingNextEpisode] = useState(false); + const [nextLoadingProvider, setNextLoadingProvider] = useState(null); + const [nextLoadingQuality, setNextLoadingQuality] = useState(null); + const [nextLoadingTitle, setNextLoadingTitle] = useState(null); const nextEpisodeButtonOpacity = useRef(new Animated.Value(0)).current; const nextEpisodeButtonScale = useRef(new Animated.Value(0.8)).current; @@ -1211,6 +1214,12 @@ const VideoPlayer: React.FC = () => { bestStream = sortedStreams[0]; streamFound = true; hasNavigated = true; + + // Update loading details for the chip + const qualityText = (bestStream.title?.match(/(\d+)p/) || [])[1] || null; + setNextLoadingProvider(addonName || addonId || null); + setNextLoadingQuality(qualityText); + setNextLoadingTitle(bestStream.name || bestStream.title || null); logger.log('[VideoPlayer] Found stream for next episode:', bestStream); @@ -1920,6 +1929,13 @@ const VideoPlayer: React.FC = () => { S{nextEpisode.season_number}E{nextEpisode.episode_number} {nextEpisode.name ? `: ${nextEpisode.name}` : ''} + {isLoadingNextEpisode && ( + + {nextLoadingProvider ? `${nextLoadingProvider}` : 'Finding source…'} + {nextLoadingQuality ? ` • ${nextLoadingQuality}p` : ''} + {nextLoadingTitle ? ` • ${nextLoadingTitle}` : ''} + + )}