Compare commits

..

25 Commits

Author SHA1 Message Date
Tzahi12345
4b55c39f39 permissions code simplified 2023-05-11 23:14:40 -04:00
Tzahi12345
3ca296f195 Fixed compilation issue 2023-05-11 23:14:25 -04:00
Tzahi12345
d4fa640f0f Added tasks_manager to possible user/role permission in openapi 2023-05-11 02:47:06 -04:00
Tzahi12345
427eecf214 Fixed issue where after resetting the DB, admin would have to be registered twice 2023-05-11 02:44:05 -04:00
Tzahi12345
4f54e408a5 Removed erroneous error after registering admin 2023-05-11 02:43:37 -04:00
Glassed Silver
78b29a76b8 Merge pull request #864 from nardis556/master
Update entrypoint.sh
2023-05-11 03:19:50 +02:00
Glassed Silver
0342d18f76 Merge pull request #906 from weblate/weblate-youtubedl-material-ytdl-material
Translations update from Hosted Weblate
2023-05-11 03:17:40 +02:00
Glassed Silver
70754c580c Merge pull request #908 from Tzahi12345/ffmpeg-force-v5
Force ffmpeg 5.1.1
2023-05-11 03:16:08 +02:00
Tzahi12345
e58b0b8638 Force ffmpeg 5.1.1 2023-05-10 19:04:48 -04:00
YMisterXY
df8f8070ca Translated using Weblate (Polish)
Currently translated at 80.5% (385 of 478 strings)

Translation: YoutubeDL-Material/ytdl-material
Translate-URL: https://hosted.weblate.org/projects/youtubedl-material/ytdl-material/pl/
2023-05-10 13:49:19 +02:00
gallegonovato
0b8ca31594 Translated using Weblate (Spanish)
Currently translated at 100.0% (478 of 478 strings)

Translation: YoutubeDL-Material/ytdl-material
Translate-URL: https://hosted.weblate.org/projects/youtubedl-material/ytdl-material/es/
2023-05-10 13:49:19 +02:00
Tzahi12345
658a76dc1c Added missing admin tasks_manager role 2023-05-08 19:23:07 -04:00
Glassed Silver
f363ec5db6 Merge pull request #901 from weblate/weblate-youtubedl-material-ytdl-material
Translations update from Hosted Weblate
2023-05-08 22:12:01 +02:00
gallegonovato
f36d675abf Translated using Weblate (Spanish)
Currently translated at 100.0% (480 of 480 strings)

Translation: YoutubeDL-Material/ytdl-material
Translate-URL: https://hosted.weblate.org/projects/youtubedl-material/ytdl-material/es/
2023-05-08 17:52:23 +02:00
Tzahi12345
be74377a08 Merge pull request #899 from Tzahi12345/remove-armv7
Remove armv7 support in Docker
2023-05-07 02:13:55 -04:00
Isaac Abadi
808c7e2112 Temporarily remove armv7 support
Revert "Added python3.8-dev/build-essential to dockerfile"

This reverts commit d90434c240.

Revert "Adds token to GH actions for GetTwitchDownloader"

This reverts commit a4ca1abb7c.
2023-05-07 01:23:58 -04:00
Isaac Abadi
d6f39d37b5 Added PR multiarch
Added python3.8-dev/build-essential to dockerfile

