From 904444ebc5a343dc8722e5983d1e054f258fa891 Mon Sep 17 00:00:00 2001 From: vexorian Date: Wed, 9 Sep 2020 23:19:21 -0400 Subject: [PATCH] Do not allow to enable subtitles if direct play is forced. --- src/plexTranscoder.js | 6 ++++-- web/directives/plex-settings.js | 3 +++ web/public/templates/plex-settings.html | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/plexTranscoder.js b/src/plexTranscoder.js index a88f6d7..47caba5 100644 --- a/src/plexTranscoder.js +++ b/src/plexTranscoder.js @@ -42,9 +42,11 @@ class PlexTranscoder { this.log(` deinterlace: ${deinterlace}`) this.log(` streamPath: ${this.settings.streamPath}`) - - if (this.settings.streamPath === 'direct' || this.settings.forceDirectPlay) { + if (this.settings.enableSubtitles) { + console.log("Direct play is forced, so subtitles are forcibly disabled."); + this.settings.enableSubtitles = false; + } stream = {directPlay: true} } else { try { diff --git a/web/directives/plex-settings.js b/web/directives/plex-settings.js index 3b7abca..353962c 100644 --- a/web/directives/plex-settings.js +++ b/web/directives/plex-settings.js @@ -145,6 +145,9 @@ module.exports = function (plex, dizquetv, $timeout) { return r; } + scope.shouldDisableSubtitles = () => { + return scope.settings.forceDirectPlay || (scope.settings.streamPath === "direct" ); + } scope.addPlexServer = async () => { scope.isProcessing = true; diff --git a/web/public/templates/plex-settings.html b/web/public/templates/plex-settings.html index f51c7b6..a28803d 100644 --- a/web/public/templates/plex-settings.html +++ b/web/public/templates/plex-settings.html @@ -178,8 +178,8 @@
- - + +