Fixed bug where unsubscribing from a channel would clear the entire files table

Fixed issue where yt-dlp did not work with subscriptions
This commit is contained in:
Isaac Abadi
2021-07-28 19:44:05 -06:00
parent c0a385ce78
commit d09b244bc2
5 changed files with 37 additions and 23 deletions

View File

@@ -1,6 +1,7 @@
const fs = require('fs-extra')
const path = require('path')
const config_api = require('./config');
const CONSTS = require('./consts')
const archiver = require('archiver');
const is_windows = process.platform === 'win32';
@@ -315,6 +316,11 @@ function addUIDsToCategory(category, files) {
return files_that_match;
}
function getCurrentDownloader() {
const details_json = fs.readJSONSync(CONSTS.DETAILS_BIN_PATH);
return details_json['downloader'];
}
async function recFindByExt(base,ext,files,result)
{
files = files || (await fs.readdir(base))
@@ -390,6 +396,7 @@ module.exports = {
durationStringToNumber: durationStringToNumber,
getMatchingCategoryFiles: getMatchingCategoryFiles,
addUIDsToCategory: addUIDsToCategory,
getCurrentDownloader: getCurrentDownloader,
recFindByExt: recFindByExt,
removeFileExtension: removeFileExtension,
wait: wait,