Adds token to GH actions for GetTwitchDownloader
2023-05-07 01:23:44 -04:00
Tzahi12345
e573f34cea Merge pull request #893 from Tzahi12345/readme-update
README update
2023-05-05 00:05:03 -04:00
Tzahi12345
52e32d4f0f Changed tcd to Twitch Downloader 2023-05-04 23:44:12 -04:00
Tzahi12345
adb5f2256e Translations source file update 2023-05-04 22:33:48 -04:00
Tzahi12345
59bf6ff86d Merge pull request #888 from Tzahi12345/dependency-updates
Dependency updates
2023-05-04 22:28:50 -04:00
Tzahi12345
68fbde8907 Merge pull request #800 from Bastians-Bits/master
Development Documentation
2023-05-03 19:32:07 -04:00
Tzahi12345
62bccb3349 Updated DEVELOPMENT.md to reflect dev config file 2023-05-03 17:01:17 -04:00
nardis556
26988bd607 Update entrypoint.sh 2023-04-16 15:03:12 -05:00
bastiansbits
575f7eed4e Added a new read me (DEVELOPMENT.md) as starting point for new develope
Added a new VSC launch configuration to start the backend in the debugger
Update the build instruction in README.md (Issue #728)
2022-12-07 14:43:43 +01:00
142 changed files with 1239 additions and 321 deletions

View File

@@ -23,5 +23,16 @@ jobs:
name: "version.json" name: "version.json"
json: '{"type": "docker", "tag": "nightly", "commit": "${{ steps.vars.outputs.sha_short }}", "date": "${{ steps.date.outputs.date }}"}' json: '{"type": "docker", "tag": "nightly", "commit": "${{ steps.vars.outputs.sha_short }}", "date": "${{ steps.date.outputs.date }}"}'
dir: 'backend/' dir: 'backend/'
- name: Build docker images - name: setup platform emulator
run: docker build . -t tzahi12345/youtubedl-material:nightly-pr uses: docker/setup-qemu-action@v1
- name: setup multi-arch docker build
uses: docker/setup-buildx-action@v1
- name: build & push images
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64/v8
#platforms: linux/amd64
push: false
tags: tzahi12345/youtubedl-material:nightly-pr

View File

@@ -80,7 +80,7 @@ jobs:
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
platforms: linux/amd64,linux/arm,linux/arm64/v8 platforms: linux/amd64,linux/arm64/v8
push: true push: true
tags: ${{ steps.docker-meta.outputs.tags }} tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }} labels: ${{ steps.docker-meta.outputs.labels }}

View File

@@ -80,7 +80,7 @@ jobs:
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
platforms: linux/amd64,linux/arm,linux/arm64/v8 platforms: linux/amd64,linux/arm64/v8
push: true push: true
tags: ${{ steps.docker-meta.outputs.tags }} tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }} labels: ${{ steps.docker-meta.outputs.labels }}

14
.vscode/launch.json vendored
View File

