From 105d5bf3f7c2bdc4ade9745e3158853879108c40 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 13 Mar 2022 22:56:20 +0700 Subject: [PATCH] add auto label to subtitle track --- tubearchivist/static/script.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tubearchivist/static/script.js b/tubearchivist/static/script.js index 6e5c818..6929026 100644 --- a/tubearchivist/static/script.js +++ b/tubearchivist/static/script.js @@ -431,7 +431,12 @@ function createVideoTag(videoData, videoProgress) { var videoSubtitles = videoData.data.subtitles; // Array of subtitles if (typeof(videoSubtitles) != 'undefined' && videoData.config.downloads.subtitle) { for (var i = 0; i < videoSubtitles.length; i++) { - subtitles += ``; + console.log(videoSubtitles[i]); + let label = videoSubtitles[i].name; + if (videoSubtitles[i].source == "auto") { + label += " - auto"; + } + subtitles += ``; } }