Finished adding support for audio subscriptions, custom args for subscriptions, and custom output for subscription downloads

This commit is contained in:
Isaac Grynsztein
2020-06-21 23:27:14 -04:00
parent db81120645
commit 319bb0160b
13 changed files with 56 additions and 19 deletions

View File

@@ -39,8 +39,8 @@ function getJSONMp4(name, customPath, openReadPerms = false) {
function getJSONMp3(name, customPath, openReadPerms = false) {
var obj = null;
if (!customPath) customPath = config_api.getConfigItem('ytdl_audio_folder_path');
var jsonPath = customPath + name + ".info.json";
var alternateJsonPath = customPath + name + ".mp3.info.json";
var jsonPath = path.join(customPath, name + ".info.json");
var alternateJsonPath = path.join(customPath, name + ".mp3.info.json");
if (fs.existsSync(jsonPath)) {
obj = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
if (!is_windows && openReadPerms) fs.chmodSync(jsonPath, 0o755);