@@ -4,6 +4,20 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{
"name": "Dev: Debug Backend",
"request": "launch",
"runtimeArgs": [
"run-script",
"debug"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
"cwd": "${workspaceFolder}/backend"
},
{ {
"type": "node", "type": "node",
"request": "attach", "request": "attach",

38
DEVELOPMENT.md Normal file
View File

@@ -0,0 +1,38 @@
<h1>Development</h1>
- [First time...](#first-time)
- [Setup](#setup)
- [Startup](#startup)
- [Debugging the backend (VSC)](#debugging-the-backend-vsc)
- [Deploy changes](#deploy-changes)
- [Frontend](#frontend)
- [Backend](#backend)
# First time...
## Setup
Checkout the repository and navigate to the `youtubedl-material` directory.
```bash
vim ./src/assets/default.json # Edit settings for your local environment. This config file is just the dev config file, if YTDL_MODE is not set to "debug", then ./backend/appdata/default.json will be used
npm -g install pm2 # Install pm2
npm install # Install dependencies for the frontend
cd ./backend
npm install # Install dependencies for the backend
cd ..
npm run build # Build the frontend
```
This step have to be done only once.
## Startup
Navigate to the `youtubedl-material/backend` directory and run `npm start`.
# Debugging the backend (VSC)
Open the `youtubedl-material` directory in Visual Studio Code and run the launch configuration `Dev: Debug Backend`.
# Deploy changes
## Frontend
Navigate to the `youtubedl-material` directory and run `npm run build`. Restart the backend.
## Backend
Simply restart the backend.

View File

@@ -2742,7 +2742,7 @@ components:
error: error:
type: string type: string
schedule: schedule:
type: object $ref: '#/components/schemas/Schedule'
options: options:
type: object type: object
Schedule: Schedule:
@@ -2877,6 +2877,7 @@ components:
- sharing - sharing
- advanced_download - advanced_download
- downloads_manager - downloads_manager
- tasks_manager
YesNo: YesNo:
type: string type: string
enum: enum:

View File

@@ -36,8 +36,7 @@ Required dependencies:
Optional dependencies: Optional dependencies:
* AtomicParsley (for embedding thumbnails, package name `atomicparsley`) * AtomicParsley (for embedding thumbnails, package name `atomicparsley`)
* [tcd](https://github.com/PetterKraabol/Twitch-Chat-Downloader) (for downloading Twitch VOD chats) * [Twitch Downloader CLI](https://github.com/lay295/TwitchDownloader) (for downloading Twitch VOD chats)
<details> <details>
<summary>Debian/Ubuntu</summary> <summary>Debian/Ubuntu</summary>
@@ -86,7 +85,9 @@ If you'd like to install YoutubeDL-Material, go to the Installation section. If
To deploy, simply clone the repository, and go into the `youtubedl-material` directory. Type `npm install` and all the dependencies will install. Then type `cd backend` and again type `npm install` to install the dependencies for the backend. To deploy, simply clone the repository, and go into the `youtubedl-material` directory. Type `npm install` and all the dependencies will install. Then type `cd backend` and again type `npm install` to install the dependencies for the backend.
Once you do that, you're almost up and running. All you need to do is edit the configuration in `youtubedl-material/appdata`, go back into the `youtubedl-material` directory, and type `npm build`. This will build the app, and put the output files in the `youtubedl-material/backend/public` folder. Once you do that, you're almost up and running. All you need to do is edit the configuration in `youtubedl-material/appdata`, go back into the `youtubedl-material` directory, and type `npm run build`. This will build the app, and put the output files in the `youtubedl-material/backend/public` folder.
Lastly, type `npm -g install pm2` to install pm2 globally.
The frontend is now complete. The backend is much easier. Just go into the `backend` folder, and type `npm start`. The frontend is now complete. The backend is much easier. Just go into the `backend` folder, and type `npm start`.

View File

@@ -68,14 +68,7 @@ exports.initialize = function () {
const setupRoles = async () => { const setupRoles = async () => {
const required_roles = { const required_roles = {
admin: { admin: {
permissions: [ permissions: consts.AVAILABLE_PERMISSIONS
'filemanager',
'settings',
'subscriptions',
'sharing',
'advanced_download',
'downloads_manager'
]
}, },
user: { user: {
permissions: [ permissions: [

View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
set -eu set -eu
CMD="npm start" CMD="npm start && pm2 start"
# if the first arg starts with "-" pass it to program # if the first arg starts with "-" pass it to program
if [ "${1#-}" != "$1" ]; then if [ "${1#-}" != "$1" ]; then

View File

@@ -30,7 +30,7 @@ curl -o ffmpeg.txz \
--retry 5 \ --retry 5 \
--retry-delay 0 \ --retry-delay 0 \
--retry-max-time 40 \ --retry-max-time 40 \
"https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-${ARCH}-static.tar.xz" "https://johnvansickle.com/ffmpeg/old-releases/ffmpeg-5.1.1-${ARCH}-static.tar.xz"
mkdir /tmp/ffmpeg mkdir /tmp/ffmpeg
tar xf ffmpeg.txz -C /tmp/ffmpeg tar xf ffmpeg.txz -C /tmp/ffmpeg
echo "(3/5) CLEANUP - Remove temp dependencies from ffmpeg obtain layer" echo "(3/5) CLEANUP - Remove temp dependencies from ffmpeg obtain layer"

View File

@@ -5,4 +5,4 @@
export type AddFileToPlaylistRequest = { export type AddFileToPlaylistRequest = {
file_uid: string; file_uid: string;
playlist_id: string; playlist_id: string;
}; };

View File

@@ -13,4 +13,4 @@ export type Archive = {
sub_id?: string; sub_id?: string;
timestamp: number; timestamp: number;
uid: string; uid: string;
}; };

View File

@@ -8,4 +8,4 @@ import type { YesNo } from './YesNo';
export type BaseChangePermissionsRequest = { export type BaseChangePermissionsRequest = {
permission: UserPermission; permission: UserPermission;
new_value: YesNo; new_value: YesNo;
}; };

View File

@@ -12,4 +12,4 @@ export type Category = {
* Overrides file output for downloaded files in category * Overrides file output for downloaded files in category
*/ */
custom_output?: string; custom_output?: string;
}; };

View File

@@ -22,4 +22,4 @@ export namespace CategoryRule {
} }
} }

View File

@@ -6,4 +6,4 @@ import type { BaseChangePermissionsRequest } from './BaseChangePermissionsReques
export type ChangeRolePermissionsRequest = (BaseChangePermissionsRequest & { export type ChangeRolePermissionsRequest = (BaseChangePermissionsRequest & {
role: string; role: string;
}); });

View File

@@ -6,4 +6,4 @@ import type { BaseChangePermissionsRequest } from './BaseChangePermissionsReques
export type ChangeUserPermissionsRequest = (BaseChangePermissionsRequest & { export type ChangeUserPermissionsRequest = (BaseChangePermissionsRequest & {
user_uid: string; user_uid: string;
}); });

View File

@@ -7,4 +7,4 @@ export type CheckConcurrentStreamRequest = {
* UID of the concurrent stream * UID of the concurrent stream
*/ */
uid: string; uid: string;
}; };

View File

@@ -6,4 +6,4 @@ import type { ConcurrentStream } from './ConcurrentStream';
export type CheckConcurrentStreamResponse = { export type CheckConcurrentStreamResponse = {
stream: ConcurrentStream; stream: ConcurrentStream;
}; };

View File

@@ -6,4 +6,4 @@ export type ClearDownloadsRequest = {
clear_finished?: boolean; clear_finished?: boolean;
clear_paused?: boolean; clear_paused?: boolean;
clear_errors?: boolean; clear_errors?: boolean;
}; };

View File

@@ -6,4 +6,4 @@ export type ConcurrentStream = {
playback_timestamp?: number; playback_timestamp?: number;
unix_timestamp?: number; unix_timestamp?: number;
playing?: boolean; playing?: boolean;
}; };

View File

@@ -3,5 +3,5 @@
/* eslint-disable */ /* eslint-disable */
export type Config = { export type Config = {
YoutubeDLMaterial: any; YoutubeDLMaterial: Record<string, any>;
}; };

View File

@@ -7,4 +7,4 @@ import type { Config } from './Config';
export type ConfigResponse = { export type ConfigResponse = {
config_file: Config; config_file: Config;
success: boolean; success: boolean;
}; };

View File

@@ -4,4 +4,4 @@
export type CreateCategoryRequest = { export type CreateCategoryRequest = {
name: string; name: string;
}; };

View File

@@ -7,4 +7,4 @@ import type { Category } from './Category';
export type CreateCategoryResponse = { export type CreateCategoryResponse = {
new_category?: Category; new_category?: Category;
success?: boolean; success?: boolean;
}; };

View File

@@ -6,4 +6,4 @@ export type CreatePlaylistRequest = {
playlistName: string; playlistName: string;
uids: Array<string>; uids: Array<string>;
thumbnailURL: string; thumbnailURL: string;
}; };

View File

@@ -7,4 +7,4 @@ import type { Playlist } from './Playlist';
export type CreatePlaylistResponse = { export type CreatePlaylistResponse = {
new_playlist: Playlist; new_playlist: Playlist;
success: boolean; success: boolean;
}; };

View File

@@ -5,4 +5,4 @@
export type CropFileSettings = { export type CropFileSettings = {
cropFileStart: number; cropFileStart: number;
cropFileEnd: number; cropFileEnd: number;
}; };

View File

@@ -17,4 +17,4 @@ export namespace DBBackup {
} }
} }

View File

@@ -16,4 +16,4 @@ roles?: TableInfo;
download_queue?: TableInfo; download_queue?: TableInfo;
archives?: TableInfo; archives?: TableInfo;
}; };
}; };

View File

@@ -42,4 +42,4 @@ export type DatabaseFile = {
*/ */
abr?: number; abr?: number;
favorite: boolean; favorite: boolean;
}; };

View File

@@ -11,4 +11,4 @@ export type DeleteAllFilesResponse = {
* Number of files removed * Number of files removed
*/ */
delete_count?: number; delete_count?: number;
}; };

View File

@@ -6,4 +6,4 @@ import type { Archive } from './Archive';
export type DeleteArchiveItemsRequest = { export type DeleteArchiveItemsRequest = {
archives: Array<Archive>; archives: Array<Archive>;
}; };

View File

@@ -4,4 +4,4 @@
export type DeleteCategoryRequest = { export type DeleteCategoryRequest = {
category_uid: string; category_uid: string;
}; };

View File

@@ -5,4 +5,4 @@
export type DeleteMp3Mp4Request = { export type DeleteMp3Mp4Request = {
uid: string; uid: string;
blacklistMode?: boolean; blacklistMode?: boolean;
}; };

View File

@@ -4,4 +4,4 @@
export type DeleteNotificationRequest = { export type DeleteNotificationRequest = {
uid: string; uid: string;
}; };

View File

@@ -4,4 +4,4 @@
export type DeletePlaylistRequest = { export type DeletePlaylistRequest = {
playlist_id: string; playlist_id: string;
}; };

View File

@@ -8,4 +8,4 @@ export type 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;
}; };

