mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-08 15:21:29 +03:00
Updated downloadFile API request
This commit is contained in:
@@ -16,7 +16,7 @@ paths:
|
|||||||
- downloader
|
- downloader
|
||||||
summary: Download video file
|
summary: Download video file
|
||||||
description: |-
|
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.
|
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:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- downloader
|
- 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
|
description: Generates args, used for checking what args would run if you ran downloadFile
|
||||||
operationId: post-generateArgs
|
operationId: post-generateArgs
|
||||||
requestBody:
|
requestBody:
|
||||||
|
|||||||
@@ -803,7 +803,7 @@ app.post('/api/testConnectionString', optionalJwt, async (req, res) => {
|
|||||||
app.post('/api/downloadFile', optionalJwt, async function(req, res) {
|
app.post('/api/downloadFile', optionalJwt, async function(req, res) {
|
||||||
req.setTimeout(0); // remove timeout in case of long videos
|
req.setTimeout(0); // remove timeout in case of long videos
|
||||||
const url = req.body.url;
|
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 user_uid = req.isAuthenticated() ? req.user.uid : null;
|
||||||
const options = {
|
const options = {
|
||||||
customArgs: req.body.customArgs,
|
customArgs: req.body.customArgs,
|
||||||
|
|||||||
Reference in New Issue
Block a user