hopefully fixes yt thumbnails
This commit is contained in:
parent
64cbeed42c
commit
9fa63b06a6
|
@ -75,9 +75,8 @@ module.exports = (lib) => {
|
||||||
if(url.match(yt)) { // ytdl
|
if(url.match(yt)) { // ytdl
|
||||||
ytdl.getInfo(url, (err, inf) => {
|
ytdl.getInfo(url, (err, inf) => {
|
||||||
if(!err) {
|
if(!err) {
|
||||||
console.log(JSON.stringify(inf));
|
|
||||||
var title = inf.title;
|
var title = inf.title;
|
||||||
var iurl = inf.iurl;
|
var iurl = JSON.parse(inf.player_response).videoDetails.thumbnail.thumbnails[0].url.split('?')[0];
|
||||||
try {
|
try {
|
||||||
dlformat = { filter: (format) => { return format.container === 'webm'; } };
|
dlformat = { filter: (format) => { return format.container === 'webm'; } };
|
||||||
ytdl.downloadFromInfo(inf, dlformat)
|
ytdl.downloadFromInfo(inf, dlformat)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user