View File

@@ -4,4 +4,4 @@
export type DeleteUserRequest = { export type DeleteUserRequest = {
uid: string; uid: string;
}; };

View File

@@ -26,5 +26,5 @@ export type Download = {
user_uid?: string; user_uid?: string;
sub_id?: string; sub_id?: string;
sub_name?: string; sub_name?: string;
prefetched_info?: any; prefetched_info?: Record<string, any>;
}; };

View File

@@ -7,4 +7,4 @@ import type { FileType } from './FileType';
export type DownloadArchiveRequest = { export type DownloadArchiveRequest = {
type?: FileType; type?: FileType;
sub_id?: string; sub_id?: string;
}; };

View File

@@ -11,4 +11,4 @@ export type DownloadFileRequest = {
playlist_id?: string; playlist_id?: string;
url?: string; url?: string;
type?: FileType; type?: FileType;
}; };

View File

@@ -49,4 +49,4 @@ export type DownloadRequest = {
* If using youtube-dl archive, download will ignore it * If using youtube-dl archive, download will ignore it
*/ */
ignoreArchive?: boolean; ignoreArchive?: boolean;
}; };

View File

@@ -6,4 +6,4 @@ import type { Download } from './Download';
export type DownloadResponse = { export type DownloadResponse = {
download?: Download; download?: Download;
}; };

