From 1ae6dad6fa3678089eae9386895a915addd4c592 Mon Sep 17 00:00:00 2001 From: Travis Shivers Date: Mon, 28 Sep 2020 15:03:44 -0500 Subject: [PATCH 1/2] fix(subtitlestream): return null instead of undefined when done --- src/utils/streams.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/streams.js b/src/utils/streams.js index c88e353e..75594384 100644 --- a/src/utils/streams.js +++ b/src/utils/streams.js @@ -48,8 +48,10 @@ async function* fetchLineGenerator(url, signal) { const extractValue = async (nextPromise) => { try { - const { value } = await nextPromise; - return value; + const { done, value } = await nextPromise; + return done + ? null + : value; } catch (e) { return null; } From 95c2d7438493d9df9bc3f4c20402594ba37f754f Mon Sep 17 00:00:00 2001 From: Travis Shivers Date: Mon, 28 Sep 2020 15:06:02 -0500 Subject: [PATCH 2/2] fix(subtitles): report subtitles none when direct playing subtitles --- src/store/modules/slplayer/getters.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/store/modules/slplayer/getters.js b/src/store/modules/slplayer/getters.js index e0b62804..2c810e23 100644 --- a/src/store/modules/slplayer/getters.js +++ b/src/store/modules/slplayer/getters.js @@ -227,7 +227,9 @@ export default { GET_SUBTITLE_PARAMS: (state, getters) => { if (!getters.GET_SELECTED_SUBTITLE_STREAM || getters.CAN_DIRECT_PLAY || getters.CAN_DIRECT_PLAY_SUBTITLES) { - return null; + return { + subtitles: 'none', + }; } if (getters.SHOULD_FORCE_BURN_SUBTITLES) {