diff options
Diffstat (limited to 'public/upload.php')
| -rw-r--r-- | public/upload.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/public/upload.php b/public/upload.php index 15a66d2..123c30a 100644 --- a/public/upload.php +++ b/public/upload.php @@ -49,7 +49,8 @@ try { if (FILEEXT_ENABLED && isset($url) && !empty($url)) { $output = []; - exec('yt-dlp -f "worst" --get-filename -o "%(filesize_approx)s %(ext)s %(duration)s" ' . escapeshellarg($url) . '', $output); + $fileext_quality = FILEEXT_QUALITY ? ('-f "' . FILEEXT_QUALITY . '"') : ""; + exec('yt-dlp ' . $fileext_quality . ' --get-filename -o "%(filesize_approx)s %(ext)s %(duration)s" ' . escapeshellarg($url) . '', $output); if (empty($output)) { throw new RuntimeException('Bad URL'); } @@ -166,7 +167,8 @@ try { $file_path = FILE_UPLOAD_DIRECTORY . "/$file_id.{$file_data['extension']}"; exec(sprintf( - 'yt-dlp -f "worst" -o "%s" %s 2>&1', + 'yt-dlp %s -o "%s" %s 2>&1', + FILEEXT_QUALITY ? ('-f "' . FILEEXT_QUALITY . '"') : "", $file_path, escapeshellarg($url) ), $output, $result); |