View File

@@ -20,4 +20,4 @@ export type DownloadTwitchChatByVODIDRequest = {
*/ */
uuid?: string; uuid?: string;
sub?: Subscription; sub?: Subscription;
}; };

View File

@@ -6,4 +6,4 @@ import type { TwitchChatMessage } from './TwitchChatMessage';
export type DownloadTwitchChatByVODIDResponse = { export type DownloadTwitchChatByVODIDResponse = {
chat: Array<TwitchChatMessage>; chat: Array<TwitchChatMessage>;
}; };

View File

@@ -4,4 +4,4 @@
export type DownloadVideosForSubscriptionRequest = { export type DownloadVideosForSubscriptionRequest = {
subID: string; subID: string;
}; };

View File

@@ -5,4 +5,4 @@
export enum FileType { export enum FileType {
AUDIO = 'audio', AUDIO = 'audio',
VIDEO = 'video', VIDEO = 'video',
} }

View File

@@ -6,4 +6,4 @@ export enum FileTypeFilter {
AUDIO_ONLY = 'audio_only', AUDIO_ONLY = 'audio_only',
VIDEO_ONLY = 'video_only', VIDEO_ONLY = 'video_only',
BOTH = 'both', BOTH = 'both',
} }

View File

@@ -4,4 +4,4 @@
export type GenerateArgsResponse = { export type GenerateArgsResponse = {
args?: Array<string>; args?: Array<string>;
}; };

