mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-17 16:11:28 +03:00
Updated API
Removed unused component
This commit is contained in:
@@ -6,34 +6,7 @@ info:
|
|||||||
servers:
|
servers:
|
||||||
- url: 'http://localhost:17442'
|
- url: 'http://localhost:17442'
|
||||||
paths:
|
paths:
|
||||||
/api/tomp3:
|
/api/downloadFile:
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- downloader
|
|
||||||
summary: Download audio file
|
|
||||||
description: |-
|
|
||||||
Downloads an audio file with the given URL. Will include global args if they exist.
|
|
||||||
|
|
||||||
|
|
||||||
HTTP requests will return once the audio 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.
|
|
||||||
operationId: post-tomp3
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Mp3DownloadRequest'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Mp3DownloadResponse'
|
|
||||||
'500':
|
|
||||||
description: Server download error
|
|
||||||
security:
|
|
||||||
- Auth query parameter: []
|
|
||||||
/api/tomp4:
|
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- downloader
|
- downloader
|
||||||
@@ -48,14 +21,14 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Mp4DownloadRequest'
|
$ref: '#/components/schemas/DownloadRequest'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Mp4DownloadResponse'
|
$ref: '#/components/schemas/DownloadResponse'
|
||||||
'500':
|
'500':
|
||||||
description: Server download error
|
description: Server download error
|
||||||
security:
|
security:
|
||||||
@@ -365,27 +338,6 @@ paths:
|
|||||||
$ref: '#/components/schemas/SuccessObject'
|
$ref: '#/components/schemas/SuccessObject'
|
||||||
security:
|
security:
|
||||||
- Auth query parameter: []
|
- Auth query parameter: []
|
||||||
/api/updatePlaylistFiles:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- playlists
|
|
||||||
summary: Update playlist files
|
|
||||||
description: Updates the list of filenames in the playlist object
|
|
||||||
operationId: post-api-updatePlaylistFiles
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/UpdatePlaylistFilesRequest'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/SuccessObject'
|
|
||||||
security:
|
|
||||||
- Auth query parameter: []
|
|
||||||
/api/deletePlaylist:
|
/api/deletePlaylist:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@@ -429,7 +381,7 @@ paths:
|
|||||||
description: Whether the operation succeeded
|
description: Whether the operation succeeded
|
||||||
security:
|
security:
|
||||||
- Auth query parameter: []
|
- Auth query parameter: []
|
||||||
/api/downloadFile:
|
/api/downloadFileFromServer:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- files
|
- files
|
||||||
@@ -451,13 +403,13 @@ paths:
|
|||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- files
|
- files
|
||||||
summary: Delete downloaded file (unused)
|
summary: Delete downloaded file
|
||||||
operationId: post-api-deleteFile
|
operationId: post-api-deleteFile
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/DeleteFileRequest'
|
$ref: '#/components/schemas/DeleteMp3Mp4Request'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
@@ -861,6 +813,16 @@ components:
|
|||||||
enum:
|
enum:
|
||||||
- audio
|
- audio
|
||||||
- video
|
- video
|
||||||
|
CropFileSettings:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- cropFileStart
|
||||||
|
- cropFileEnd
|
||||||
|
properties:
|
||||||
|
cropFileStart:
|
||||||
|
type: number
|
||||||
|
cropFileEnd:
|
||||||
|
type: number
|
||||||
Config:
|
Config:
|
||||||
required:
|
required:
|
||||||
- YoutubeDLMaterial
|
- YoutubeDLMaterial
|
||||||
@@ -868,7 +830,7 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
YoutubeDLMaterial:
|
YoutubeDLMaterial:
|
||||||
type: object
|
type: object
|
||||||
BaseDownloadRequest:
|
DownloadRequest:
|
||||||
required:
|
required:
|
||||||
- url
|
- url
|
||||||
type: object
|
type: object
|
||||||
@@ -881,7 +843,10 @@ components:
|
|||||||
example: '251'
|
example: '251'
|
||||||
customArgs:
|
customArgs:
|
||||||
type: string
|
type: string
|
||||||
description: Custom command-line arguments for youtubedl. Overrides all other options, except url.
|
description: Custom command-line arguments for youtube-dl. Overrides all other options, except url.
|
||||||
|
additionalArgs:
|
||||||
|
type: string
|
||||||
|
description: Additional command-line arguments for youtube-dl. Added to whatever args would normally be used.
|
||||||
customOutput:
|
customOutput:
|
||||||
type: string
|
type: string
|
||||||
description: Custom output filename template.
|
description: Custom output filename template.
|
||||||
@@ -891,67 +856,31 @@ components:
|
|||||||
youtubePassword:
|
youtubePassword:
|
||||||
type: string
|
type: string
|
||||||
description: Account password
|
description: Account password
|
||||||
ui_uid:
|
selectedHeight:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
description: Height of the video, if known
|
||||||
Mp3DownloadRequest:
|
example: '1080'
|
||||||
allOf:
|
maxBitrate:
|
||||||
- $ref: '#/components/schemas/BaseDownloadRequest'
|
type: string
|
||||||
- type: object
|
description: Specify ffmpeg/avconv audio quality
|
||||||
properties:
|
example: '160'
|
||||||
maxBitrate:
|
type:
|
||||||
type: string
|
$ref: '#/components/schemas/FileType'
|
||||||
description: Specify ffmpeg/avconv audio quality
|
cropFileSettings:
|
||||||
example: '160'
|
$ref: '#/components/schemas/CropFileSettings'
|
||||||
Mp4DownloadRequest:
|
DownloadResponse:
|
||||||
allOf:
|
|
||||||
- $ref: '#/components/schemas/BaseDownloadRequest'
|
|
||||||
- type: object
|
|
||||||
properties:
|
|
||||||
selectedHeight:
|
|
||||||
type: string
|
|
||||||
description: Height of the video, if known
|
|
||||||
example: '1080'
|
|
||||||
BaseDownloadResponse:
|
|
||||||
required:
|
|
||||||
- uid
|
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
uid:
|
download:
|
||||||
type: string
|
$ref: '#/components/schemas/Download'
|
||||||
file_names:
|
|
||||||
nullable: true
|
nullable: true
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
Mp3DownloadResponse:
|
|
||||||
allOf:
|
|
||||||
- $ref: '#/components/schemas/BaseDownloadResponse'
|
|
||||||
- type: object
|
|
||||||
required:
|
|
||||||
- audiopathEncoded
|
|
||||||
properties:
|
|
||||||
audiopathEncoded:
|
|
||||||
type: string
|
|
||||||
Mp4DownloadResponse:
|
|
||||||
allOf:
|
|
||||||
- $ref: '#/components/schemas/BaseDownloadResponse'
|
|
||||||
- type: object
|
|
||||||
required:
|
|
||||||
- videopathEncoded
|
|
||||||
properties:
|
|
||||||
videopathEncoded:
|
|
||||||
type: string
|
|
||||||
GetDownloadRequest:
|
GetDownloadRequest:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
session_id:
|
download_uid:
|
||||||
type: string
|
|
||||||
download_id:
|
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- session_id
|
- download_uid
|
||||||
- download_id
|
|
||||||
GetDownloadResponse:
|
GetDownloadResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -962,13 +891,9 @@ components:
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
downloads:
|
downloads:
|
||||||
type: object
|
type: array
|
||||||
description: Map of Session ID to inner map
|
items:
|
||||||
additionalProperties:
|
$ref: '#/components/schemas/Download'
|
||||||
type: object
|
|
||||||
description: Map of Download UID to downoad
|
|
||||||
additionalProperties:
|
|
||||||
$ref: '#/components/schemas/Download'
|
|
||||||
GetMp3sResponse:
|
GetMp3sResponse:
|
||||||
required:
|
required:
|
||||||
- mp3s
|
- mp3s
|
||||||
@@ -1038,14 +963,11 @@ components:
|
|||||||
$ref: '#/components/schemas/DatabaseFile'
|
$ref: '#/components/schemas/DatabaseFile'
|
||||||
SharingToggle:
|
SharingToggle:
|
||||||
required:
|
required:
|
||||||
- type
|
|
||||||
- uid
|
- uid
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
uid:
|
uid:
|
||||||
type: string
|
type: string
|
||||||
type:
|
|
||||||
$ref: '#/components/schemas/FileType'
|
|
||||||
is_playlist:
|
is_playlist:
|
||||||
type: boolean
|
type: boolean
|
||||||
SubscribeRequest:
|
SubscribeRequest:
|
||||||
@@ -1061,14 +983,14 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
timerange:
|
timerange:
|
||||||
type: string
|
type: string
|
||||||
streamingOnly:
|
|
||||||
type: boolean
|
|
||||||
audioOnly:
|
audioOnly:
|
||||||
type: boolean
|
type: boolean
|
||||||
customArgs:
|
customArgs:
|
||||||
type: string
|
type: string
|
||||||
customFileOutput:
|
customFileOutput:
|
||||||
type: string
|
type: string
|
||||||
|
maxQuality:
|
||||||
|
type: string
|
||||||
SubscribeResponse:
|
SubscribeResponse:
|
||||||
required:
|
required:
|
||||||
- new_sub
|
- new_sub
|
||||||
@@ -1120,6 +1042,9 @@ components:
|
|||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: Subscription ID
|
description: Subscription ID
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description: Subscription name
|
||||||
GetSubscriptionResponse:
|
GetSubscriptionResponse:
|
||||||
required:
|
required:
|
||||||
- files
|
- files
|
||||||
@@ -1150,16 +1075,15 @@ components:
|
|||||||
$ref: '#/components/schemas/Subscription'
|
$ref: '#/components/schemas/Subscription'
|
||||||
CreatePlaylistRequest:
|
CreatePlaylistRequest:
|
||||||
required:
|
required:
|
||||||
- fileNames
|
- uids
|
||||||
- playlistName
|
- playlistName
|
||||||
- thumbnailURL
|
- thumbnailURL
|
||||||
- type
|
- type
|
||||||
- duration
|
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
playlistName:
|
playlistName:
|
||||||
type: string
|
type: string
|
||||||
fileNames:
|
uids:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
@@ -1167,8 +1091,6 @@ components:
|
|||||||
$ref: '#/components/schemas/FileType'
|
$ref: '#/components/schemas/FileType'
|
||||||
thumbnailURL:
|
thumbnailURL:
|
||||||
type: string
|
type: string
|
||||||
duration:
|
|
||||||
type: number
|
|
||||||
CreatePlaylistResponse:
|
CreatePlaylistResponse:
|
||||||
required:
|
required:
|
||||||
- new_playlist
|
- new_playlist
|
||||||
@@ -1181,15 +1103,17 @@ components:
|
|||||||
type: boolean
|
type: boolean
|
||||||
GetPlaylistRequest:
|
GetPlaylistRequest:
|
||||||
required:
|
required:
|
||||||
- playlistID
|
- playlist_id
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
playlistID:
|
playlist_id:
|
||||||
type: string
|
type: string
|
||||||
type:
|
type:
|
||||||
$ref: '#/components/schemas/FileType'
|
$ref: '#/components/schemas/FileType'
|
||||||
uuid:
|
uuid:
|
||||||
type: string
|
type: string
|
||||||
|
include_file_metadata:
|
||||||
|
type: boolean
|
||||||
GetPlaylistResponse:
|
GetPlaylistResponse:
|
||||||
required:
|
required:
|
||||||
- playlist
|
- playlist
|
||||||
@@ -1203,6 +1127,20 @@ components:
|
|||||||
$ref: '#/components/schemas/FileType'
|
$ref: '#/components/schemas/FileType'
|
||||||
success:
|
success:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
GetPlaylistsRequest:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
include_categories:
|
||||||
|
type: boolean
|
||||||
|
GetPlaylistsResponse:
|
||||||
|
required:
|
||||||
|
- playlists
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
playlists:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Playlist'
|
||||||
UpdatePlaylistRequest:
|
UpdatePlaylistRequest:
|
||||||
required:
|
required:
|
||||||
- playlist
|
- playlist
|
||||||
@@ -1210,74 +1148,30 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
playlist:
|
playlist:
|
||||||
$ref: '#/components/schemas/Playlist'
|
$ref: '#/components/schemas/Playlist'
|
||||||
UpdatePlaylistFilesRequest:
|
|
||||||
required:
|
|
||||||
- fileNames
|
|
||||||
- playlistID
|
|
||||||
- type
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
playlistID:
|
|
||||||
type: string
|
|
||||||
fileNames:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
type:
|
|
||||||
$ref: '#/components/schemas/FileType'
|
|
||||||
DeletePlaylistRequest:
|
DeletePlaylistRequest:
|
||||||
required:
|
required:
|
||||||
- playlistID
|
- playlist_id
|
||||||
- type
|
- type
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
playlistID:
|
playlist_id:
|
||||||
type: string
|
type: string
|
||||||
type:
|
type:
|
||||||
$ref: '#/components/schemas/FileType'
|
$ref: '#/components/schemas/FileType'
|
||||||
DownloadFileRequest:
|
DownloadFileRequest:
|
||||||
required:
|
required:
|
||||||
- fileNames
|
- uid
|
||||||
- type
|
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
fileNames:
|
|
||||||
oneOf:
|
|
||||||
- type: string
|
|
||||||
- type: array
|
|
||||||
description: Array of 1 or more files to download
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
zip_mode:
|
|
||||||
type: boolean
|
|
||||||
type:
|
|
||||||
$ref: '#/components/schemas/FileType'
|
|
||||||
outputName:
|
|
||||||
type: string
|
|
||||||
fullPathProvided:
|
|
||||||
type: boolean
|
|
||||||
uuid:
|
|
||||||
type: string
|
|
||||||
uid:
|
uid:
|
||||||
type: string
|
type: string
|
||||||
id:
|
uuid:
|
||||||
type: string
|
type: string
|
||||||
subscriptionName:
|
sub_id:
|
||||||
type: string
|
type: string
|
||||||
description: Only used for subscriptions
|
is_playlist:
|
||||||
subPlaylist:
|
|
||||||
type: boolean
|
type: boolean
|
||||||
description: Only used for subscriptions
|
description: Only used for subscriptions
|
||||||
DeleteFileRequest:
|
|
||||||
required:
|
|
||||||
- fileName
|
|
||||||
- type
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
fileName:
|
|
||||||
type: string
|
|
||||||
type:
|
|
||||||
$ref: '#/components/schemas/FileType'
|
|
||||||
DownloadArchiveRequest:
|
DownloadArchiveRequest:
|
||||||
required:
|
required:
|
||||||
- sub
|
- sub
|
||||||
@@ -1406,7 +1300,7 @@ components:
|
|||||||
type: boolean
|
type: boolean
|
||||||
Playlist:
|
Playlist:
|
||||||
required:
|
required:
|
||||||
- fileNames
|
- uids
|
||||||
- id
|
- id
|
||||||
- name
|
- name
|
||||||
- thumbnailURL
|
- thumbnailURL
|
||||||
@@ -1417,7 +1311,7 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
fileNames:
|
uids:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
@@ -1431,16 +1325,22 @@ components:
|
|||||||
type: number
|
type: number
|
||||||
duration:
|
duration:
|
||||||
type: number
|
type: number
|
||||||
|
user_uid:
|
||||||
|
type: string
|
||||||
Download:
|
Download:
|
||||||
required:
|
required:
|
||||||
- uid
|
|
||||||
- ui_uid
|
|
||||||
- downloading
|
|
||||||
- complete
|
|
||||||
- url
|
- url
|
||||||
- type
|
- type
|
||||||
|
- title
|
||||||
|
- type
|
||||||
|
- options
|
||||||
|
- uid
|
||||||
|
- step_index
|
||||||
|
- paused
|
||||||
|
- running
|
||||||
|
- finished_step
|
||||||
- percent_complete
|
- percent_complete
|
||||||
- is_playlist
|
- finished
|
||||||
- timestamp_start
|
- timestamp_start
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -1448,32 +1348,36 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
ui_uid:
|
ui_uid:
|
||||||
type: string
|
type: string
|
||||||
downloading:
|
running:
|
||||||
type: boolean
|
type: boolean
|
||||||
complete:
|
finished:
|
||||||
|
type: boolean
|
||||||
|
paused:
|
||||||
|
type: boolean
|
||||||
|
finished_step:
|
||||||
type: boolean
|
type: boolean
|
||||||
url:
|
url:
|
||||||
type: string
|
type: string
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
step_index:
|
||||||
|
type: number
|
||||||
percent_complete:
|
percent_complete:
|
||||||
type: number
|
type: number
|
||||||
is_playlist:
|
|
||||||
type: boolean
|
|
||||||
timestamp_start:
|
timestamp_start:
|
||||||
type: number
|
type: number
|
||||||
timestamp_end:
|
|
||||||
type: number
|
|
||||||
filesize:
|
|
||||||
type: number
|
|
||||||
nullable: true
|
|
||||||
error:
|
error:
|
||||||
type: string
|
type: string
|
||||||
description: Error text, set if download fails.
|
description: Error text, set if download fails.
|
||||||
fileNames:
|
nullable: true
|
||||||
type: array
|
user_uid:
|
||||||
items:
|
type: string
|
||||||
type: string
|
sub_id:
|
||||||
|
type: string
|
||||||
|
sub_name:
|
||||||
|
type: string
|
||||||
SubscriptionRequestData:
|
SubscriptionRequestData:
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
|
|||||||
@@ -1348,7 +1348,6 @@ app.post('/api/subscribe', optionalJwt, async (req, res) => {
|
|||||||
let url = req.body.url;
|
let url = req.body.url;
|
||||||
let maxQuality = req.body.maxQuality;
|
let maxQuality = req.body.maxQuality;
|
||||||
let timerange = req.body.timerange;
|
let timerange = req.body.timerange;
|
||||||
let streamingOnly = req.body.streamingOnly;
|
|
||||||
let audioOnly = req.body.audioOnly;
|
let audioOnly = req.body.audioOnly;
|
||||||
let customArgs = req.body.customArgs;
|
let customArgs = req.body.customArgs;
|
||||||
let customOutput = req.body.customFileOutput;
|
let customOutput = req.body.customFileOutput;
|
||||||
@@ -1358,7 +1357,6 @@ app.post('/api/subscribe', optionalJwt, async (req, res) => {
|
|||||||
url: url,
|
url: url,
|
||||||
maxQuality: maxQuality,
|
maxQuality: maxQuality,
|
||||||
id: uuid(),
|
id: uuid(),
|
||||||
streamingOnly: streamingOnly,
|
|
||||||
user_uid: user_uid,
|
user_uid: user_uid,
|
||||||
type: audioOnly ? 'audio' : 'video'
|
type: audioOnly ? 'audio' : 'video'
|
||||||
};
|
};
|
||||||
@@ -1554,7 +1552,7 @@ app.post('/api/getPlaylists', optionalJwt, async (req, res) => {
|
|||||||
const uuid = req.isAuthenticated() ? req.user.uid : null;
|
const uuid = req.isAuthenticated() ? req.user.uid : null;
|
||||||
const include_categories = req.body.include_categories;
|
const include_categories = req.body.include_categories;
|
||||||
|
|
||||||
const playlists = await db_api.getRecords('playlists', {user_uid: uuid});
|
let playlists = await db_api.getRecords('playlists', {user_uid: uuid});
|
||||||
if (include_categories) {
|
if (include_categories) {
|
||||||
const categories = await categories_api.getCategoriesAsPlaylists(files);
|
const categories = await categories_api.getCategoriesAsPlaylists(files);
|
||||||
if (categories) {
|
if (categories) {
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
export type { BaseChangePermissionsRequest } from './models/BaseChangePermissionsRequest';
|
export type { BaseChangePermissionsRequest } from './models/BaseChangePermissionsRequest';
|
||||||
export type { BaseDownloadRequest } from './models/BaseDownloadRequest';
|
|
||||||
export type { BaseDownloadResponse } from './models/BaseDownloadResponse';
|
|
||||||
export type { body_19 } from './models/body_19';
|
export type { body_19 } from './models/body_19';
|
||||||
export type { body_20 } from './models/body_20';
|
export type { body_20 } from './models/body_20';
|
||||||
export type { ChangeRolePermissionsRequest } from './models/ChangeRolePermissionsRequest';
|
export type { ChangeRolePermissionsRequest } from './models/ChangeRolePermissionsRequest';
|
||||||
@@ -13,8 +11,8 @@ export type { Config } from './models/Config';
|
|||||||
export type { ConfigResponse } from './models/ConfigResponse';
|
export type { ConfigResponse } from './models/ConfigResponse';
|
||||||
export type { CreatePlaylistRequest } from './models/CreatePlaylistRequest';
|
export type { CreatePlaylistRequest } from './models/CreatePlaylistRequest';
|
||||||
export type { CreatePlaylistResponse } from './models/CreatePlaylistResponse';
|
export type { CreatePlaylistResponse } from './models/CreatePlaylistResponse';
|
||||||
|
export type { CropFileSettings } from './models/CropFileSettings';
|
||||||
export type { DatabaseFile } from './models/DatabaseFile';
|
export type { DatabaseFile } from './models/DatabaseFile';
|
||||||
export type { DeleteFileRequest } from './models/DeleteFileRequest';
|
|
||||||
export type { DeleteMp3Mp4Request } from './models/DeleteMp3Mp4Request';
|
export type { DeleteMp3Mp4Request } from './models/DeleteMp3Mp4Request';
|
||||||
export type { DeletePlaylistRequest } from './models/DeletePlaylistRequest';
|
export type { DeletePlaylistRequest } from './models/DeletePlaylistRequest';
|
||||||
export type { DeleteSubscriptionFileRequest } from './models/DeleteSubscriptionFileRequest';
|
export type { DeleteSubscriptionFileRequest } from './models/DeleteSubscriptionFileRequest';
|
||||||
@@ -22,6 +20,8 @@ export type { DeleteUserRequest } from './models/DeleteUserRequest';
|
|||||||
export type { Download } from './models/Download';
|
export type { Download } from './models/Download';
|
||||||
export type { DownloadArchiveRequest } from './models/DownloadArchiveRequest';
|
export type { DownloadArchiveRequest } from './models/DownloadArchiveRequest';
|
||||||
export type { DownloadFileRequest } from './models/DownloadFileRequest';
|
export type { DownloadFileRequest } from './models/DownloadFileRequest';
|
||||||
|
export type { DownloadRequest } from './models/DownloadRequest';
|
||||||
|
export type { DownloadResponse } from './models/DownloadResponse';
|
||||||
export type { DownloadVideosForSubscriptionRequest } from './models/DownloadVideosForSubscriptionRequest';
|
export type { DownloadVideosForSubscriptionRequest } from './models/DownloadVideosForSubscriptionRequest';
|
||||||
export type { File } from './models/File';
|
export type { File } from './models/File';
|
||||||
export { FileType } from './models/FileType';
|
export { FileType } from './models/FileType';
|
||||||
@@ -37,6 +37,8 @@ export type { GetMp3sResponse } from './models/GetMp3sResponse';
|
|||||||
export type { GetMp4sResponse } from './models/GetMp4sResponse';
|
export type { GetMp4sResponse } from './models/GetMp4sResponse';
|
||||||
export type { GetPlaylistRequest } from './models/GetPlaylistRequest';
|
export type { GetPlaylistRequest } from './models/GetPlaylistRequest';
|
||||||
export type { GetPlaylistResponse } from './models/GetPlaylistResponse';
|
export type { GetPlaylistResponse } from './models/GetPlaylistResponse';
|
||||||
|
export type { GetPlaylistsRequest } from './models/GetPlaylistsRequest';
|
||||||
|
export type { GetPlaylistsResponse } from './models/GetPlaylistsResponse';
|
||||||
export type { GetRolesResponse } from './models/GetRolesResponse';
|
export type { GetRolesResponse } from './models/GetRolesResponse';
|
||||||
export type { GetSubscriptionRequest } from './models/GetSubscriptionRequest';
|
export type { GetSubscriptionRequest } from './models/GetSubscriptionRequest';
|
||||||
export type { GetSubscriptionResponse } from './models/GetSubscriptionResponse';
|
export type { GetSubscriptionResponse } from './models/GetSubscriptionResponse';
|
||||||
@@ -44,10 +46,6 @@ export type { GetUsersResponse } from './models/GetUsersResponse';
|
|||||||
export type { inline_response_200_15 } from './models/inline_response_200_15';
|
export type { inline_response_200_15 } from './models/inline_response_200_15';
|
||||||
export type { LoginRequest } from './models/LoginRequest';
|
export type { LoginRequest } from './models/LoginRequest';
|
||||||
export type { LoginResponse } from './models/LoginResponse';
|
export type { LoginResponse } from './models/LoginResponse';
|
||||||
export type { Mp3DownloadRequest } from './models/Mp3DownloadRequest';
|
|
||||||
export type { Mp3DownloadResponse } from './models/Mp3DownloadResponse';
|
|
||||||
export type { Mp4DownloadRequest } from './models/Mp4DownloadRequest';
|
|
||||||
export type { Mp4DownloadResponse } from './models/Mp4DownloadResponse';
|
|
||||||
export type { Playlist } from './models/Playlist';
|
export type { Playlist } from './models/Playlist';
|
||||||
export type { RegisterRequest } from './models/RegisterRequest';
|
export type { RegisterRequest } from './models/RegisterRequest';
|
||||||
export type { RegisterResponse } from './models/RegisterResponse';
|
export type { RegisterResponse } from './models/RegisterResponse';
|
||||||
@@ -60,7 +58,6 @@ export type { SubscriptionRequestData } from './models/SubscriptionRequestData';
|
|||||||
export type { SuccessObject } from './models/SuccessObject';
|
export type { SuccessObject } from './models/SuccessObject';
|
||||||
export type { UnsubscribeRequest } from './models/UnsubscribeRequest';
|
export type { UnsubscribeRequest } from './models/UnsubscribeRequest';
|
||||||
export type { UnsubscribeResponse } from './models/UnsubscribeResponse';
|
export type { UnsubscribeResponse } from './models/UnsubscribeResponse';
|
||||||
export type { UpdatePlaylistFilesRequest } from './models/UpdatePlaylistFilesRequest';
|
|
||||||
export type { UpdatePlaylistRequest } from './models/UpdatePlaylistRequest';
|
export type { UpdatePlaylistRequest } from './models/UpdatePlaylistRequest';
|
||||||
export type { UpdaterStatus } from './models/UpdaterStatus';
|
export type { UpdaterStatus } from './models/UpdaterStatus';
|
||||||
export type { UpdateServerRequest } from './models/UpdateServerRequest';
|
export type { UpdateServerRequest } from './models/UpdateServerRequest';
|
||||||
|
|||||||
@@ -8,4 +8,4 @@ import { YesNo } from './YesNo';
|
|||||||
export interface BaseChangePermissionsRequest {
|
export interface BaseChangePermissionsRequest {
|
||||||
permission: UserPermission;
|
permission: UserPermission;
|
||||||
new_value: YesNo;
|
new_value: YesNo;
|
||||||
}
|
}
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
|
|
||||||
export interface BaseDownloadRequest {
|
|
||||||
url: string;
|
|
||||||
/**
|
|
||||||
* Video format code. Overrides other quality options.
|
|
||||||
*/
|
|
||||||
customQualityConfiguration?: string;
|
|
||||||
/**
|
|
||||||
* Custom command-line arguments for youtubedl. Overrides all other options, except url.
|
|
||||||
*/
|
|
||||||
customArgs?: string;
|
|
||||||
/**
|
|
||||||
* Custom output filename template.
|
|
||||||
*/
|
|
||||||
customOutput?: string;
|
|
||||||
/**
|
|
||||||
* Login with this account ID
|
|
||||||
*/
|
|
||||||
youtubeUsername?: string;
|
|
||||||
/**
|
|
||||||
* Account password
|
|
||||||
*/
|
|
||||||
youtubePassword?: string;
|
|
||||||
ui_uid?: string | null;
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
|
|
||||||
export interface BaseDownloadResponse {
|
|
||||||
uid: string;
|
|
||||||
file_names?: Array<string> | null;
|
|
||||||
}
|
|
||||||
@@ -6,4 +6,4 @@ import { BaseChangePermissionsRequest } from './BaseChangePermissionsRequest';
|
|||||||
|
|
||||||
export interface ChangeRolePermissionsRequest extends BaseChangePermissionsRequest {
|
export interface ChangeRolePermissionsRequest extends BaseChangePermissionsRequest {
|
||||||
role: string;
|
role: string;
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@ import { BaseChangePermissionsRequest } from './BaseChangePermissionsRequest';
|
|||||||
|
|
||||||
export interface ChangeUserPermissionsRequest extends BaseChangePermissionsRequest {
|
export interface ChangeUserPermissionsRequest extends BaseChangePermissionsRequest {
|
||||||
user_uid: string;
|
user_uid: string;
|
||||||
}
|
}
|
||||||
@@ -5,4 +5,4 @@
|
|||||||
|
|
||||||
export interface Config {
|
export interface Config {
|
||||||
YoutubeDLMaterial: any;
|
YoutubeDLMaterial: any;
|
||||||
}
|
}
|
||||||
@@ -7,4 +7,4 @@ import { Config } from './Config';
|
|||||||
export interface ConfigResponse {
|
export interface ConfigResponse {
|
||||||
config_file: Config;
|
config_file: Config;
|
||||||
success: boolean;
|
success: boolean;
|
||||||
}
|
}
|
||||||
@@ -6,8 +6,7 @@ import { FileType } from './FileType';
|
|||||||
|
|
||||||
export interface CreatePlaylistRequest {
|
export interface CreatePlaylistRequest {
|
||||||
playlistName: string;
|
playlistName: string;
|
||||||
fileNames: Array<string>;
|
uids: Array<string>;
|
||||||
type: FileType;
|
type: FileType;
|
||||||
thumbnailURL: string;
|
thumbnailURL: string;
|
||||||
duration: number;
|
}
|
||||||
}
|
|
||||||
@@ -7,4 +7,4 @@ import { Playlist } from './Playlist';
|
|||||||
export interface CreatePlaylistResponse {
|
export interface CreatePlaylistResponse {
|
||||||
new_playlist: Playlist;
|
new_playlist: Playlist;
|
||||||
success: boolean;
|
success: boolean;
|
||||||
}
|
}
|
||||||
9
src/api-types/models/CropFileSettings.ts
Normal file
9
src/api-types/models/CropFileSettings.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
|
||||||
|
export interface CropFileSettings {
|
||||||
|
cropFileStart: number;
|
||||||
|
cropFileEnd: number;
|
||||||
|
}
|
||||||
@@ -19,4 +19,4 @@ export interface DatabaseFile {
|
|||||||
upload_date: string;
|
upload_date: string;
|
||||||
uid: string;
|
uid: string;
|
||||||
sharingEnabled?: boolean;
|
sharingEnabled?: boolean;
|
||||||
}
|
}
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
import { FileType } from './FileType';
|
|
||||||
|
|
||||||
export interface DeleteFileRequest {
|
|
||||||
fileName: string;
|
|
||||||
type: FileType;
|
|
||||||
}
|
|
||||||
@@ -6,4 +6,4 @@
|
|||||||
export interface DeleteMp3Mp4Request {
|
export interface DeleteMp3Mp4Request {
|
||||||
uid: string;
|
uid: string;
|
||||||
blacklistMode?: boolean;
|
blacklistMode?: boolean;
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,6 @@
|
|||||||
import { FileType } from './FileType';
|
import { FileType } from './FileType';
|
||||||
|
|
||||||
export interface DeletePlaylistRequest {
|
export interface DeletePlaylistRequest {
|
||||||
playlistID: string;
|
playlist_id: string;
|
||||||
type: FileType;
|
type: FileType;
|
||||||
}
|
}
|
||||||
@@ -12,4 +12,4 @@ export interface DeleteSubscriptionFileRequest {
|
|||||||
* If true, does not remove id from archive. Only valid if youtube-dl archive is enabled in settings.
|
* If true, does not remove id from archive. Only valid if youtube-dl archive is enabled in settings.
|
||||||
*/
|
*/
|
||||||
deleteForever?: boolean;
|
deleteForever?: boolean;
|
||||||
}
|
}
|
||||||
@@ -5,4 +5,4 @@
|
|||||||
|
|
||||||
export interface DeleteUserRequest {
|
export interface DeleteUserRequest {
|
||||||
uid: string;
|
uid: string;
|
||||||
}
|
}
|
||||||
@@ -5,19 +5,22 @@
|
|||||||
|
|
||||||
export interface Download {
|
export interface Download {
|
||||||
uid: string;
|
uid: string;
|
||||||
ui_uid: string;
|
ui_uid?: string;
|
||||||
downloading: boolean;
|
running: boolean;
|
||||||
complete: boolean;
|
finished: boolean;
|
||||||
|
paused: boolean;
|
||||||
|
finished_step: boolean;
|
||||||
url: string;
|
url: string;
|
||||||
type: string;
|
type: string;
|
||||||
|
title: string;
|
||||||
|
step_index: number;
|
||||||
percent_complete: number;
|
percent_complete: number;
|
||||||
is_playlist: boolean;
|
|
||||||
timestamp_start: number;
|
timestamp_start: number;
|
||||||
timestamp_end?: number;
|
|
||||||
filesize?: number | null;
|
|
||||||
/**
|
/**
|
||||||
* Error text, set if download fails.
|
* Error text, set if download fails.
|
||||||
*/
|
*/
|
||||||
error?: string;
|
error?: string | null;
|
||||||
fileNames?: Array<string>;
|
user_uid?: string;
|
||||||
}
|
sub_id?: string;
|
||||||
|
sub_name?: string;
|
||||||
|
}
|
||||||
@@ -5,6 +5,6 @@
|
|||||||
|
|
||||||
export interface DownloadArchiveRequest {
|
export interface DownloadArchiveRequest {
|
||||||
sub: {
|
sub: {
|
||||||
archive_dir: string,
|
archive_dir: string,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -2,23 +2,13 @@
|
|||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
import { FileType } from './FileType';
|
|
||||||
|
|
||||||
export interface DownloadFileRequest {
|
export interface DownloadFileRequest {
|
||||||
fileNames: ;
|
uid: string;
|
||||||
zip_mode?: boolean;
|
|
||||||
type: FileType;
|
|
||||||
outputName?: string;
|
|
||||||
fullPathProvided?: boolean;
|
|
||||||
uuid?: string;
|
uuid?: string;
|
||||||
uid?: string;
|
sub_id?: string;
|
||||||
id?: string;
|
|
||||||
/**
|
/**
|
||||||
* Only used for subscriptions
|
* Only used for subscriptions
|
||||||
*/
|
*/
|
||||||
subscriptionName?: string;
|
is_playlist?: boolean;
|
||||||
/**
|
}
|
||||||
* Only used for subscriptions
|
|
||||||
*/
|
|
||||||
subPlaylist?: boolean;
|
|
||||||
}
|
|
||||||
44
src/api-types/models/DownloadRequest.ts
Normal file
44
src/api-types/models/DownloadRequest.ts
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import { CropFileSettings } from './CropFileSettings';
|
||||||
|
import { FileType } from './FileType';
|
||||||
|
|
||||||
|
export interface DownloadRequest {
|
||||||
|
url: string;
|
||||||
|
/**
|
||||||
|
* Video format code. Overrides other quality options.
|
||||||
|
*/
|
||||||
|
customQualityConfiguration?: string;
|
||||||
|
/**
|
||||||
|
* Custom command-line arguments for youtube-dl. Overrides all other options, except url.
|
||||||
|
*/
|
||||||
|
customArgs?: string;
|
||||||
|
/**
|
||||||
|
* Additional command-line arguments for youtube-dl. Added to whatever args would normally be used.
|
||||||
|
*/
|
||||||
|
additionalArgs?: string;
|
||||||
|
/**
|
||||||
|
* Custom output filename template.
|
||||||
|
*/
|
||||||
|
customOutput?: string;
|
||||||
|
/**
|
||||||
|
* Login with this account ID
|
||||||
|
*/
|
||||||
|
youtubeUsername?: string;
|
||||||
|
/**
|
||||||
|
* Account password
|
||||||
|
*/
|
||||||
|
youtubePassword?: string;
|
||||||
|
/**
|
||||||
|
* Height of the video, if known
|
||||||
|
*/
|
||||||
|
selectedHeight?: string;
|
||||||
|
/**
|
||||||
|
* Specify ffmpeg/avconv audio quality
|
||||||
|
*/
|
||||||
|
maxBitrate?: string;
|
||||||
|
type?: FileType;
|
||||||
|
cropFileSettings?: CropFileSettings;
|
||||||
|
}
|
||||||
9
src/api-types/models/DownloadResponse.ts
Normal file
9
src/api-types/models/DownloadResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import { Download } from './Download';
|
||||||
|
|
||||||
|
export interface DownloadResponse {
|
||||||
|
download?: Download | null;
|
||||||
|
}
|
||||||
@@ -5,4 +5,4 @@
|
|||||||
|
|
||||||
export interface DownloadVideosForSubscriptionRequest {
|
export interface DownloadVideosForSubscriptionRequest {
|
||||||
subID: string;
|
subID: string;
|
||||||
}
|
}
|
||||||
@@ -5,4 +5,4 @@
|
|||||||
|
|
||||||
export interface File {
|
export interface File {
|
||||||
id?: string;
|
id?: string;
|
||||||
}
|
}
|
||||||
@@ -5,4 +5,4 @@
|
|||||||
|
|
||||||
export interface GenerateNewApiKeyResponse {
|
export interface GenerateNewApiKeyResponse {
|
||||||
new_api_key: string;
|
new_api_key: string;
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,8 @@
|
|||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
import { Dictionary } from './Dictionary';
|
|
||||||
import { Download } from './Download';
|
import { Download } from './Download';
|
||||||
|
|
||||||
export interface GetAllDownloadsResponse {
|
export interface GetAllDownloadsResponse {
|
||||||
/**
|
downloads?: Array<Download>;
|
||||||
* Map of Session ID to inner map
|
}
|
||||||
*/
|
|
||||||
downloads?: Dictionary<Dictionary<Download>>;
|
|
||||||
}
|
|
||||||
@@ -11,4 +11,4 @@ export interface GetAllFilesResponse {
|
|||||||
* All video playlists
|
* All video playlists
|
||||||
*/
|
*/
|
||||||
playlists: Array<Playlist>;
|
playlists: Array<Playlist>;
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@ import { Subscription } from './Subscription';
|
|||||||
|
|
||||||
export interface GetAllSubscriptionsResponse {
|
export interface GetAllSubscriptionsResponse {
|
||||||
subscriptions: Array<Subscription>;
|
subscriptions: Array<Subscription>;
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,5 @@
|
|||||||
|
|
||||||
|
|
||||||
export interface GetDownloadRequest {
|
export interface GetDownloadRequest {
|
||||||
session_id: string;
|
download_uid: string;
|
||||||
download_id: string;
|
}
|
||||||
}
|
|
||||||
@@ -6,4 +6,4 @@ import { Download } from './Download';
|
|||||||
|
|
||||||
export interface GetDownloadResponse {
|
export interface GetDownloadResponse {
|
||||||
download?: Download | null;
|
download?: Download | null;
|
||||||
}
|
}
|
||||||
@@ -14,4 +14,4 @@ export interface GetFileRequest {
|
|||||||
* User UID
|
* User UID
|
||||||
*/
|
*/
|
||||||
uuid?: string;
|
uuid?: string;
|
||||||
}
|
}
|
||||||
@@ -7,4 +7,4 @@ import { DatabaseFile } from './DatabaseFile';
|
|||||||
export interface GetFileResponse {
|
export interface GetFileResponse {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
file?: DatabaseFile;
|
file?: DatabaseFile;
|
||||||
}
|
}
|
||||||
@@ -11,4 +11,4 @@ export interface GetMp3sResponse {
|
|||||||
* All audio playlists
|
* All audio playlists
|
||||||
*/
|
*/
|
||||||
playlists: Array<Playlist>;
|
playlists: Array<Playlist>;
|
||||||
}
|
}
|
||||||
@@ -11,4 +11,4 @@ export interface GetMp4sResponse {
|
|||||||
* All video playlists
|
* All video playlists
|
||||||
*/
|
*/
|
||||||
playlists: Array<Playlist>;
|
playlists: Array<Playlist>;
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,8 @@
|
|||||||
import { FileType } from './FileType';
|
import { FileType } from './FileType';
|
||||||
|
|
||||||
export interface GetPlaylistRequest {
|
export interface GetPlaylistRequest {
|
||||||
playlistID: string;
|
playlist_id: string;
|
||||||
type?: FileType;
|
type?: FileType;
|
||||||
uuid?: string;
|
uuid?: string;
|
||||||
}
|
include_file_metadata?: boolean;
|
||||||
|
}
|
||||||
@@ -9,4 +9,4 @@ export interface GetPlaylistResponse {
|
|||||||
playlist: Playlist;
|
playlist: Playlist;
|
||||||
type: FileType;
|
type: FileType;
|
||||||
success: boolean;
|
success: boolean;
|
||||||
}
|
}
|
||||||
8
src/api-types/models/GetPlaylistsRequest.ts
Normal file
8
src/api-types/models/GetPlaylistsRequest.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
|
||||||
|
export interface GetPlaylistsRequest {
|
||||||
|
include_categories?: boolean;
|
||||||
|
}
|
||||||
9
src/api-types/models/GetPlaylistsResponse.ts
Normal file
9
src/api-types/models/GetPlaylistsResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import { Playlist } from './Playlist';
|
||||||
|
|
||||||
|
export interface GetPlaylistsResponse {
|
||||||
|
playlists: Array<Playlist>;
|
||||||
|
}
|
||||||
@@ -6,11 +6,11 @@ import { UserPermission } from './UserPermission';
|
|||||||
|
|
||||||
export interface GetRolesResponse {
|
export interface GetRolesResponse {
|
||||||
roles: {
|
roles: {
|
||||||
admin?: {
|
admin?: {
|
||||||
permissions?: Array<UserPermission>,
|
permissions?: Array<UserPermission>,
|
||||||
},
|
},
|
||||||
user?: {
|
user?: {
|
||||||
permissions?: Array<UserPermission>,
|
permissions?: Array<UserPermission>,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -8,4 +8,8 @@ export interface GetSubscriptionRequest {
|
|||||||
* Subscription ID
|
* Subscription ID
|
||||||
*/
|
*/
|
||||||
id: string;
|
id: string;
|
||||||
}
|
/**
|
||||||
|
* Subscription name
|
||||||
|
*/
|
||||||
|
name?: string;
|
||||||
|
}
|
||||||
@@ -7,4 +7,4 @@ import { Subscription } from './Subscription';
|
|||||||
export interface GetSubscriptionResponse {
|
export interface GetSubscriptionResponse {
|
||||||
subscription: Subscription;
|
subscription: Subscription;
|
||||||
files: Array<any>;
|
files: Array<any>;
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@ import { User } from './User';
|
|||||||
|
|
||||||
export interface GetUsersResponse {
|
export interface GetUsersResponse {
|
||||||
users: Array<User>;
|
users: Array<User>;
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@
|
|||||||
export interface LoginRequest {
|
export interface LoginRequest {
|
||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
}
|
}
|
||||||
@@ -10,4 +10,4 @@ export interface LoginResponse {
|
|||||||
token?: string;
|
token?: string;
|
||||||
permissions?: Array<UserPermission>;
|
permissions?: Array<UserPermission>;
|
||||||
available_permissions?: Array<UserPermission>;
|
available_permissions?: Array<UserPermission>;
|
||||||
}
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
import { BaseDownloadRequest } from './BaseDownloadRequest';
|
|
||||||
|
|
||||||
export interface Mp3DownloadRequest extends BaseDownloadRequest {
|
|
||||||
/**
|
|
||||||
* Specify ffmpeg/avconv audio quality
|
|
||||||
*/
|
|
||||||
maxBitrate?: string;
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
import { BaseDownloadResponse } from './BaseDownloadResponse';
|
|
||||||
|
|
||||||
export interface Mp3DownloadResponse extends BaseDownloadResponse {
|
|
||||||
audiopathEncoded: string;
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
import { BaseDownloadRequest } from './BaseDownloadRequest';
|
|
||||||
|
|
||||||
export interface Mp4DownloadRequest extends BaseDownloadRequest {
|
|
||||||
/**
|
|
||||||
* Height of the video, if known
|
|
||||||
*/
|
|
||||||
selectedHeight?: string;
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
import { BaseDownloadResponse } from './BaseDownloadResponse';
|
|
||||||
|
|
||||||
export interface Mp4DownloadResponse extends BaseDownloadResponse {
|
|
||||||
videopathEncoded: string;
|
|
||||||
}
|
|
||||||
@@ -6,10 +6,11 @@ import { FileType } from './FileType';
|
|||||||
|
|
||||||
export interface Playlist {
|
export interface Playlist {
|
||||||
name: string;
|
name: string;
|
||||||
fileNames: Array<string>;
|
uids: Array<string>;
|
||||||
id: string;
|
id: string;
|
||||||
thumbnailURL: string;
|
thumbnailURL: string;
|
||||||
type: FileType;
|
type: FileType;
|
||||||
registered: number;
|
registered: number;
|
||||||
duration: number;
|
duration: number;
|
||||||
}
|
user_uid?: string;
|
||||||
|
}
|
||||||
@@ -7,4 +7,4 @@ export interface RegisterRequest {
|
|||||||
userid: string;
|
userid: string;
|
||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@ import { User } from './User';
|
|||||||
|
|
||||||
export interface RegisterResponse {
|
export interface RegisterResponse {
|
||||||
user?: User;
|
user?: User;
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@ import { Config } from './Config';
|
|||||||
|
|
||||||
export interface SetConfigRequest {
|
export interface SetConfigRequest {
|
||||||
new_config_file: Config;
|
new_config_file: Config;
|
||||||
}
|
}
|
||||||
@@ -2,10 +2,8 @@
|
|||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
import { FileType } from './FileType';
|
|
||||||
|
|
||||||
export interface SharingToggle {
|
export interface SharingToggle {
|
||||||
uid: string;
|
uid: string;
|
||||||
type: FileType;
|
|
||||||
is_playlist?: boolean;
|
is_playlist?: boolean;
|
||||||
}
|
}
|
||||||
@@ -7,8 +7,8 @@ export interface SubscribeRequest {
|
|||||||
name: string;
|
name: string;
|
||||||
url: string;
|
url: string;
|
||||||
timerange?: string;
|
timerange?: string;
|
||||||
streamingOnly: boolean;
|
|
||||||
audioOnly?: boolean;
|
audioOnly?: boolean;
|
||||||
customArgs?: string;
|
customArgs?: string;
|
||||||
customFileOutput?: string;
|
customFileOutput?: string;
|
||||||
}
|
maxQuality?: string;
|
||||||
|
}
|
||||||
@@ -7,4 +7,4 @@ import { Subscription } from './Subscription';
|
|||||||
export interface SubscribeResponse {
|
export interface SubscribeResponse {
|
||||||
new_sub: Subscription;
|
new_sub: Subscription;
|
||||||
error?: string;
|
error?: string;
|
||||||
}
|
}
|
||||||
@@ -17,4 +17,4 @@ export interface Subscription {
|
|||||||
custom_args?: string;
|
custom_args?: string;
|
||||||
custom_output?: string;
|
custom_output?: string;
|
||||||
videos: Array<any>;
|
videos: Array<any>;
|
||||||
}
|
}
|
||||||
@@ -10,4 +10,4 @@ export interface SubscriptionRequestData {
|
|||||||
type?: FileType;
|
type?: FileType;
|
||||||
isPlaylist?: boolean;
|
isPlaylist?: boolean;
|
||||||
archive?: string;
|
archive?: string;
|
||||||
}
|
}
|
||||||
@@ -5,4 +5,4 @@
|
|||||||
|
|
||||||
export interface SuccessObject {
|
export interface SuccessObject {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
}
|
}
|
||||||
@@ -10,4 +10,4 @@ export interface UnsubscribeRequest {
|
|||||||
* Defaults to false
|
* Defaults to false
|
||||||
*/
|
*/
|
||||||
deleteMode?: boolean;
|
deleteMode?: boolean;
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@
|
|||||||
export interface UnsubscribeResponse {
|
export interface UnsubscribeResponse {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
error?: string;
|
error?: string;
|
||||||
}
|
}
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
import { FileType } from './FileType';
|
|
||||||
|
|
||||||
export interface UpdatePlaylistFilesRequest {
|
|
||||||
playlistID: string;
|
|
||||||
fileNames: Array<string>;
|
|
||||||
type: FileType;
|
|
||||||
}
|
|
||||||
@@ -6,4 +6,4 @@ import { Playlist } from './Playlist';
|
|||||||
|
|
||||||
export interface UpdatePlaylistRequest {
|
export interface UpdatePlaylistRequest {
|
||||||
playlist: Playlist;
|
playlist: Playlist;
|
||||||
}
|
}
|
||||||
@@ -5,4 +5,4 @@
|
|||||||
|
|
||||||
export interface UpdateServerRequest {
|
export interface UpdateServerRequest {
|
||||||
tag: string;
|
tag: string;
|
||||||
}
|
}
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
export interface UpdateUserRequest {
|
export interface UpdateUserRequest {
|
||||||
change_object: {
|
change_object: {
|
||||||
uid: string,
|
uid: string,
|
||||||
name?: string,
|
name?: string,
|
||||||
role?: string,
|
role?: string,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -7,4 +7,4 @@ export interface UpdaterStatus {
|
|||||||
updating: boolean;
|
updating: boolean;
|
||||||
details: string;
|
details: string;
|
||||||
error?: boolean;
|
error?: boolean;
|
||||||
}
|
}
|
||||||
@@ -10,16 +10,16 @@ export interface User {
|
|||||||
name?: string;
|
name?: string;
|
||||||
passhash?: string;
|
passhash?: string;
|
||||||
files?: {
|
files?: {
|
||||||
audio?: Array<File>,
|
audio?: Array<File>,
|
||||||
video?: Array<File>,
|
video?: Array<File>,
|
||||||
};
|
};
|
||||||
playlists?: {
|
playlists?: {
|
||||||
audio?: Array<File>,
|
audio?: Array<File>,
|
||||||
video?: Array<File>,
|
video?: Array<File>,
|
||||||
};
|
};
|
||||||
subscriptions?: Array<Subscription>;
|
subscriptions?: Array<Subscription>;
|
||||||
created?: number;
|
created?: number;
|
||||||
role?: string;
|
role?: string;
|
||||||
permissions?: Array<UserPermission>;
|
permissions?: Array<UserPermission>;
|
||||||
permission_overrides?: Array<UserPermission>;
|
permission_overrides?: Array<UserPermission>;
|
||||||
}
|
}
|
||||||
@@ -5,4 +5,4 @@
|
|||||||
|
|
||||||
export interface body_19 {
|
export interface body_19 {
|
||||||
input_pin: string;
|
input_pin: string;
|
||||||
}
|
}
|
||||||
@@ -5,4 +5,4 @@
|
|||||||
|
|
||||||
export interface body_20 {
|
export interface body_20 {
|
||||||
unhashed_pin: string;
|
unhashed_pin: string;
|
||||||
}
|
}
|
||||||
@@ -5,4 +5,4 @@
|
|||||||
|
|
||||||
export interface inline_response_200_15 {
|
export interface inline_response_200_15 {
|
||||||
is_set: boolean;
|
is_set: boolean;
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,6 @@ import { InputDialogComponent } from './input-dialog/input-dialog.component';
|
|||||||
import { LazyLoadImageModule, IsVisibleProps } from 'ng-lazyload-image';
|
import { LazyLoadImageModule, IsVisibleProps } from 'ng-lazyload-image';
|
||||||
import { audioFilesMouseHovering, videoFilesMouseHovering, audioFilesOpened, videoFilesOpened } from './main/main.component';
|
import { audioFilesMouseHovering, videoFilesMouseHovering, audioFilesOpened, videoFilesOpened } from './main/main.component';
|
||||||
import { CreatePlaylistComponent } from './create-playlist/create-playlist.component';
|
import { CreatePlaylistComponent } from './create-playlist/create-playlist.component';
|
||||||
import { DownloadItemComponent } from './download-item/download-item.component';
|
|
||||||
import { SubscriptionsComponent } from './subscriptions/subscriptions.component';
|
import { SubscriptionsComponent } from './subscriptions/subscriptions.component';
|
||||||
import { SubscribeDialogComponent } from './dialogs/subscribe-dialog/subscribe-dialog.component';
|
import { SubscribeDialogComponent } from './dialogs/subscribe-dialog/subscribe-dialog.component';
|
||||||
import { SubscriptionComponent } from './subscription//subscription/subscription.component';
|
import { SubscriptionComponent } from './subscription//subscription/subscription.component';
|
||||||
@@ -102,7 +101,6 @@ export function isVisible({ event, element, scrollContainer, offset }: IsVisible
|
|||||||
PlayerComponent,
|
PlayerComponent,
|
||||||
InputDialogComponent,
|
InputDialogComponent,
|
||||||
CreatePlaylistComponent,
|
CreatePlaylistComponent,
|
||||||
DownloadItemComponent,
|
|
||||||
SubscriptionsComponent,
|
SubscriptionsComponent,
|
||||||
SubscribeDialogComponent,
|
SubscribeDialogComponent,
|
||||||
SubscriptionComponent,
|
SubscriptionComponent,
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export class SubscribeDialogComponent implements OnInit {
|
|||||||
if (!this.download_all) {
|
if (!this.download_all) {
|
||||||
timerange = 'now-' + this.timerange_amount.toString() + this.timerange_unit;
|
timerange = 'now-' + this.timerange_amount.toString() + this.timerange_unit;
|
||||||
}
|
}
|
||||||
this.postsService.createSubscription(this.url, this.name, timerange, this.streamingOnlyMode, this.maxQuality,
|
this.postsService.createSubscription(this.url, this.name, timerange, this.maxQuality,
|
||||||
this.audioOnlyMode, this.customArgs, this.customFileOutput).subscribe(res => {
|
this.audioOnlyMode, this.customArgs, this.customFileOutput).subscribe(res => {
|
||||||
this.subscribing = false;
|
this.subscribing = false;
|
||||||
if (res['new_sub']) {
|
if (res['new_sub']) {
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
<div>
|
|
||||||
<mat-grid-list [rowHeight]="50" [cols]="24">
|
|
||||||
<mat-grid-tile [colspan]="7">
|
|
||||||
<div style="display: inline-block; text-align: center; width: 100%;"><span class="shorten"><ng-container i18n="Download ID">ID:</ng-container> {{url_id ? url_id : download.uid}}</span></div>
|
|
||||||
</mat-grid-tile>
|
|
||||||
<mat-grid-tile [colspan]="13">
|
|
||||||
<mat-progress-bar [value]="(download.complete || download.error) ? 100 : download.percent_complete" [mode]="(!download.complete && download.percent_complete === 0 && !download.error) ? 'indeterminate' : 'determinate'"></mat-progress-bar>
|
|
||||||
<mat-icon *ngIf="download.complete" style="margin-left: 25px; cursor: default" matTooltip="The download was successful" i18n-matTooltip="download successful tooltip">done</mat-icon>
|
|
||||||
<mat-icon *ngIf="download.error" style="margin-left: 25px; cursor: default" matTooltip="An error has occurred" i18n-matTooltip="download error tooltip">error</mat-icon>
|
|
||||||
</mat-grid-tile>
|
|
||||||
<mat-grid-tile [colspan]="4">
|
|
||||||
<button style="margin-bottom: 2px;" (click)="cancelTheDownload()" mat-icon-button color="warn"><mat-icon fontSet="material-icons-outlined">cancel</mat-icon></button>
|
|
||||||
</mat-grid-tile>
|
|
||||||
</mat-grid-list>
|
|
||||||
<mat-expansion-panel *ngIf="download.timestamp_start" class="ignore-margin">
|
|
||||||
<mat-expansion-panel-header>
|
|
||||||
<div>
|
|
||||||
<ng-container i18n="Details">Details</ng-container>
|
|
||||||
</div>
|
|
||||||
<div style="width: 100%">
|
|
||||||
<div style="float: right">
|
|
||||||
<mat-panel-description>{{download.timestamp_start | date:'medium'}}</mat-panel-description>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</mat-expansion-panel-header>
|
|
||||||
<div *ngIf="download.error">
|
|
||||||
<strong><ng-container i18n="Error label">An error has occurred:</ng-container></strong>
|
|
||||||
<br/>
|
|
||||||
{{download.error}}
|
|
||||||
</div>
|
|
||||||
<div *ngIf="download.timestamp_start">
|
|
||||||
<strong><ng-container i18n="Download start label">Download start:</ng-container></strong> {{download.timestamp_start | date:'medium'}}
|
|
||||||
</div>
|
|
||||||
<div *ngIf="download.timestamp_end">
|
|
||||||
<strong><ng-container i18n="Download end label">Download end:</ng-container></strong> {{download.timestamp_end | date:'medium'}}
|
|
||||||
</div>
|
|
||||||
<div *ngIf="download.fileNames">
|
|
||||||
<strong><ng-container i18n="File path(s) label">File path(s):</ng-container></strong> {{download.fileNames.join(', ')}}
|
|
||||||
</div>
|
|
||||||
</mat-expansion-panel>
|
|
||||||
</div>
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
.shorten {
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-expansion-panel:not([class*='mat-elevation-z']) {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ignore-margin {
|
|
||||||
margin-left: -15px;
|
|
||||||
margin-right: -15px;
|
|
||||||
margin-bottom: -15px;
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { DownloadItemComponent } from './download-item.component';
|
|
||||||
|
|
||||||
describe('DownloadItemComponent', () => {
|
|
||||||
let component: DownloadItemComponent;
|
|
||||||
let fixture: ComponentFixture<DownloadItemComponent>;
|
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ DownloadItemComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(DownloadItemComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
|
|
||||||
import { Download } from 'app/main/main.component';
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-download-item',
|
|
||||||
templateUrl: './download-item.component.html',
|
|
||||||
styleUrls: ['./download-item.component.scss']
|
|
||||||
})
|
|
||||||
export class DownloadItemComponent implements OnInit {
|
|
||||||
|
|
||||||
@Input() download: Download = {
|
|
||||||
uid: null,
|
|
||||||
type: 'audio',
|
|
||||||
percent_complete: 0,
|
|
||||||
complete: false,
|
|
||||||
url: 'http://youtube.com/watch?v=17848rufj',
|
|
||||||
downloading: true,
|
|
||||||
timestamp_start: null,
|
|
||||||
timestamp_end: null,
|
|
||||||
is_playlist: false,
|
|
||||||
error: false
|
|
||||||
};
|
|
||||||
@Output() cancelDownload = new EventEmitter<Download>();
|
|
||||||
|
|
||||||
@Input() queueNumber = null;
|
|
||||||
|
|
||||||
url_id = null;
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
if (this.download && this.download.url && this.download.url.includes('youtu')) {
|
|
||||||
const string_id = (this.download.is_playlist ? '?list=' : '?v=')
|
|
||||||
const index_offset = (this.download.is_playlist ? 6 : 3);
|
|
||||||
const end_index = this.download.url.indexOf(string_id) + index_offset;
|
|
||||||
this.url_id = this.download.url.substring(end_index, this.download.url.length);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cancelTheDownload() {
|
|
||||||
this.cancelDownload.emit(this.download);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -10,26 +10,13 @@ import { Router, ActivatedRoute } from '@angular/router';
|
|||||||
import { Platform } from '@angular/cdk/platform';
|
import { Platform } from '@angular/cdk/platform';
|
||||||
import { ArgModifierDialogComponent } from 'app/dialogs/arg-modifier-dialog/arg-modifier-dialog.component';
|
import { ArgModifierDialogComponent } from 'app/dialogs/arg-modifier-dialog/arg-modifier-dialog.component';
|
||||||
import { RecentVideosComponent } from 'app/components/recent-videos/recent-videos.component';
|
import { RecentVideosComponent } from 'app/components/recent-videos/recent-videos.component';
|
||||||
|
import { Download, FileType } from 'api-types';
|
||||||
|
|
||||||
export let audioFilesMouseHovering = false;
|
export let audioFilesMouseHovering = false;
|
||||||
export let videoFilesMouseHovering = false;
|
export let videoFilesMouseHovering = false;
|
||||||
export let audioFilesOpened = false;
|
export let audioFilesOpened = false;
|
||||||
export let videoFilesOpened = false;
|
export let videoFilesOpened = false;
|
||||||
|
|
||||||
export interface Download {
|
|
||||||
uid: string;
|
|
||||||
type: string;
|
|
||||||
url: string;
|
|
||||||
percent_complete: number;
|
|
||||||
downloading: boolean;
|
|
||||||
is_playlist: boolean;
|
|
||||||
error?: boolean | string;
|
|
||||||
fileNames?: string[];
|
|
||||||
complete?: boolean;
|
|
||||||
timestamp_start?: number;
|
|
||||||
timestamp_end?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
templateUrl: './main.component.html',
|
templateUrl: './main.component.html',
|
||||||
@@ -198,16 +185,6 @@ export class MainComponent implements OnInit {
|
|||||||
last_valid_url = '';
|
last_valid_url = '';
|
||||||
last_url_check = 0;
|
last_url_check = 0;
|
||||||
|
|
||||||
test_download: Download = {
|
|
||||||
uid: null,
|
|
||||||
type: 'audio',
|
|
||||||
percent_complete: 0,
|
|
||||||
url: 'http://youtube.com/watch?v=17848rufj',
|
|
||||||
downloading: true,
|
|
||||||
is_playlist: false,
|
|
||||||
error: false
|
|
||||||
};
|
|
||||||
|
|
||||||
argsChangedSubject: Subject<boolean> = new Subject<boolean>();
|
argsChangedSubject: Subject<boolean> = new Subject<boolean>();
|
||||||
simulatedOutput = '';
|
simulatedOutput = '';
|
||||||
|
|
||||||
@@ -411,7 +388,7 @@ export class MainComponent implements OnInit {
|
|||||||
const urls = this.getURLArray(this.url);
|
const urls = this.getURLArray(this.url);
|
||||||
for (let i = 0; i < urls.length; i++) {
|
for (let i = 0; i < urls.length; i++) {
|
||||||
const url = urls[i];
|
const url = urls[i];
|
||||||
this.postsService.downloadFile(url, type, (selected_quality === '' ? null : selected_quality),
|
this.postsService.downloadFile(url, type as FileType, (selected_quality === '' ? null : selected_quality),
|
||||||
customQualityConfiguration, customArgs, additionalArgs, customOutput, youtubeUsername, youtubePassword, cropFileSettings).subscribe(res => {
|
customQualityConfiguration, customArgs, additionalArgs, customOutput, youtubeUsername, youtubePassword, cropFileSettings).subscribe(res => {
|
||||||
this.current_download = res['download'];
|
this.current_download = res['download'];
|
||||||
this.downloads.push(res['download']);
|
this.downloads.push(res['download']);
|
||||||
@@ -439,7 +416,6 @@ export class MainComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.downloadingfile = false;
|
this.downloadingfile = false;
|
||||||
this.current_download.downloading = false;
|
|
||||||
this.current_download = null;
|
this.current_download = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ export class PlayerComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
// regular video/audio file (not playlist)
|
// regular video/audio file (not playlist)
|
||||||
this.uids = [this.db_file['uid']];
|
this.uids = [this.db_file['uid']];
|
||||||
this.type = this.db_file['isAudio'] ? 'audio' : 'video' as FileType;
|
this.type = this.db_file['isAudio'] ? 'audio' as FileType : 'video' as FileType;
|
||||||
this.parseFileNames();
|
this.parseFileNames();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import {
|
|||||||
ConfigResponse,
|
ConfigResponse,
|
||||||
CreatePlaylistRequest,
|
CreatePlaylistRequest,
|
||||||
CreatePlaylistResponse,
|
CreatePlaylistResponse,
|
||||||
|
CropFileSettings,
|
||||||
DeleteMp3Mp4Request,
|
DeleteMp3Mp4Request,
|
||||||
DeletePlaylistRequest,
|
DeletePlaylistRequest,
|
||||||
DeleteSubscriptionFileRequest,
|
DeleteSubscriptionFileRequest,
|
||||||
@@ -41,10 +42,8 @@ import {
|
|||||||
GetUsersResponse,
|
GetUsersResponse,
|
||||||
LoginRequest,
|
LoginRequest,
|
||||||
LoginResponse,
|
LoginResponse,
|
||||||
Mp3DownloadRequest,
|
DownloadRequest,
|
||||||
Mp3DownloadResponse,
|
DownloadResponse,
|
||||||
Mp4DownloadRequest,
|
|
||||||
Mp4DownloadResponse,
|
|
||||||
Playlist,
|
Playlist,
|
||||||
RegisterRequest,
|
RegisterRequest,
|
||||||
RegisterResponse,
|
RegisterResponse,
|
||||||
@@ -57,7 +56,6 @@ import {
|
|||||||
UpdaterStatus,
|
UpdaterStatus,
|
||||||
UnsubscribeRequest,
|
UnsubscribeRequest,
|
||||||
UnsubscribeResponse,
|
UnsubscribeResponse,
|
||||||
UpdatePlaylistFilesRequest,
|
|
||||||
UpdatePlaylistRequest,
|
UpdatePlaylistRequest,
|
||||||
UpdateServerRequest,
|
UpdateServerRequest,
|
||||||
UpdateUserRequest,
|
UpdateUserRequest,
|
||||||
@@ -231,7 +229,7 @@ export class PostsService implements CanActivate {
|
|||||||
|
|
||||||
// tslint:disable-next-line: max-line-length
|
// tslint:disable-next-line: max-line-length
|
||||||
// tslint:disable-next-line: max-line-length
|
// tslint:disable-next-line: max-line-length
|
||||||
downloadFile(url: string, type: string, selectedQuality: string, customQualityConfiguration: string, customArgs: string = null, additionalArgs: string = null, customOutput: string = null, youtubeUsername: string = null, youtubePassword: string = null, cropFileSettings: CropFileSettings = null) {
|
downloadFile(url: string, type: FileType, selectedQuality: string, customQualityConfiguration: string, customArgs: string = null, additionalArgs: string = null, customOutput: string = null, youtubeUsername: string = null, youtubePassword: string = null, cropFileSettings: CropFileSettings = null) {
|
||||||
const body: DownloadRequest = {url: url,
|
const body: DownloadRequest = {url: url,
|
||||||
selectedHeight: selectedQuality,
|
selectedHeight: selectedQuality,
|
||||||
customQualityConfiguration: customQualityConfiguration,
|
customQualityConfiguration: customQualityConfiguration,
|
||||||
@@ -299,7 +297,7 @@ export class PostsService implements CanActivate {
|
|||||||
return this.http.post<SuccessObject>(this.path + 'setConfig', body, this.httpOptions);
|
return this.http.post<SuccessObject>(this.path + 'setConfig', body, this.httpOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteFile(uid: string, isAudio: boolean, blacklistMode = false) {
|
deleteFile(uid: string, blacklistMode = false) {
|
||||||
const body: DeleteMp3Mp4Request = {uid: uid, blacklistMode: blacklistMode}
|
const body: DeleteMp3Mp4Request = {uid: uid, blacklistMode: blacklistMode}
|
||||||
return this.http.post(this.path + 'deleteFile', body, this.httpOptions);
|
return this.http.post(this.path + 'deleteFile', body, this.httpOptions);
|
||||||
}
|
}
|
||||||
@@ -392,12 +390,12 @@ export class PostsService implements CanActivate {
|
|||||||
return this.http.post<GenerateNewApiKeyResponse>(this.path + 'generateNewAPIKey', {}, this.httpOptions);
|
return this.http.post<GenerateNewApiKeyResponse>(this.path + 'generateNewAPIKey', {}, this.httpOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
enableSharing(uid: string, type: FileType, is_playlist: boolean) {
|
enableSharing(uid: string, is_playlist: boolean) {
|
||||||
const body: SharingToggle = {uid: uid, is_playlist: is_playlist};
|
const body: SharingToggle = {uid: uid, is_playlist: is_playlist};
|
||||||
return this.http.post<SuccessObject>(this.path + 'enableSharing', body, this.httpOptions);
|
return this.http.post<SuccessObject>(this.path + 'enableSharing', body, this.httpOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
disableSharing(uid: string, type: FileType, is_playlist: boolean) {
|
disableSharing(uid: string, is_playlist: boolean) {
|
||||||
const body: SharingToggle = {uid: uid, is_playlist: is_playlist};
|
const body: SharingToggle = {uid: uid, is_playlist: is_playlist};
|
||||||
return this.http.post<SuccessObject>(this.path + 'disableSharing', body, this.httpOptions);
|
return this.http.post<SuccessObject>(this.path + 'disableSharing', body, this.httpOptions);
|
||||||
}
|
}
|
||||||
@@ -434,10 +432,9 @@ export class PostsService implements CanActivate {
|
|||||||
return this.http.post<SuccessObject>(this.path + 'deletePlaylist', body, this.httpOptions);
|
return this.http.post<SuccessObject>(this.path + 'deletePlaylist', body, this.httpOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
createSubscription(url, name, timerange = null, streamingOnly = false, maxQuality = 'best', audioOnly = false, customArgs: string = null, customFileOutput: string = null) {
|
createSubscription(url, name, timerange = null, maxQuality = 'best', audioOnly = false, customArgs: string = null, customFileOutput: string = null) {
|
||||||
const body: SubscribeRequest = {url: url, name: name, timerange: timerange, maxQuality: maxQuality,
|
const body: SubscribeRequest = {url: url, name: name, timerange: timerange, maxQuality: maxQuality,
|
||||||
streamingOnly: streamingOnly, audioOnly: audioOnly, customArgs: customArgs,
|
audioOnly: audioOnly, customArgs: customArgs, customFileOutput: customFileOutput};
|
||||||
customFileOutput: customFileOutput};
|
|
||||||
return this.http.post<SubscribeResponse>(this.path + 'subscribe', body, this.httpOptions);
|
return this.http.post<SubscribeResponse>(this.path + 'subscribe', body, this.httpOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user