From 80b60f6d3221a57dca6303e0bf924d7d7610fcf9 Mon Sep 17 00:00:00 2001 From: Preston Date: Wed, 26 Aug 2020 17:21:44 -0400 Subject: [PATCH] Run caption logic earlier to avoid subtitles from not showing up. --- src/renderer/views/Watch/Watch.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index d95a6817..813ba43c 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -241,6 +241,15 @@ export default Vue.extend({ this.videoDislikeCount = result.videoDetails.dislikes this.isLive = result.player_response.videoDetails.isLiveContent + const captionTracks = + result.player_response.captions && + result.player_response.captions.playerCaptionsTracklistRenderer + .captionTracks + + if (typeof captionTracks !== 'undefined') { + await this.createCaptionUrls(captionTracks) + } + if (this.videoDislikeCount === null) { this.videoDislikeCount = 0 } @@ -321,15 +330,6 @@ export default Vue.extend({ this.createLocalStoryboardUrls(templateUrl) } - const captionTracks = - result.player_response.captions && - result.player_response.captions.playerCaptionsTracklistRenderer - .captionTracks - - if (typeof captionTracks !== 'undefined') { - await this.createCaptionUrls(captionTracks) - } - this.isLoading = false }) .catch(err => {