mirror of
https://github.com/snobu/destreamer.git
synced 2026-01-17 13:32:16 +00:00
* Add fluent-ffmpeg back and cross-platform progress bar * Repo clean up Move ts files to src, build and output js files to build folder * Do not print messages when exit code is 0 this is triggered by signal events Co-authored-by: kylon <kylonux@gmail.com>
15 lines
420 B
TypeScript
15 lines
420 B
TypeScript
import terminalImage from 'terminal-image';
|
|
import axios from 'axios';
|
|
|
|
|
|
export async function drawThumbnail(posterImage: string, accessToken: string) {
|
|
let thumbnail = await axios.get(posterImage,
|
|
{
|
|
headers: {
|
|
Authorization: `Bearer ${accessToken}`
|
|
},
|
|
responseType: 'arraybuffer'
|
|
});
|
|
console.log(await terminalImage.buffer(thumbnail.data));
|
|
}
|