From c7ac9a84158275e7bc72a6b7ba2dab25aec61308 Mon Sep 17 00:00:00 2001 From: Preston Date: Mon, 19 Oct 2020 15:16:56 -0400 Subject: [PATCH] Add caption download links when Invidious API is enabled --- src/renderer/views/Watch/Watch.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index 7c749e66..17128e61 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -547,7 +547,15 @@ export default Vue.extend({ } return object - }).reverse() + }).reverse().concat(result.captions.map((caption) => { + const label = `${caption.label} (${caption.languageCode}) - text/vtt` + const object = { + url: caption.url, + label: label + } + + return object + })) this.audioSourceList = result.adaptiveFormats.filter((format) => { return format.type.includes('audio')