mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-17 07:11:30 +03:00
Fixed bug that preventing reddit videos from downloading
This commit is contained in:
@@ -1476,6 +1476,8 @@ async function generateArgs(url, type, options) {
|
|||||||
if (!is_audio && (url.includes('tiktok') || url.includes('pscp.tv'))) {
|
if (!is_audio && (url.includes('tiktok') || url.includes('pscp.tv'))) {
|
||||||
// tiktok videos fail when using the default format
|
// tiktok videos fail when using the default format
|
||||||
qualityPath = '-f best';
|
qualityPath = '-f best';
|
||||||
|
} else if (!is_audio && url.includes('reddit')) {
|
||||||
|
qualityPath = '-f bestvideo+bestaudio'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (customArgs) {
|
if (customArgs) {
|
||||||
@@ -1892,7 +1894,7 @@ app.post('/api/tomp4', optionalJwt, async function(req, res) {
|
|||||||
|
|
||||||
const is_playlist = url.includes('playlist');
|
const is_playlist = url.includes('playlist');
|
||||||
let result_obj = null;
|
let result_obj = null;
|
||||||
if (is_playlist || options.customQualityConfiguration || options.customArgs || options.selectedHeight || url.includes('twitch'))
|
if (is_playlist || options.customQualityConfiguration || options.customArgs || options.selectedHeight || url.includes('twitch') || url.includes('reddit'))
|
||||||
result_obj = await downloadFileByURL_exec(url, 'video', options, req.query.sessionID);
|
result_obj = await downloadFileByURL_exec(url, 'video', options, req.query.sessionID);
|
||||||
else
|
else
|
||||||
result_obj = await downloadFileByURL_normal(url, 'video', options, req.query.sessionID);
|
result_obj = await downloadFileByURL_normal(url, 'video', options, req.query.sessionID);
|
||||||
|
|||||||
Reference in New Issue
Block a user