This commit is contained in:
Flummi 2017-01-11 01:19:49 +01:00
parent d648e1c848
commit 125efb0bf8

View File

@ -78,8 +78,14 @@ module.exports = (lib) => {
var title = inf.title;
var iurl = inf.iurl;
try {
var dlformat = (m4a?'audioonly':'webm');
ytdl.downloadFromInfo(inf, { filter: (format) => { return format.container === dlformat; } })
//var dlformat = (m4a?'audioonly':'webm');
var dlformat;
if(m4a)
dlformat = 'audioonly';
else
dlformat = { filter: (format) => { return format.container === 'webm'; } };
ytdl.downloadFromInfo(inf, dlformat)
.on('response', (res) => {
if( ( res.headers['content-length'] <= lib.cfg.main.maxFileSize ) || force ) {
info = {