mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-23 00:43:19 +03:00
fixed bug where downloading files failed if the name had to be encoded
This commit is contained in:
@@ -899,12 +899,16 @@ app.post('/downloadFile', async (req, res) => {
|
|||||||
let outputName = req.body.outputName;
|
let outputName = req.body.outputName;
|
||||||
let file = null;
|
let file = null;
|
||||||
if (!is_playlist) {
|
if (!is_playlist) {
|
||||||
|
fileNames = decodeURI(fileNames);
|
||||||
if (type === 'audio') {
|
if (type === 'audio') {
|
||||||
file = __dirname + '/' + audioFolderPath + fileNames + '.mp3';
|
file = __dirname + '/' + audioFolderPath + fileNames + '.mp3';
|
||||||
} else if (type === 'video') {
|
} else if (type === 'video') {
|
||||||
file = __dirname + '/' + videoFolderPath + fileNames + '.mp4';
|
file = __dirname + '/' + videoFolderPath + fileNames + '.mp4';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
for (let i = 0; i < fileNames.length; i++) {
|
||||||
|
fileNames[i] = decodeURI(fileNames[i]);
|
||||||
|
}
|
||||||
file = await createPlaylistZipFile(fileNames, type, outputName);
|
file = await createPlaylistZipFile(fileNames, type, outputName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user