mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-07 12:00:01 +03:00
File deletion is now unified between sub and non-sub files
This commit is contained in:
@@ -152,6 +152,10 @@ async function unsubscribe(sub, deleteMode, user_uid = null) {
|
||||
}
|
||||
|
||||
async function deleteSubscriptionFile(sub, file, deleteForever, file_uid = null, user_uid = null) {
|
||||
if (typeof sub === 'string') {
|
||||
// TODO: fix bad workaround where sub is a sub_id
|
||||
sub = await db_api.getRecord('subscriptions', {sub_id: sub});
|
||||
}
|
||||
// TODO: combine this with deletefile
|
||||
let basePath = null;
|
||||
basePath = user_uid ? path.join(config_api.getConfigItem('ytdl_users_base_path'), user_uid, 'subscriptions')
|
||||
|
||||
Reference in New Issue
Block a user