mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-07 12:00:01 +03:00
Updated downloadFile API request
This commit is contained in:
@@ -16,7 +16,7 @@ paths:
|
||||
- downloader
|
||||
summary: Download video file
|
||||
description: |-
|
||||
Downloads a video file with the given URL. Will include global args if they exist.
|
||||
Downloads a file with the given URL. Will include global args if they exist.
|
||||
|
||||
|
||||
HTTP requests will return once the video file download completes. In the future, it will (by default) return once the download starts, and a separate API call will be used for checking the download status.
|
||||
@@ -41,7 +41,7 @@ paths:
|
||||
post:
|
||||
tags:
|
||||
- downloader
|
||||
summary: Download video file
|
||||
summary: Generates arguments used to download file
|
||||
description: Generates args, used for checking what args would run if you ran downloadFile
|
||||
operationId: post-generateArgs
|
||||
requestBody:
|
||||
|
||||
@@ -803,7 +803,7 @@ app.post('/api/testConnectionString', optionalJwt, async (req, res) => {
|
||||
app.post('/api/downloadFile', optionalJwt, async function(req, res) {
|
||||
req.setTimeout(0); // remove timeout in case of long videos
|
||||
const url = req.body.url;
|
||||
const type = req.body.type;
|
||||
const type = req.body.type ? req.body.type : 'video';
|
||||
const user_uid = req.isAuthenticated() ? req.user.uid : null;
|
||||
const options = {
|
||||
customArgs: req.body.customArgs,
|
||||
|
||||
Reference in New Issue
Block a user