fix: videoPlayer not exiting if subtitles are disabled

This commit is contained in:
Prayag Prajapati committed 2024-03-29 10:35:21 +05:30
1 parent 8a4b41c0e0
commit ea5a0a5aad
2 files changed
+4 -1

No files matched your search

+2 -1
View File
@@ -241,7 +241,8 @@ const ItemDetail = () => {
const checkDolbyVision = videos.filter( const checkDolbyVision = videos.filter(
(video) => (video) =>
video.DisplayTitle?.toLocaleLowerCase().includes("dv") || video.DisplayTitle?.toLocaleLowerCase().includes("dv") ||
video.DisplayTitle?.toLocaleLowerCase().includes("dolby vision"), video.DisplayTitle?.toLocaleLowerCase().includes("dolby vision") ||
!!video.VideoDoViTitle,
); );
const checkDD = audios.filter( const checkDD = audios.filter(
(audio) => (audio) =>
+2
View File
@@ -1035,7 +1035,9 @@ const VideoPlayer = () => {
const handleExitPlayer = async () => { const handleExitPlayer = async () => {
appWindow.setFullscreen(false); appWindow.setFullscreen(false);
if (subtitleRenderer) {
subtitleRenderer.destroy(); subtitleRenderer.destroy();
}
navigate(-1); navigate(-1);
// Report Jellyfin server: Playback has ended/stopped // Report Jellyfin server: Playback has ended/stopped
await getPlaystateApi(api).reportPlaybackStopped({ await getPlaystateApi(api).reportPlaybackStopped({