mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-21 17:23:18 +03:00
Added audioOnlyMode, customArgs, and customFileOutput fields to the subscribe dialog
This commit is contained in:
@@ -2099,6 +2099,9 @@ app.post('/api/subscribe', optionalJwt, async (req, res) => {
|
||||
let url = req.body.url;
|
||||
let timerange = req.body.timerange;
|
||||
let streamingOnly = req.body.streamingOnly;
|
||||
let audioOnly = req.body.audioOnly;
|
||||
let customArgs = req.body.customArgs;
|
||||
let customOutput = req.body.customOutput;
|
||||
let user_uid = req.isAuthenticated() ? req.user.uid : null;
|
||||
|
||||
const new_sub = {
|
||||
@@ -2106,7 +2109,8 @@ app.post('/api/subscribe', optionalJwt, async (req, res) => {
|
||||
url: url,
|
||||
id: uuid(),
|
||||
streamingOnly: streamingOnly,
|
||||
user_uid: user_uid
|
||||
user_uid: user_uid,
|
||||
type: audioOnly ? 'audio' : 'video'
|
||||
};
|
||||
|
||||
// adds timerange if it exists, otherwise all videos will be downloaded
|
||||
@@ -2114,6 +2118,14 @@ app.post('/api/subscribe', optionalJwt, async (req, res) => {
|
||||
new_sub.timerange = timerange;
|
||||
}
|
||||
|
||||
if (customArgs && customArgs !== '') {
|
||||
sub.custom_args = customArgs;
|
||||
}
|
||||
|
||||
if (customOutput && customOutput !== '') {
|
||||
sub.custom_output = customOutput;
|
||||
}
|
||||
|
||||
const result_obj = await subscriptions_api.subscribe(new_sub, user_uid);
|
||||
|
||||
if (result_obj.success) {
|
||||
|
||||
Reference in New Issue
Block a user