1
0
mirror of https://github.com/snobu/destreamer.git synced 2026-03-26 21:39:07 +00:00

Switched to terminal-image for inlining thumbnails

This commit is contained in:
snobu
2020-04-08 23:52:48 +03:00
parent 388ec0c9a3
commit adda6828a6
5 changed files with 441 additions and 46 deletions

View File

@@ -175,10 +175,10 @@ async function downloadVideo(videoUrls: string[], outputDirectory: string, sessi
await Promise.all(metadata.map(async video => {
video.title = sanitize(video.title);
term.blue(`\nDownloading Video: ${video.title}\n`);
drawThumbnail(video.posterImage, session.AccessToken);
await sleep(100); // there's something wrong with drawThumbnail we should not need this
// Very experimental inline thumbnail rendering
await drawThumbnail(video.posterImage, session.AccessToken);
console.log('Spawning youtube-dl with cookie and HLS URL...');
const format = argv.format ? `-f "${argv.format}"` : "";
var youtubedlCmd = 'youtube-dl --no-call-home --no-warnings ' + format +