From 32da9dd9dde9633b8c26f8281f8c2334c00f8933 Mon Sep 17 00:00:00 2001 From: Isaac Grynsztein Date: Sun, 21 Jun 2020 23:49:00 -0400 Subject: [PATCH] format in custom args for subscriptions now overrides default format (allows for users to specify custom formats for subs) --- backend/subscriptions.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/subscriptions.js b/backend/subscriptions.js index 465e1cc..76b3ea8 100644 --- a/backend/subscriptions.js +++ b/backend/subscriptions.js @@ -289,6 +289,11 @@ async function getVideosForSub(sub, user_uid = null) { if (sub.custom_args) { customArgsArray = sub.custom_args.split(',,'); + if (customArgsArray.indexOf('-f') !== -1) { + // if custom args has a custom quality, replce the original quality with that of custom args + const original_output_index = downloadConfig.indexOf('-f'); + downloadConfig.splice(original_output_index, 2); + } downloadConfig.push(...customArgsArray); }