youtube-dl refactor (#956)

* Consolidated all youtube-dl calls into one function
* Downloads can now be cancelled and better "paused"
* Removed node-youtube-dl dependency
* Added ability to manually check a subscription, and to cancel a subscription check

---------

Co-authored-by: Dedy Martadinata S <dedyms@proton.me>
This commit is contained in:
Tzahi12345
2023-11-27 12:55:53 -05:00
committed by GitHub
parent 99c5cf590e
commit 0565cf24a6
23 changed files with 653 additions and 332 deletions

View File

@@ -293,6 +293,48 @@ paths:
$ref: '#/components/schemas/UnsubscribeResponse'
security:
- Auth query parameter: []
/api/checkSubscription:
post:
tags:
- subscriptions
summary: Run a check for videos for a subscription
description: Runs a subscription check
operationId: post-api-checksubscription
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CheckSubscriptionRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessObject'
security:
- Auth query parameter: []
/api/cancelCheckSubscription:
post:
tags:
- subscriptions
summary: Cancels check for videos for a subscription
description: Cancels subscription check
operationId: post-api-checksubscription
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CheckSubscriptionRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessObject'
security:
- Auth query parameter: []
/api/deleteSubscriptionFile:
post:
tags:
@@ -1981,11 +2023,11 @@ components:
type: string
UnsubscribeRequest:
required:
- sub
- sub_id
type: object
properties:
sub:
$ref: '#/components/schemas/SubscriptionRequestData'
sub_id:
type: string
deleteMode:
type: boolean
description: Defaults to false
@@ -1998,6 +2040,13 @@ components:
type: boolean
error:
type: string
CheckSubscriptionRequest:
required:
- sub_id
type: object
properties:
sub_id:
type: string
DeleteAllFilesResponse:
type: object
properties:
@@ -2683,6 +2732,8 @@ components:
type: boolean
paused:
type: boolean
cancelled:
type: boolean
finished_step:
type: boolean
url:
@@ -2841,6 +2892,8 @@ components:
nullable: true
isPlaylist:
type: boolean
child_process:
type: object
archive:
type: string
timerange:
@@ -2849,6 +2902,10 @@ components:
type: string
custom_output:
type: string
downloading:
type: boolean
paused:
type: boolean
videos:
type: array
items: