A clean and minimal youtube frontend, without all the ads and whistles
JavaScript
fix: yt-dlp outputting warning
Christian Fei9be17ca377f1
diff --git a/lib/youtube.js b/lib/youtube.jsindex cc86306..b989885 100644--- a/lib/youtube.js+++ b/lib/youtube.js@@ -137,7 +137,8 @@ export async function getVideo (id) {if (isUnsupportedUrl(id)) return nullif (isYouTubeUrl(id)) id = extractIdFromUrl(id)try {- const {output} = await spawn('yt-dlp', ['-j', '--', id])+ let {output} = await spawn('yt-dlp', ['-j', '--', id])+ output = output.split('\n').filter(l => l.startsWith('{'))const json = JSON.parse(output)return {channelName: json.uploader_id.replace(/^@/, ''),