🐛 Trying to debug
This commit is contained in:
parent
c432e9a4f9
commit
808b786f5e
@ -16,7 +16,7 @@ class Youtubedl implements Icommands
|
|||||||
$bot->replyPolitely('L\'url n\'est pas conforme');
|
$bot->replyPolitely('L\'url n\'est pas conforme');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!in_array($type, ['', 'audio', 'video'], true)) {
|
if (!in_array($type, ['', 'audio', 'video', 'vidéo'], true)) {
|
||||||
$bot->replyPolitely('Je n\'ai pas compris ce que je devais faire');
|
$bot->replyPolitely('Je n\'ai pas compris ce que je devais faire');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,10 +24,14 @@ class Youtubedl implements Icommands
|
|||||||
|
|
||||||
if (in_array($type, ['', 'audio'], true)) {
|
if (in_array($type, ['', 'audio'], true)) {
|
||||||
$type = 'l\'audio';
|
$type = 'l\'audio';
|
||||||
exec(sprintf('%s --extract-audio --audio-format mp3 -o %s%s %s &> /dev/null &', $youtubedl, static::getDownloadFolder($bot), '%(upload_date)s-%(uploader)s-%(title)s.%(ext)s', $url));
|
$cmd = sprintf('%s --extract-audio --audio-format mp3 -o %s%s %s', $youtubedl, static::getDownloadFolder($bot), '%(upload_date)s-%(uploader)s-%(title)s.%(ext)s', $url);
|
||||||
|
exec($cmd, $output);
|
||||||
|
$bot->sendChatMessage('', sprintf('Je lance %s', $cmd));
|
||||||
} else {
|
} else {
|
||||||
$type = 'la vidéo';
|
$type = 'la vidéo';
|
||||||
exec(sprintf('%s -f bestvideo+bestaudio/best -o %s%s %s &> /dev/null &', $youtubedl, static::getDownloadFolder($bot), '%(upload_date)s-%(uploader)s-%(title)s.%(ext)s', $url));
|
$cmd = sprintf('%s -f bestvideo+bestaudio/best -o %s%s %s', $youtubedl, static::getDownloadFolder($bot), '%(upload_date)s-%(uploader)s-%(title)s.%(ext)s', $url);
|
||||||
|
exec($cmd, $output);
|
||||||
|
$bot->sendChatMessage('', sprintf('Je lance %s', $cmd));
|
||||||
}
|
}
|
||||||
$bot->replyPolitely(sprintf('Je %s %s', $action, $type));
|
$bot->replyPolitely(sprintf('Je %s %s', $action, $type));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user