View File

@@ -4,4 +4,4 @@
export type GenerateNewApiKeyResponse = { export type GenerateNewApiKeyResponse = {
new_api_key: string; new_api_key: string;
}; };

View File

@@ -6,4 +6,4 @@ import type { Category } from './Category';
export type GetAllCategoriesResponse = { export type GetAllCategoriesResponse = {
categories: Array<Category>; categories: Array<Category>;
}; };

View File

@@ -7,4 +7,4 @@ export type GetAllDownloadsRequest = {
* Filters downloads with the array * Filters downloads with the array
*/ */
uids?: Array<string> | null; uids?: Array<string> | null;
}; };

View File

@@ -6,4 +6,4 @@ import type { Download } from './Download';
export type GetAllDownloadsResponse = { export type GetAllDownloadsResponse = {
downloads?: Array<Download>; downloads?: Array<Download>;
}; };

View File

@@ -21,4 +21,4 @@ export type GetAllFilesRequest = {
* Include if you want to filter by subscription * Include if you want to filter by subscription
*/ */
sub_id?: string; sub_id?: string;
}; };

View File

@@ -11,4 +11,4 @@ export type GetAllFilesResponse = {
* All video playlists * All video playlists
*/ */
playlists: Array<Playlist>; playlists: Array<Playlist>;
}; };

View File

@@ -6,4 +6,4 @@ import type { Subscription } from './Subscription';
export type GetAllSubscriptionsResponse = { export type GetAllSubscriptionsResponse = {
subscriptions: Array<Subscription>; subscriptions: Array<Subscription>;
}; };

View File

@@ -6,4 +6,4 @@ import type { Task } from './Task';
export type GetAllTasksResponse = { export type GetAllTasksResponse = {
tasks?: Array<Task>; tasks?: Array<Task>;
}; };

View File

@@ -7,4 +7,4 @@ import type { FileType } from './FileType';
export type GetArchivesRequest = { export type GetArchivesRequest = {
type?: FileType; type?: FileType;
sub_id?: string; sub_id?: string;
}; };

View File

@@ -6,4 +6,4 @@ import type { Archive } from './Archive';
export type GetArchivesResponse = { export type GetArchivesResponse = {
archives: Array<Archive>; archives: Array<Archive>;
}; };

View File

@@ -6,4 +6,4 @@ import type { DBBackup } from './DBBackup';
export type GetDBBackupsResponse = { export type GetDBBackupsResponse = {
tasks?: Array<DBBackup>; tasks?: Array<DBBackup>;
}; };

View File

@@ -4,4 +4,4 @@
export type GetDownloadRequest = { export type GetDownloadRequest = {
download_uid: string; download_uid: string;
}; };

View File

@@ -6,4 +6,4 @@ import type { Download } from './Download';
export type GetDownloadResponse = { export type GetDownloadResponse = {
download?: Download; download?: Download;
}; };

View File

@@ -4,4 +4,4 @@
export type GetFileFormatsRequest = { export type GetFileFormatsRequest = {
url?: string; url?: string;
}; };

View File

