mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-07 20:10:03 +03:00
Rebuild database task (#900)
* Improved tests for multi-user mode * Adds task to rebuild database * Updated subscriptions.js export syntax * Subscription metadata is now backed up * Added typing to task key * Updated api models * Tasks actions styling update
This commit is contained in:
@@ -519,6 +519,17 @@ exports.convertFlatObjectToNestedObject = (obj) => {
|
||||
return result;
|
||||
}
|
||||
|
||||
exports.getDirectoriesInDirectory = async (basePath) => {
|
||||
try {
|
||||
const files = await fs.readdir(basePath, { withFileTypes: true });
|
||||
return files
|
||||
.filter((file) => file.isDirectory())
|
||||
.map((file) => path.join(basePath, file.name));
|
||||
} catch (err) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
// objects
|
||||
|
||||
function File(id, title, thumbnailURL, isAudio, duration, url, uploader, size, path, upload_date, description, view_count, height, abr) {
|
||||
|
||||
Reference in New Issue
Block a user