Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

fix: download subtitles silently when downloading video

Christian Feib862ff608e52
diff --git a/lib/youtube.js b/lib/youtube.js
index 3e3ce1b..b2b5f4e 100644
--- a/lib/youtube.js
+++ b/lib/youtube.js
@@ -22,6 +22,7 @@ export async function downloadVideo (id, repo, callback = () => {}) {
}
const quality = repo.getVideoQualitySetting()
let location, format
+ ytdlp.subtitles(id).catch(() => {})
for await (const line of ytdlp.video(id, quality)) {
console.log(line)
callback(line)