@@ -5,6 +5,6 @@
export type GetFileFormatsResponse = { export type GetFileFormatsResponse = {
success: boolean; success: boolean;
result: { result: {
formats?: Array<any>; formats?: Array<Record<string, any>>;
};
}; };
};

View File

@@ -14,4 +14,4 @@ export type GetFileRequest = {
* User UID * User UID
*/ */
uuid?: string; uuid?: string;
}; };

View File

@@ -7,4 +7,4 @@ import type { DatabaseFile } from './DatabaseFile';
export type GetFileResponse = { export type GetFileResponse = {
success: boolean; success: boolean;
file?: DatabaseFile; file?: DatabaseFile;
}; };

View File

@@ -16,4 +16,4 @@ export type GetFullTwitchChatRequest = {
*/ */
uuid?: string; uuid?: string;
sub?: Subscription; sub?: Subscription;
}; };

View File

@@ -5,4 +5,4 @@
export type GetFullTwitchChatResponse = { export type GetFullTwitchChatResponse = {
success: boolean; success: boolean;
error?: string; error?: string;
}; };

View File

@@ -4,4 +4,4 @@
export type GetLogsRequest = { export type GetLogsRequest = {
lines?: number; lines?: number;
}; };

View File

@@ -8,4 +8,4 @@ export type GetLogsResponse = {
*/ */
logs?: string; logs?: string;
success?: boolean; success?: boolean;
}; };

View File

@@ -11,4 +11,4 @@ export type GetMp3sResponse = {
* All audio playlists * All audio playlists
*/ */
playlists: Array<Playlist>; playlists: Array<Playlist>;
}; };

View File

@@ -11,4 +11,4 @@ export type GetMp4sResponse = {
* All video playlists * All video playlists
*/ */
playlists: Array<Playlist>; playlists: Array<Playlist>;
}; };

View File

@@ -6,4 +6,4 @@ import type { Notification } from './Notification';
export type GetNotificationsResponse = { export type GetNotificationsResponse = {
notifications?: Array<Notification>; notifications?: Array<Notification>;
}; };

View File

@@ -9,4 +9,4 @@ export type GetPlaylistRequest = {
type?: FileType; type?: FileType;
uuid?: string; uuid?: string;
include_file_metadata?: boolean; include_file_metadata?: boolean;
}; };

View File

@@ -12,4 +12,4 @@ export type GetPlaylistResponse = {
* File objects for every uid in the playlist's uids property, in the same order * File objects for every uid in the playlist's uids property, in the same order
*/ */
file_objs?: Array<DatabaseFile>; file_objs?: Array<DatabaseFile>;
}; };

View File

@@ -4,4 +4,4 @@
export type GetPlaylistsRequest = { export type GetPlaylistsRequest = {
include_categories?: boolean; include_categories?: boolean;
}; };

View File

@@ -6,4 +6,4 @@ import type { Playlist } from './Playlist';
export type GetPlaylistsResponse = { export type GetPlaylistsResponse = {
playlists: Array<Playlist>; playlists: Array<Playlist>;
}; };

View File

@@ -13,4 +13,4 @@ user?: {
permissions?: Array<UserPermission>; permissions?: Array<UserPermission>;
}; };
}; };
}; };

View File

@@ -11,4 +11,4 @@ export type GetSubscriptionRequest = {
* Subscription name * Subscription name
*/ */
name?: string; name?: string;
}; };

View File

@@ -6,5 +6,5 @@ import type { Subscription } from './Subscription';
export type GetSubscriptionResponse = { export type GetSubscriptionResponse = {
subscription: Subscription; subscription: Subscription;
files: Array<any>; files: Array<Record<string, any>>;
}; };

View File

@@ -4,4 +4,4 @@
export type GetTaskRequest = { export type GetTaskRequest = {
task_key: string; task_key: string;
}; };

View File

@@ -6,4 +6,4 @@ import type { Task } from './Task';
export type GetTaskResponse = { export type GetTaskResponse = {
task?: Task; task?: Task;
}; };

