Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #195 from ttshivers/direct_play_subtitles
Browse files Browse the repository at this point in the history
Direct play subtitles
  • Loading branch information
ttshivers authored Sep 28, 2020
2 parents bd6dfd4 + 95c2d74 commit caf67ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/store/modules/slplayer/getters.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 4 additions & 2 deletions src/utils/streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit caf67ad

Please sign in to comment.