mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-07 12:00:01 +03:00
Fixes bug where an error would occur on startup if a user's file folder was missing (such as "{user}/audio" if they had not downloaded any audio files)
This commit is contained in:
@@ -20,6 +20,9 @@ function getTrueFileName(unfixed_path, type) {
|
||||
}
|
||||
|
||||
function getDownloadedFilesByType(basePath, type) {
|
||||
// return empty array if the path doesn't exist
|
||||
if (!fs.existsSync(basePath)) return [];
|
||||
|
||||
let files = [];
|
||||
const ext = type === 'audio' ? 'mp3' : 'mp4';
|
||||
var located_files = recFindByExt(basePath, ext);
|
||||
|
||||
Reference in New Issue
Block a user