View File

@@ -6,4 +6,4 @@ import type { User } from './User';
export type GetUsersResponse = { export type GetUsersResponse = {
users: Array<User>; users: Array<User>;
}; };

View File

@@ -8,4 +8,4 @@ export type ImportArchiveRequest = {
archive: string; archive: string;
type: FileType; type: FileType;
sub_id?: string; sub_id?: string;
}; };

View File

@@ -9,4 +9,4 @@ export type IncrementViewCountRequest = {
* User UID * User UID
*/ */
uuid?: string; uuid?: string;
}; };

View File

@@ -5,4 +5,4 @@
export type LoginRequest = { export type LoginRequest = {
username: string; username: string;
password: string; password: string;
}; };

View File

@@ -10,4 +10,4 @@ export type LoginResponse = {
token?: string; token?: string;
permissions?: Array<UserPermission>; permissions?: Array<UserPermission>;
available_permissions?: Array<UserPermission>; available_permissions?: Array<UserPermission>;
}; };

View File

@@ -11,6 +11,6 @@ export type Notification = {
user_uid?: string; user_uid?: string;
action?: Array<NotificationAction>; action?: Array<NotificationAction>;
read: boolean; read: boolean;
data?: any; data?: Record<string, any>;
timestamp: number; timestamp: number;
}; };

View File

@@ -7,4 +7,4 @@ export enum NotificationAction {
RETRY_DOWNLOAD = 'retry_download', RETRY_DOWNLOAD = 'retry_download',
VIEW_DOWNLOAD_ERROR = 'view_download_error', VIEW_DOWNLOAD_ERROR = 'view_download_error',
VIEW_TASKS = 'view_tasks', VIEW_TASKS = 'view_tasks',
} }

View File

@@ -6,4 +6,4 @@ export enum NotificationType {
DOWNLOAD_COMPLETE = 'download_complete', DOWNLOAD_COMPLETE = 'download_complete',
DOWNLOAD_ERROR = 'download_error', DOWNLOAD_ERROR = 'download_error',
TASK_FINISHED = 'task_finished', TASK_FINISHED = 'task_finished',
} }

View File

@@ -15,4 +15,4 @@ export type Playlist = {
user_uid?: string; user_uid?: string;
auto?: boolean; auto?: boolean;
sharingEnabled?: boolean; sharingEnabled?: boolean;
}; };

View File

@@ -6,4 +6,4 @@ export type RegisterRequest = {
userid: string; userid: string;
username: string; username: string;
password: string; password: string;
}; };

View File

@@ -6,4 +6,4 @@ import type { User } from './User';
export type RegisterResponse = { export type RegisterResponse = {
user?: User; user?: User;
}; };

View File

@@ -6,4 +6,4 @@ import type { SuccessObject } from './SuccessObject';
export type RestartDownloadResponse = (SuccessObject & { export type RestartDownloadResponse = (SuccessObject & {
new_download_uid?: string; new_download_uid?: string;
}); });

View File

@@ -4,4 +4,4 @@
export type RestoreDBBackupRequest = { export type RestoreDBBackupRequest = {
file_name: string; file_name: string;
}; };

View File

@@ -21,4 +21,4 @@ export namespace Schedule {
} }
} }

View File

@@ -6,4 +6,4 @@ import type { Config } from './Config';
export type SetConfigRequest = { export type SetConfigRequest = {
new_config_file: Config; new_config_file: Config;
}; };

View File

@@ -4,4 +4,4 @@
export type SetNotificationsToReadRequest = { export type SetNotificationsToReadRequest = {
uids: Array<string>; uids: Array<string>;
}; };

View File

@@ -5,4 +5,4 @@
export type SharingToggle = { export type SharingToggle = {
uid: string; uid: string;
is_playlist?: boolean; is_playlist?: boolean;
}; };

Some files were not shown because too many files have changed in this diff Show More