mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-07 20:10:03 +03:00
Compare commits
104 Commits
tasks-and-
...
GlassedSil
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1a48f67fa | ||
|
|
bbb5e8ebb9 | ||
|
|
e5b256b8df | ||
|
|
05ea5a816f | ||
|
|
b3342d89c1 | ||
|
|
7bfb441a00 | ||
|
|
01fd2fb990 | ||
|
|
1bb4d9dbf6 | ||
|
|
5e23932146 | ||
|
|
d6d3495c5b | ||
|
|
a36761e96a | ||
|
|
88c16d7195 | ||
|
|
8a323f028d | ||
|
|
a68726e7cb | ||
|
|
dab0b7a8b6 | ||
|
|
9f9054ed9d | ||
|
|
77e8cbc6b5 | ||
|
|
4c06c430eb | ||
|
|
2981f843c3 | ||
|
|
3a48ff2d50 | ||
|
|
ac2c3dc8a1 | ||
|
|
0abe252d1e | ||
|
|
f5f00e1732 | ||
|
|
c309e41a91 | ||
|
|
754d837059 | ||
|
|
d5626f1dae | ||
|
|
9c0733453a | ||
|
|
2a41028253 | ||
|
|
67b2e480f8 | ||
|
|
2cdc1cee98 | ||
|
|
bd1ed2b705 | ||
|
|
33ca0f0817 | ||
|
|
d5ab0d7b96 | ||
|
|
777aebe508 | ||
|
|
efaecaa059 | ||
|
|
39ddefab5c | ||
|
|
60f2ab449f | ||
|
|
958f80e200 | ||
|
|
7aa5c1bf7f | ||
|
|
3bcbe0d3e7 | ||
|
|
80fcecdaea | ||
|
|
0329cd9718 | ||
|
|
493e876a97 | ||
|
|
574edd74ab | ||
|
|
fe91484f24 | ||
|
|
dda6e40a42 | ||
|
|
c0fb838931 | ||
|
|
28924cc7a0 | ||
|
|
2527051eab | ||
|
|
fcf7d14f46 | ||
|
|
0a8aba54d2 | ||
|
|
2c6485acb2 | ||
|
|
aea4f52267 | ||
|
|
5ac5fca482 | ||
|
|
7874f1b71a | ||
|
|
960c545f37 | ||
|
|
5e3eb68b03 | ||
|
|
4dd3b97515 | ||
|
|
701066eec1 | ||
|
|
7f61ccb5f5 | ||
|
|
4f227ca442 | ||
|
|
666bd2057d | ||
|
|
37c858f950 | ||
|
|
ebb7f6a2b0 | ||
|
|
48e46db071 | ||
|
|
768ec59f30 | ||
|
|
aa8f602856 | ||
|
|
d5c1361e64 | ||
|
|
901a96aada | ||
|
|
21507ee36d | ||
|
|
0585943d67 | ||
|
|
0bc2193f25 | ||
|
|
f3398fce1a | ||
|
|
60e8973f52 | ||
|
|
d94857b0a5 | ||
|
|
5fda56d7af | ||
|
|
abb80b33f3 | ||
|
|
9977340161 | ||
|
|
8ded160775 | ||
|
|
2ee64c7a65 | ||
|
|
2ec7efa1ac | ||
|
|
4d51384ce6 | ||
|
|
aa616af118 | ||
|
|
feebe3e2ba | ||
|
|
02e90fe818 | ||
|
|
a4cfafe63c | ||
|
|
63e2e6dd3c | ||
|
|
5a44229e24 | ||
|
|
5025b235b7 | ||
|
|
5d540fc52a | ||
|
|
55dfc17d62 | ||
|
|
2459403b22 | ||
|
|
ed5f910c33 | ||
|
|
468e7153e4 | ||
|
|
1bd713fe17 | ||
|
|
3df377a260 | ||
|
|
8314ab8fce | ||
|
|
c008171850 | ||
|
|
0f4f5293de | ||
|
|
16943847fc | ||
|
|
f79b254040 | ||
|
|
e7989e41f9 | ||
|
|
a4d421d398 | ||
|
|
b46b9ea386 |
7
.dockerignore
Normal file
7
.dockerignore
Normal file
@@ -0,0 +1,7 @@
|
||||
.git
|
||||
db
|
||||
appdata
|
||||
audio
|
||||
video
|
||||
subscriptions
|
||||
users
|
||||
27
.github/workflows/docker-pr.yml
vendored
Normal file
27
.github/workflows/docker-pr.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: docker-pr
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Set hash
|
||||
id: vars
|
||||
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||
- name: Get current date
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
|
||||
- name: create-json
|
||||
id: create-json
|
||||
uses: jsdaniell/create-json@1.1.2
|
||||
with:
|
||||
name: "version.json"
|
||||
json: '{"type": "docker", "tag": "nightly", "commit": "${{ steps.vars.outputs.sha_short }}", "date": "${{ steps.date.outputs.date }}"}'
|
||||
dir: 'backend/'
|
||||
- name: Build docker images
|
||||
run: docker build . -t tzahi12345/youtubedl-material:nightly-pr
|
||||
18
.github/workflows/docker.yml
vendored
18
.github/workflows/docker.yml
vendored
@@ -3,6 +3,16 @@ name: docker
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
- '.vscode/**'
|
||||
- 'chrome-extension/**'
|
||||
- 'releases/**'
|
||||
- '**.crx'
|
||||
- '**.pem'
|
||||
- '**.md'
|
||||
- '.dockerignore'
|
||||
- '.gitignore'
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
@@ -21,7 +31,7 @@ jobs:
|
||||
uses: jsdaniell/create-json@1.1.2
|
||||
with:
|
||||
name: "version.json"
|
||||
json: '{"type": "docker", "tag": "nightly", "commit": "${{ steps.vars.outputs.sha_short }}", "date": "${{ steps.date.outputs.date }}"}'
|
||||
json: '{"type": "docker", "tag": "${{secrets.DOCKERHUB_MASTER_TAG}}", "commit": "${{ steps.vars.outputs.sha_short }}", "date": "${{ steps.date.outputs.date }}"}'
|
||||
dir: 'backend/'
|
||||
- name: setup platform emulator
|
||||
uses: docker/setup-qemu-action@v1
|
||||
@@ -39,4 +49,8 @@ jobs:
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm,linux/arm64/v8
|
||||
push: true
|
||||
tags: tzahi12345/youtubedl-material:nightly
|
||||
# Defaults:
|
||||
# DOCKERHUB_USERNAME : tzahi12345
|
||||
# DOCKERHUB_REPO : youtubedl-material
|
||||
# DOCKERHUB_MASTER_TAG: nightly
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:${{secrets.DOCKERHUB_MASTER_TAG}}
|
||||
|
||||
9
.gitignore
vendored
9
.gitignore
vendored
@@ -25,6 +25,7 @@
|
||||
!.vscode/extensions.json
|
||||
|
||||
# misc
|
||||
/.angular/cache
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
@@ -67,3 +68,11 @@ backend/users/*
|
||||
backend/appdata/cookies.txt
|
||||
backend/public
|
||||
src/assets/i18n/*.json
|
||||
|
||||
# User Files
|
||||
db/
|
||||
appdata/
|
||||
audio/
|
||||
video/
|
||||
subscriptions/
|
||||
users/
|
||||
55
Dockerfile
55
Dockerfile
@@ -1,9 +1,25 @@
|
||||
FROM alpine:latest as frontend
|
||||
FROM ubuntu:20.04 AS ffmpeg
|
||||
|
||||
RUN apk add --no-cache \
|
||||
npm
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN npm install -g @angular/cli
|
||||
COPY docker-build.sh .
|
||||
RUN sh ./docker-build.sh
|
||||
|
||||
FROM ubuntu:20.04 as frontend
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get -y install \
|
||||
curl \
|
||||
gnupg && \
|
||||
curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
|
||||
apt-get -y install \
|
||||
nodejs \
|
||||
# YARN: brings along npm, solves dependency conflicts,
|
||||
# spares us this spaghetti approach: https://stackoverflow.com/a/60547197
|
||||
yarn && \
|
||||
apt-get install -f && \
|
||||
npm config set strict-ssl false && \
|
||||
npm install -g @angular/cli
|
||||
|
||||
WORKDIR /build
|
||||
COPY [ "package.json", "package-lock.json", "/build/" ]
|
||||
@@ -15,34 +31,41 @@ RUN npm run build
|
||||
|
||||
#--------------#
|
||||
|
||||
FROM alpine:latest
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ENV UID=1000 \
|
||||
GID=1000 \
|
||||
USER=youtube
|
||||
USER=youtube \
|
||||
NO_UPDATE_NOTIFIER=true
|
||||
|
||||
ENV NO_UPDATE_NOTIFIER=true
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN addgroup -S $USER -g $GID && adduser -D -S $USER -G $USER -u $UID
|
||||
RUN groupadd -g $GID $USER && useradd --system -g $USER --uid $UID $USER
|
||||
|
||||
RUN apk add --no-cache \
|
||||
ffmpeg \
|
||||
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
|
||||
RUN apt-get update && apt-get -y install \
|
||||
npm \
|
||||
python2 \
|
||||
python3 \
|
||||
su-exec \
|
||||
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
|
||||
atomicparsley
|
||||
atomicparsley && \
|
||||
apt-get install -f && \
|
||||
apt-get autoremove --purge && \
|
||||
apt-get autoremove && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=ffmpeg /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg
|
||||
COPY --from=ffmpeg /usr/local/bin/ffprobe /usr/local/bin/ffprobe
|
||||
COPY --chown=$UID:$GID [ "backend/package.json", "backend/package-lock.json", "/app/" ]
|
||||
ENV PM2_HOME=/app/pm2
|
||||
RUN npm install pm2 -g
|
||||
RUN npm install && chown -R $UID:$GID ./
|
||||
RUN npm config set strict-ssl false && \
|
||||
npm install pm2 -g && \
|
||||
npm install && chown -R $UID:$GID ./
|
||||
|
||||
COPY --chown=$UID:$GID --from=frontend [ "/build/backend/public/", "/app/public/" ]
|
||||
COPY --chown=$UID:$GID [ "/backend/", "/app/" ]
|
||||
|
||||
EXPOSE 17442
|
||||
ENTRYPOINT [ "/app/entrypoint.sh" ]
|
||||
# ENTRYPOINT [ "/app/entrypoint.sh" ]
|
||||
CMD [ "pm2-runtime", "pm2.config.js" ]
|
||||
|
||||
@@ -16,7 +16,7 @@ paths:
|
||||
- downloader
|
||||
summary: Download video file
|
||||
description: |-
|
||||
Downloads a video file with the given URL. Will include global args if they exist.
|
||||
Downloads a file with the given URL. Will include global args if they exist.
|
||||
|
||||
|
||||
HTTP requests will return once the video file download completes. In the future, it will (by default) return once the download starts, and a separate API call will be used for checking the download status.
|
||||
@@ -41,7 +41,7 @@ paths:
|
||||
post:
|
||||
tags:
|
||||
- downloader
|
||||
summary: Download video file
|
||||
summary: Generates arguments used to download file
|
||||
description: Generates args, used for checking what args would run if you ran downloadFile
|
||||
operationId: post-generateArgs
|
||||
requestBody:
|
||||
@@ -482,6 +482,26 @@ paths:
|
||||
description: OK
|
||||
security:
|
||||
- Auth query parameter: []
|
||||
/api/deleteAllFiles:
|
||||
post:
|
||||
tags:
|
||||
- files
|
||||
summary: Delete all downloaded files
|
||||
operationId: post-api-deleteAllFiles
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DeleteMp3Mp4Request'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DeleteAllFilesResponse'
|
||||
security:
|
||||
- Auth query parameter: []
|
||||
/api/downloadArchive:
|
||||
post:
|
||||
tags:
|
||||
@@ -1765,6 +1785,15 @@ components:
|
||||
type: boolean
|
||||
error:
|
||||
type: string
|
||||
DeleteAllFilesResponse:
|
||||
type: object
|
||||
properties:
|
||||
file_count:
|
||||
type: number
|
||||
description: Number of files found matching search parameters
|
||||
delete_count:
|
||||
type: number
|
||||
description: Number of files removed
|
||||
DeleteSubscriptionFileRequest:
|
||||
required:
|
||||
- file
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
[](https://github.com/Tzahi12345/YoutubeDL-Material/issues)
|
||||
[](https://github.com/Tzahi12345/YoutubeDL-Material/blob/master/LICENSE.md)
|
||||
|
||||
YoutubeDL-Material is a Material Design frontend for [youtube-dl](https://rg3.github.io/youtube-dl/). It's coded using [Angular 11](https://angular.io/) for the frontend, and [Node.js](https://nodejs.org/) on the backend.
|
||||
YoutubeDL-Material is a Material Design frontend for [youtube-dl](https://rg3.github.io/youtube-dl/). It's coded using [Angular 13](https://angular.io/) for the frontend, and [Node.js](https://nodejs.org/) 16 on the backend.
|
||||
|
||||
Now with [Docker](#Docker) support!
|
||||
|
||||
|
||||
21
SECURITY.md
Normal file
21
SECURITY.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Currently all work on this project goes into the nightly builds.
|
||||
4.2's RELEASE build is now quite old and should be considered legacy.
|
||||
We urge users to use the nightly releases, because the project
|
||||
constantly sees fixes.
|
||||
|
||||
| Version | Supported |
|
||||
| ------------- | ------------------ |
|
||||
| 4.2 Nightlies | :white_check_mark: |
|
||||
| 4.2 Release | :x: |
|
||||
| < 4.2 | :x: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please file an issue in our GitHub's repo, because this app
|
||||
isn't meant to be safe to run as public instance yet, but rather as a LAN facing app.
|
||||
|
||||
We welcome PRs and help in general in making YTDL-M more secure, but it's not a priority as of now.
|
||||
36
angular.json
36
angular.json
@@ -17,7 +17,6 @@
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"aot": true,
|
||||
"outputPath": "backend/public",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
@@ -33,7 +32,17 @@
|
||||
"styles": [
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": []
|
||||
"scripts": [],
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"buildOptimizer": false,
|
||||
"sourceMap": true,
|
||||
"optimization": false,
|
||||
"namedChunks": true,
|
||||
"allowedCommonJsDependencies": [
|
||||
"rxjs",
|
||||
"crypto-js"
|
||||
]
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
@@ -46,7 +55,6 @@
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
@@ -60,7 +68,8 @@
|
||||
"es": {
|
||||
"localize": ["es"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": ""
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
@@ -152,16 +161,6 @@
|
||||
"src/backend"
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"src/tsconfig.app.json",
|
||||
"src/tsconfig.spec.json"
|
||||
],
|
||||
"exclude": []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -176,15 +175,6 @@
|
||||
"protractorConfig": "./protractor.conf.js",
|
||||
"devServerTarget": "youtube-dl-material:serve"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"e2e/tsconfig.e2e.json"
|
||||
],
|
||||
"exclude": []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
FROM alpine:3.12 as frontend
|
||||
|
||||
RUN apk add --no-cache \
|
||||
npm \
|
||||
curl
|
||||
|
||||
RUN npm install -g @angular/cli
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
RUN curl -L https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz | tar zxvf - -C . && mv qemu-3.0.0+resin-arm/qemu-arm-static .
|
||||
|
||||
COPY [ "package.json", "package-lock.json", "/build/" ]
|
||||
RUN npm install
|
||||
|
||||
COPY [ "angular.json", "tsconfig.json", "/build/" ]
|
||||
COPY [ "src/", "/build/src/" ]
|
||||
RUN ng build --prod
|
||||
|
||||
#--------------#
|
||||
|
||||
FROM arm32v7/alpine:3.12
|
||||
|
||||
COPY --from=frontend /build/qemu-arm-static /usr/bin
|
||||
|
||||
ENV UID=1000 \
|
||||
GID=1000 \
|
||||
USER=youtube
|
||||
|
||||
RUN addgroup -S $USER -g $GID && adduser -D -S $USER -G $USER -u $UID
|
||||
|
||||
RUN apk add --no-cache \
|
||||
ffmpeg \
|
||||
npm \
|
||||
python2 \
|
||||
su-exec \
|
||||
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
|
||||
atomicparsley
|
||||
|
||||
WORKDIR /app
|
||||
COPY --chown=$UID:$GID [ "backend/package.json", "backend/package-lock.json", "/app/" ]
|
||||
RUN npm install && chown -R $UID:$GID ./
|
||||
|
||||
COPY --chown=$UID:$GID --from=frontend [ "/build/backend/public/", "/app/public/" ]
|
||||
COPY --chown=$UID:$GID [ "/backend/", "/app/" ]
|
||||
|
||||
EXPOSE 17442
|
||||
ENTRYPOINT [ "/app/entrypoint.sh" ]
|
||||
CMD [ "node", "app.js" ]
|
||||
@@ -803,7 +803,7 @@ app.post('/api/testConnectionString', optionalJwt, async (req, res) => {
|
||||
app.post('/api/downloadFile', optionalJwt, async function(req, res) {
|
||||
req.setTimeout(0); // remove timeout in case of long videos
|
||||
const url = req.body.url;
|
||||
const type = req.body.type;
|
||||
const type = req.body.type ? req.body.type : 'video';
|
||||
const user_uid = req.isAuthenticated() ? req.user.uid : null;
|
||||
const options = {
|
||||
customArgs: req.body.customArgs,
|
||||
@@ -1434,6 +1434,46 @@ app.post('/api/deleteFile', optionalJwt, async (req, res) => {
|
||||
res.send(wasDeleted);
|
||||
});
|
||||
|
||||
app.post('/api/deleteAllFiles', optionalJwt, async (req, res) => {
|
||||
const blacklistMode = false;
|
||||
const uuid = req.isAuthenticated() ? req.user.uid : null;
|
||||
|
||||
let files = null;
|
||||
let text_search = req.body.text_search;
|
||||
let file_type_filter = req.body.file_type_filter;
|
||||
|
||||
const filter_obj = {user_uid: uuid};
|
||||
const regex = true;
|
||||
if (text_search) {
|
||||
if (regex) {
|
||||
filter_obj['title'] = {$regex: `.*${text_search}.*`, $options: 'i'};
|
||||
} else {
|
||||
filter_obj['$text'] = { $search: utils.createEdgeNGrams(text_search) };
|
||||
}
|
||||
}
|
||||
|
||||
if (file_type_filter === 'audio_only') filter_obj['isAudio'] = true;
|
||||
else if (file_type_filter === 'video_only') filter_obj['isAudio'] = false;
|
||||
|
||||
files = await db_api.getRecords('files', filter_obj);
|
||||
|
||||
let file_count = await db_api.getRecords('files', filter_obj, true);
|
||||
let delete_count = 0;
|
||||
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
let wasDeleted = false;
|
||||
wasDeleted = await db_api.deleteFile(files[i].uid, uuid, blacklistMode);
|
||||
if (wasDeleted) {
|
||||
delete_count++;
|
||||
}
|
||||
}
|
||||
|
||||
res.send({
|
||||
file_count: file_count,
|
||||
delete_count: delete_count
|
||||
});
|
||||
});
|
||||
|
||||
app.post('/api/downloadFileFromServer', optionalJwt, async (req, res) => {
|
||||
let uid = req.body.uid;
|
||||
let uuid = req.body.uuid;
|
||||
@@ -1456,18 +1496,14 @@ app.post('/api/downloadFileFromServer', optionalJwt, async (req, res) => {
|
||||
}
|
||||
|
||||
// generate zip
|
||||
file_path_to_download = await utils.createContainerZipFile(playlist, playlist_files_to_download);
|
||||
file_path_to_download = await utils.createContainerZipFile(playlist['name'], playlist_files_to_download);
|
||||
} else if (sub_id && !uid) {
|
||||
zip_file_generated = true;
|
||||
const sub_files_to_download = [];
|
||||
const sub = subscriptions_api.getSubscription(sub_id, uuid);
|
||||
for (let i = 0; i < sub['videos'].length; i++) {
|
||||
const sub_file = sub['videos'][i];
|
||||
sub_files_to_download.push(sub_file);
|
||||
}
|
||||
const sub = await db_api.getRecord('subscriptions', {id: sub_id});
|
||||
const sub_files_to_download = await db_api.getRecords('files', {sub_id: sub_id});
|
||||
|
||||
// generate zip
|
||||
file_path_to_download = await utils.createContainerZipFile(sub, sub_files_to_download);
|
||||
file_path_to_download = await utils.createContainerZipFile(sub['name'], sub_files_to_download);
|
||||
} else {
|
||||
const file_obj = await db_api.getVideo(uid, uuid, sub_id)
|
||||
file_path_to_download = file_obj.path;
|
||||
|
||||
@@ -18,10 +18,19 @@ let JWT_EXPIRATION = null;
|
||||
let opts = null;
|
||||
let saltRounds = null;
|
||||
|
||||
exports.initialize = function() {
|
||||
exports.initialize = function () {
|
||||
/*************************
|
||||
* Authentication module
|
||||
************************/
|
||||
|
||||
if (db_api.database_initialized) {
|
||||
setupRoles();
|
||||
} else {
|
||||
db_api.database_initialized_bs.subscribe(init => {
|
||||
if (init) setupRoles();
|
||||
});
|
||||
}
|
||||
|
||||
saltRounds = 10;
|
||||
|
||||
JWT_EXPIRATION = config_api.getConfigItem('ytdl_jwt_expiration');
|
||||
@@ -49,6 +58,41 @@ exports.initialize = function() {
|
||||
}));
|
||||
}
|
||||
|
||||
const setupRoles = async () => {
|
||||
const required_roles = {
|
||||
admin: {
|
||||
permissions: [
|
||||
'filemanager',
|
||||
'settings',
|
||||
'subscriptions',
|
||||
'sharing',
|
||||
'advanced_download',
|
||||
'downloads_manager'
|
||||
]
|
||||
},
|
||||
user: {
|
||||
permissions: [
|
||||
'filemanager',
|
||||
'subscriptions',
|
||||
'sharing'
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
const role_keys = Object.keys(required_roles);
|
||||
for (let i = 0; i < role_keys.length; i++) {
|
||||
const role_key = role_keys[i];
|
||||
const role_in_db = await db_api.getRecord('roles', {key: role_key});
|
||||
if (!role_in_db) {
|
||||
// insert task metadata into table if missing
|
||||
await db_api.insertRecordIntoTable('roles', {
|
||||
key: role_key,
|
||||
permissions: required_roles[role_key]['permissions']
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exports.passport = require('passport');
|
||||
|
||||
exports.passport.serializeUser(function(user, done) {
|
||||
|
||||
@@ -85,6 +85,7 @@ exports.initialize = (input_db, input_users_db) => {
|
||||
}
|
||||
|
||||
exports.connectToDB = async (retries = 5, no_fallback = false, custom_connection_string = null) => {
|
||||
using_local_db = config_api.getConfigItem('ytdl_use_local_db'); // verify
|
||||
if (using_local_db && !custom_connection_string) return;
|
||||
const success = await exports._connectToDB(custom_connection_string);
|
||||
if (success) return true;
|
||||
@@ -496,6 +497,7 @@ exports.deleteFile = async (uid, uuid = null, blacklistMode = false) => {
|
||||
|
||||
let useYoutubeDLArchive = config_api.getConfigItem('ytdl_use_youtubedl_archive');
|
||||
if (useYoutubeDLArchive) {
|
||||
const usersFileFolder = config_api.getConfigItem('ytdl_users_base_path');
|
||||
const archive_path = uuid ? path.join(usersFileFolder, uuid, 'archives', `archive_${type}.txt`) : path.join('appdata', 'archives', `archive_${type}.txt`);
|
||||
|
||||
// get ID from JSON
|
||||
|
||||
@@ -3,7 +3,6 @@ const { uuid } = require('uuidv4');
|
||||
const path = require('path');
|
||||
const mergeFiles = require('merge-files');
|
||||
const NodeID3 = require('node-id3')
|
||||
const glob = require('glob')
|
||||
const Mutex = require('async-mutex').Mutex;
|
||||
|
||||
const youtubedl = require('youtube-dl');
|
||||
@@ -583,20 +582,26 @@ async function checkDownloadPercent(download_uid) {
|
||||
if (!resulting_file_size) return;
|
||||
|
||||
let sum_size = 0;
|
||||
glob(`{${files_to_check_for_progress.join(',')}, }*`, async (err, files) => {
|
||||
files.forEach(async file => {
|
||||
try {
|
||||
const file_stats = fs.statSync(file);
|
||||
if (file_stats && file_stats.size) {
|
||||
sum_size += file_stats.size;
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
for (let i = 0; i < files_to_check_for_progress.length; i++) {
|
||||
const file_to_check_for_progress = files_to_check_for_progress[i];
|
||||
const dir = path.dirname(file_to_check_for_progress);
|
||||
if (!fs.existsSync(dir)) continue;
|
||||
fs.readdir(dir, async (err, files) => {
|
||||
for (let j = 0; j < files.length; j++) {
|
||||
const file = files[j];
|
||||
if (!file.includes(path.basename(file_to_check_for_progress))) continue;
|
||||
try {
|
||||
const file_stats = fs.statSync(path.join(dir, file));
|
||||
if (file_stats && file_stats.size) {
|
||||
sum_size += file_stats.size;
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
const percent_complete = (sum_size/resulting_file_size * 100).toFixed(2);
|
||||
await db_api.updateRecord('download_queue', {uid: download_uid}, {percent_complete: percent_complete});
|
||||
});
|
||||
const percent_complete = (sum_size/resulting_file_size * 100).toFixed(2);
|
||||
await db_api.updateRecord('download_queue', {uid: download_uid}, {percent_complete: percent_complete});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
exports.generateNFOFile = (info, output_path) => {
|
||||
|
||||
940
backend/package-lock.json
generated
940
backend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -30,23 +30,21 @@
|
||||
},
|
||||
"homepage": "",
|
||||
"dependencies": {
|
||||
"archiver": "^3.1.1",
|
||||
"async": "^3.1.0",
|
||||
"archiver": "^5.3.1",
|
||||
"async": "^3.2.3",
|
||||
"async-mutex": "^0.3.1",
|
||||
"axios": "^0.21.2",
|
||||
"bcryptjs": "^2.4.0",
|
||||
"compression": "^1.7.4",
|
||||
"config": "^3.2.3",
|
||||
"exe": "^1.0.2",
|
||||
"express": "^4.17.1",
|
||||
"express": "^4.17.3",
|
||||
"fluent-ffmpeg": "^2.1.2",
|
||||
"fs-extra": "^9.0.0",
|
||||
"glob": "^7.1.6",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"lowdb": "^1.0.0",
|
||||
"md5": "^2.2.1",
|
||||
"merge-files": "^0.1.2",
|
||||
"mocha": "^8.4.0",
|
||||
"mocha": "^9.2.2",
|
||||
"moment": "^2.29.2",
|
||||
"mongodb": "^3.6.9",
|
||||
"multer": "^1.4.2",
|
||||
@@ -57,7 +55,7 @@
|
||||
"passport": "^0.4.1",
|
||||
"passport-http": "^0.3.0",
|
||||
"passport-jwt": "^4.0.0",
|
||||
"passport-ldapauth": "^2.1.4",
|
||||
"passport-ldapauth": "^3.0.1",
|
||||
"passport-local": "^1.0.0",
|
||||
"progress": "^2.0.3",
|
||||
"ps-node": "^0.1.6",
|
||||
@@ -66,7 +64,7 @@
|
||||
"shortid": "^2.2.15",
|
||||
"unzipper": "^0.10.10",
|
||||
"uuidv4": "^6.0.6",
|
||||
"winston": "^3.3.3",
|
||||
"winston": "^3.7.2",
|
||||
"xmlbuilder2": "^3.0.2",
|
||||
"youtube-dl": "^3.0.2"
|
||||
}
|
||||
|
||||
@@ -141,6 +141,7 @@ async function unsubscribe(sub, deleteMode, user_uid = null) {
|
||||
if (sub.archive && (await fs.pathExists(sub.archive))) {
|
||||
const archive_file_path = path.join(sub.archive, 'archive.txt');
|
||||
// deletes archive if it exists
|
||||
// TODO: Keep entries in blacklist_video.txt by moving them to a global blacklist
|
||||
if (await fs.pathExists(archive_file_path)) {
|
||||
await fs.unlink(archive_file_path);
|
||||
}
|
||||
@@ -266,11 +267,17 @@ async function getVideosForSub(sub, user_uid = null) {
|
||||
}
|
||||
resolve(false);
|
||||
} else if (output) {
|
||||
if (config_api.getConfigItem('ytdl_subscriptions_redownload_fresh_uploads')) {
|
||||
await setFreshUploads(sub, user_uid);
|
||||
checkVideosForFreshUploads(sub, user_uid);
|
||||
}
|
||||
|
||||
if (output.length === 0 || (output.length === 1 && output[0] === '')) {
|
||||
logger.verbose('No additional videos to download for ' + sub.name);
|
||||
resolve(true);
|
||||
return;
|
||||
}
|
||||
|
||||
const output_jsons = [];
|
||||
for (let i = 0; i < output.length; i++) {
|
||||
let output_json = null;
|
||||
@@ -294,14 +301,7 @@ async function getVideosForSub(sub, user_uid = null) {
|
||||
}
|
||||
|
||||
resolve(files_to_download);
|
||||
|
||||
if (config_api.getConfigItem('ytdl_subscriptions_redownload_fresh_uploads')) {
|
||||
await setFreshUploads(sub, user_uid);
|
||||
checkVideosForFreshUploads(sub, user_uid);
|
||||
}
|
||||
|
||||
resolve(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, err => {
|
||||
logger.error(err);
|
||||
@@ -380,7 +380,11 @@ async function generateArgsForSubscription(sub, user_uid, redownload = false, de
|
||||
if (useArchive && !redownload) {
|
||||
if (sub.archive) {
|
||||
archive_dir = sub.archive;
|
||||
archive_path = path.join(archive_dir, 'archive.txt')
|
||||
if (sub.type && sub.type === 'audio') {
|
||||
archive_path = path.join(archive_dir, 'merged_audio.txt');
|
||||
} else {
|
||||
archive_path = path.join(archive_dir, 'merged_video.txt');
|
||||
}
|
||||
}
|
||||
downloadConfig.push('--download-archive', archive_path);
|
||||
}
|
||||
@@ -473,22 +477,24 @@ async function updateSubscriptionProperty(sub, assignment_obj) {
|
||||
return true;
|
||||
}
|
||||
|
||||
async function setFreshUploads(sub, user_uid) {
|
||||
async function setFreshUploads(sub) {
|
||||
const sub_files = await db_api.getRecords('files', {sub_id: sub.id});
|
||||
const current_date = new Date().toISOString().split('T')[0].replace(/-/g, '');
|
||||
sub.videos.forEach(async video => {
|
||||
if (current_date === video['upload_date'].replace(/-/g, '')) {
|
||||
sub_files.forEach(async file => {
|
||||
if (current_date === file['upload_date'].replace(/-/g, '')) {
|
||||
// set upload as fresh
|
||||
const video_uid = video['uid'];
|
||||
await db_api.setVideoProperty(video_uid, {'fresh_upload': true}, user_uid, sub['id']);
|
||||
const file_uid = file['uid'];
|
||||
await db_api.setVideoProperty(file_uid, {'fresh_upload': true});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function checkVideosForFreshUploads(sub, user_uid) {
|
||||
const sub_files = await db_api.getRecords('files', {sub_id: sub.id});
|
||||
const current_date = new Date().toISOString().split('T')[0].replace(/-/g, '');
|
||||
sub.videos.forEach(async video => {
|
||||
if (video['fresh_upload'] && current_date > video['upload_date'].replace(/-/g, '')) {
|
||||
await checkVideoIfBetterExists(video, sub, user_uid)
|
||||
sub_files.forEach(async file => {
|
||||
if (file['fresh_upload'] && current_date > file['upload_date'].replace(/-/g, '')) {
|
||||
await checkVideoIfBetterExists(file, sub, user_uid)
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -510,13 +516,13 @@ async function checkVideoIfBetterExists(file_obj, sub, user_uid) {
|
||||
logger.verbose(`Failed to download better version of video ${file_obj['id']}`);
|
||||
} else if (output) {
|
||||
logger.verbose(`Successfully upgraded video ${file_obj['id']}'s ${metric_to_compare} from ${file_obj[metric_to_compare]} to ${output[metric_to_compare]}`);
|
||||
await db_api.setVideoProperty(file_obj['uid'], {[metric_to_compare]: output[metric_to_compare]}, user_uid, sub['id']);
|
||||
await db_api.setVideoProperty(file_obj['uid'], {[metric_to_compare]: output[metric_to_compare]});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
await db_api.setVideoProperty(file_obj['uid'], {'fresh_upload': false}, user_uid, sub['id']);
|
||||
await db_api.setVideoProperty(file_obj['uid'], {'fresh_upload': false});
|
||||
}
|
||||
|
||||
// helper functions
|
||||
|
||||
@@ -42,9 +42,9 @@ function scheduleJob(task_key, schedule) {
|
||||
if (schedule['type'] === 'timestamp') {
|
||||
converted_schedule = new Date(schedule['data']['timestamp']);
|
||||
} else if (schedule['type'] === 'recurring') {
|
||||
const dayOfWeek = schedule['data']['dayOfWeek'] ? schedule['data']['dayOfWeek'] : null;
|
||||
const hour = schedule['data']['hour'] ? schedule['data']['hour'] : null;
|
||||
const minute = schedule['data']['minute'] ? schedule['data']['minute'] : null;
|
||||
const dayOfWeek = schedule['data']['dayOfWeek'] != null ? schedule['data']['dayOfWeek'] : null;
|
||||
const hour = schedule['data']['hour'] != null ? schedule['data']['hour'] : null;
|
||||
const minute = schedule['data']['minute'] != null ? schedule['data']['minute'] : null;
|
||||
converted_schedule = new scheduler.RecurrenceRule(null, null, null, dayOfWeek, hour, minute);
|
||||
} else {
|
||||
logger.error(`Failed to schedule job '${task_key}' as the type '${schedule['type']}' is invalid.`)
|
||||
|
||||
@@ -58,13 +58,13 @@ async function getDownloadedFilesByType(basePath, type, full_metadata = false) {
|
||||
return files;
|
||||
}
|
||||
|
||||
async function createContainerZipFile(container_obj, container_file_objs) {
|
||||
async function createContainerZipFile(file_name, container_file_objs) {
|
||||
const container_files_to_download = [];
|
||||
for (let i = 0; i < container_file_objs.length; i++) {
|
||||
const container_file_obj = container_file_objs[i];
|
||||
container_files_to_download.push(container_file_obj.path);
|
||||
}
|
||||
return await createZipFile(path.join('appdata', container_obj.name + '.zip'), container_files_to_download);
|
||||
return await createZipFile(path.join('appdata', file_name + '.zip'), container_files_to_download);
|
||||
}
|
||||
|
||||
async function createZipFile(zip_file_path, file_paths) {
|
||||
|
||||
43
docker-build.sh
Normal file
43
docker-build.sh
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
|
||||
# THANK YOU TALULAH (https://github.com/nottalulah) for your help in figuring this out
|
||||
# and also optimizing some code with this commit.
|
||||
# xoxo :D
|
||||
|
||||
case $(uname -m) in
|
||||
x86_64)
|
||||
ARCH=amd64;;
|
||||
aarch64)
|
||||
ARCH=arm64;;
|
||||
armhf)
|
||||
ARCH=armhf;;
|
||||
armv7)
|
||||
ARCH=armel;;
|
||||
armv7l)
|
||||
ARCH=armel;;
|
||||
*)
|
||||
echo "Unsupported architecture: $(uname -m)"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
echo "(INFO) Architecture detected: $ARCH"
|
||||
echo "(1/5) READY - Acquire temp dependencies in ffmpeg obtain layer"
|
||||
apt-get update && apt-get -y install curl xz-utils
|
||||
echo "(2/5) DOWNLOAD - Acquire latest ffmpeg and ffprobe from John van Sickle's master-sourced builds in ffmpeg obtain layer"
|
||||
curl -o ffmpeg.txz \
|
||||
--connect-timeout 5 \
|
||||
--max-time 10 \
|
||||
--retry 5 \
|
||||
--retry-delay 0 \
|
||||
--retry-max-time 40 \
|
||||
"https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-${ARCH}-static.tar.xz"
|
||||
mkdir /tmp/ffmpeg
|
||||
tar xf ffmpeg.txz -C /tmp/ffmpeg
|
||||
echo "(3/5) CLEANUP - Remove temp dependencies from ffmpeg obtain layer"
|
||||
apt-get -y remove curl xz-utils
|
||||
apt-get -y autoremove
|
||||
echo "(4/5) PROVISION - Provide ffmpeg and ffprobe from ffmpeg obtain layer"
|
||||
cp /tmp/ffmpeg/*/ffmpeg /usr/local/bin/ffmpeg
|
||||
cp /tmp/ffmpeg/*/ffprobe /usr/local/bin/ffprobe
|
||||
echo "(5/5) CLEANUP - Remove temporary downloads from ffmpeg obtain layer"
|
||||
rm -rf /tmp/ffmpeg ffmpeg.txz
|
||||
@@ -7,6 +7,8 @@ services:
|
||||
ytdl_use_local_db: 'false'
|
||||
write_ytdl_config: 'true'
|
||||
restart: always
|
||||
depends_on:
|
||||
- ytdl-mongo-db
|
||||
volumes:
|
||||
- ./appdata:/app/appdata
|
||||
- ./audio:/app/audio
|
||||
@@ -23,5 +25,6 @@ services:
|
||||
logging:
|
||||
driver: "none"
|
||||
container_name: mongo-db
|
||||
restart: always
|
||||
volumes:
|
||||
- ./db/:/data/db
|
||||
11845
package-lock.json
generated
11845
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
50
package.json
50
package.json
@@ -5,7 +5,7 @@
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build --prod",
|
||||
"build": "ng build --configuration production",
|
||||
"prebuild": "node src/postbuild.mjs",
|
||||
"heroku-postbuild": "npm install --prefix backend",
|
||||
"test": "ng test",
|
||||
@@ -20,44 +20,44 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular-devkit/core": "^11.0.4",
|
||||
"@angular/animations": "^11.0.4",
|
||||
"@angular/cdk": "^11.0.2",
|
||||
"@angular/common": "^11.0.4",
|
||||
"@angular/compiler": "^11.0.4",
|
||||
"@angular/core": "^11.0.4",
|
||||
"@angular/forms": "^11.0.4",
|
||||
"@angular/localize": "^11.0.4",
|
||||
"@angular/material": "^11.0.2",
|
||||
"@angular/platform-browser": "^11.0.4",
|
||||
"@angular/platform-browser-dynamic": "^11.0.4",
|
||||
"@angular/router": "^11.0.4",
|
||||
"@angular-devkit/core": "^13.3.3",
|
||||
"@angular/animations": "^13.3.4",
|
||||
"@angular/cdk": "^13.3.4",
|
||||
"@angular/common": "^13.3.4",
|
||||
"@angular/compiler": "^13.3.4",
|
||||
"@angular/core": "^13.3.4",
|
||||
"@angular/forms": "^13.3.4",
|
||||
"@angular/localize": "^13.3.4",
|
||||
"@angular/material": "^13.3.4",
|
||||
"@angular/platform-browser": "^13.3.4",
|
||||
"@angular/platform-browser-dynamic": "^13.3.4",
|
||||
"@angular/router": "^13.3.4",
|
||||
"@fontsource/material-icons": "^4.5.4",
|
||||
"@ngneat/content-loader": "^5.0.0",
|
||||
"@videogular/ngx-videogular": "^2.1.0",
|
||||
"@videogular/ngx-videogular": "^5.0.1",
|
||||
"core-js": "^2.4.1",
|
||||
"crypto-js": "^4.1.1",
|
||||
"file-saver": "^2.0.2",
|
||||
"filesize": "^6.1.0",
|
||||
"fingerprintjs2": "^2.1.0",
|
||||
"fs-extra": "^10.0.0",
|
||||
"material-icons": "^0.5.4",
|
||||
"material-icons": "^1.10.8",
|
||||
"nan": "^2.14.1",
|
||||
"ng-lazyload-image": "^7.0.1",
|
||||
"ngx-avatar": "^4.0.0",
|
||||
"ngx-file-drop": "^9.0.1",
|
||||
"ngx-avatars": "^1.3.1",
|
||||
"ngx-file-drop": "^13.0.0",
|
||||
"rxjs": "^6.6.3",
|
||||
"rxjs-compat": "^6.0.0-rc.0",
|
||||
"tslib": "^2.0.0",
|
||||
"typescript": "~4.0.5",
|
||||
"web-animations-js": "^2.3.2",
|
||||
"typescript": "~4.6.3",
|
||||
"xliff-to-json": "^1.0.4",
|
||||
"zone.js": "~0.10.2"
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^0.1100.4",
|
||||
"@angular/cli": "^11.0.4",
|
||||
"@angular/compiler-cli": "^11.0.4",
|
||||
"@angular/language-service": "^11.0.4",
|
||||
"@angular-devkit/build-angular": "^13.3.3",
|
||||
"@angular/cli": "^13.3.3",
|
||||
"@angular/compiler-cli": "^13.3.4",
|
||||
"@angular/language-service": "^13.3.4",
|
||||
"@types/core-js": "^2.5.2",
|
||||
"@types/file-saver": "^2.0.1",
|
||||
"@types/jasmine": "~3.6.0",
|
||||
@@ -75,7 +75,7 @@
|
||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||
"karma-jasmine": "~4.0.0",
|
||||
"karma-jasmine-html-reporter": "^1.5.0",
|
||||
"openapi-typescript-codegen": "^0.4.11",
|
||||
"openapi-typescript-codegen": "^0.21.0",
|
||||
"protractor": "~7.0.0",
|
||||
"ts-node": "~3.0.4",
|
||||
"tslint": "~6.1.0"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/* Coolors Exported Palette - coolors.co/e8aeb7-b8e1ff-a9fff7-94fbab-82aba1 */
|
||||
|
||||
/* HSL */
|
||||
$color1: hsla(351%, 56%, 80%, 1);
|
||||
$softblue: hsla(205%, 100%, 86%, 1);
|
||||
$color3: hsla(174%, 100%, 83%, 1);
|
||||
$color4: hsla(133%, 93%, 78%, 1);
|
||||
$color5: hsla(165%, 20%, 59%, 1);
|
||||
$color1: hsla(351, 56%, 80%, 1);
|
||||
$softblue: hsla(205, 100%, 86%, 1);
|
||||
$color3: hsla(174, 100%, 83%, 1);
|
||||
$color4: hsla(133, 93%, 78%, 1);
|
||||
$color5: hsla(165, 20%, 59%, 1);
|
||||
|
||||
/* RGB */
|
||||
$color1: rgba(232, 174, 183, 1);
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</ng-container>
|
||||
<ng-container *ngIf="postsService.config && allowSubscriptions && postsService.subscriptions && postsService.hasPermission('subscriptions')">
|
||||
<mat-divider *ngIf="postsService.subscriptions.length > 0"></mat-divider>
|
||||
<a *ngFor="let subscription of postsService.subscriptions" mat-list-item (click)="postsService.sidepanel_mode === 'over' ? sidenav.close() : null" [routerLink]="['/subscription', { id: subscription.id }]"><ngx-avatar [style.margin-right]="'10px'" size="32" [name]="subscription.name"></ngx-avatar>{{subscription.name}}</a>
|
||||
<a *ngFor="let subscription of postsService.subscriptions" mat-list-item (click)="postsService.sidepanel_mode === 'over' ? sidenav.close() : null" [routerLink]="['/subscription', { id: subscription.id }]"><ngx-avatars [style.margin-right]="'10px'" size="32" [name]="subscription.name"></ngx-avatars>{{subscription.name}}</a>
|
||||
</ng-container>
|
||||
</mat-nav-list>
|
||||
</mat-sidenav>
|
||||
|
||||
@@ -45,8 +45,6 @@ import { VgBufferingModule } from '@videogular/ngx-videogular/buffering';
|
||||
import { VgOverlayPlayModule } from '@videogular/ngx-videogular/overlay-play';
|
||||
import { VgCoreModule } from '@videogular/ngx-videogular/core';
|
||||
import { InputDialogComponent } from './input-dialog/input-dialog.component';
|
||||
import { LazyLoadImageModule, IsVisibleProps } from 'ng-lazyload-image';
|
||||
import { audioFilesMouseHovering, videoFilesMouseHovering, audioFilesOpened, videoFilesOpened } from './main/main.component';
|
||||
import { CreatePlaylistComponent } from './create-playlist/create-playlist.component';
|
||||
import { SubscriptionsComponent } from './subscriptions/subscriptions.component';
|
||||
import { SubscribeDialogComponent } from './dialogs/subscribe-dialog/subscribe-dialog.component';
|
||||
@@ -56,7 +54,7 @@ import { SubscriptionInfoDialogComponent } from './dialogs/subscription-info-dia
|
||||
import { SettingsComponent } from './settings/settings.component';
|
||||
import { MatChipsModule } from '@angular/material/chips';
|
||||
import { NgxFileDropModule } from 'ngx-file-drop';
|
||||
import { AvatarModule } from 'ngx-avatar';
|
||||
import { AvatarModule } from 'ngx-avatars';
|
||||
import { ContentLoaderModule } from '@ngneat/content-loader';
|
||||
|
||||
import es from '@angular/common/locales/es';
|
||||
@@ -94,122 +92,110 @@ import { RestoreDbDialogComponent } from './dialogs/restore-db-dialog/restore-db
|
||||
|
||||
registerLocaleData(es, 'es');
|
||||
|
||||
export function isVisible({ event, element, scrollContainer, offset }: IsVisibleProps<any>) {
|
||||
return (element.id === 'video' ? videoFilesMouseHovering || videoFilesOpened : audioFilesMouseHovering || audioFilesOpened);
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
MainComponent,
|
||||
PlayerComponent,
|
||||
InputDialogComponent,
|
||||
CreatePlaylistComponent,
|
||||
SubscriptionsComponent,
|
||||
SubscribeDialogComponent,
|
||||
SubscriptionComponent,
|
||||
SubscriptionFileCardComponent,
|
||||
SubscriptionInfoDialogComponent,
|
||||
SettingsComponent,
|
||||
AboutDialogComponent,
|
||||
VideoInfoDialogComponent,
|
||||
ArgModifierDialogComponent,
|
||||
HighlightPipe,
|
||||
LinkifyPipe,
|
||||
UpdaterComponent,
|
||||
UpdateProgressDialogComponent,
|
||||
ShareMediaDialogComponent,
|
||||
LoginComponent,
|
||||
DownloadsComponent,
|
||||
UserProfileDialogComponent,
|
||||
SetDefaultAdminDialogComponent,
|
||||
ModifyUsersComponent,
|
||||
AddUserDialogComponent,
|
||||
ManageUserComponent,
|
||||
ManageRoleComponent,
|
||||
CookiesUploaderDialogComponent,
|
||||
LogsViewerComponent,
|
||||
ModifyPlaylistComponent,
|
||||
ConfirmDialogComponent,
|
||||
UnifiedFileCardComponent,
|
||||
RecentVideosComponent,
|
||||
EditSubscriptionDialogComponent,
|
||||
CustomPlaylistsComponent,
|
||||
EditCategoryDialogComponent,
|
||||
TwitchChatComponent,
|
||||
SeeMoreComponent,
|
||||
ConcurrentStreamComponent,
|
||||
SkipAdButtonComponent,
|
||||
TasksComponent,
|
||||
UpdateTaskScheduleDialogComponent,
|
||||
RestoreDbDialogComponent
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
BrowserModule,
|
||||
BrowserAnimationsModule,
|
||||
MatNativeDateModule,
|
||||
MatRadioModule,
|
||||
FormsModule,
|
||||
MatInputModule,
|
||||
MatSelectModule,
|
||||
ReactiveFormsModule,
|
||||
HttpClientModule,
|
||||
MatToolbarModule,
|
||||
MatCardModule,
|
||||
MatSnackBarModule,
|
||||
MatButtonModule,
|
||||
MatCheckboxModule,
|
||||
MatSidenavModule,
|
||||
MatIconModule,
|
||||
MatListModule,
|
||||
MatGridListModule,
|
||||
MatExpansionModule,
|
||||
MatProgressBarModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatButtonToggleModule,
|
||||
MatRippleModule,
|
||||
MatMenuModule,
|
||||
MatDialogModule,
|
||||
MatSlideToggleModule,
|
||||
MatAutocompleteModule,
|
||||
MatTabsModule,
|
||||
MatTooltipModule,
|
||||
MatPaginatorModule,
|
||||
MatSortModule,
|
||||
MatTableModule,
|
||||
MatDatepickerModule,
|
||||
MatChipsModule,
|
||||
DragDropModule,
|
||||
ClipboardModule,
|
||||
TextFieldModule,
|
||||
NgxFileDropModule,
|
||||
AvatarModule,
|
||||
ContentLoaderModule,
|
||||
VgCoreModule,
|
||||
VgControlsModule,
|
||||
VgOverlayPlayModule,
|
||||
VgBufferingModule,
|
||||
LazyLoadImageModule.forRoot({ isVisible }),
|
||||
RouterModule,
|
||||
AppRoutingModule,
|
||||
],
|
||||
entryComponents: [
|
||||
InputDialogComponent,
|
||||
CreatePlaylistComponent,
|
||||
SubscribeDialogComponent,
|
||||
SubscriptionInfoDialogComponent,
|
||||
SettingsComponent
|
||||
],
|
||||
providers: [
|
||||
PostsService,
|
||||
{ provide: HTTP_INTERCEPTORS, useClass: H401Interceptor, multi: true }
|
||||
],
|
||||
exports: [
|
||||
HighlightPipe,
|
||||
LinkifyPipe
|
||||
],
|
||||
bootstrap: [AppComponent]
|
||||
declarations: [
|
||||
AppComponent,
|
||||
MainComponent,
|
||||
PlayerComponent,
|
||||
InputDialogComponent,
|
||||
CreatePlaylistComponent,
|
||||
SubscriptionsComponent,
|
||||
SubscribeDialogComponent,
|
||||
SubscriptionComponent,
|
||||
SubscriptionFileCardComponent,
|
||||
SubscriptionInfoDialogComponent,
|
||||
SettingsComponent,
|
||||
AboutDialogComponent,
|
||||
VideoInfoDialogComponent,
|
||||
ArgModifierDialogComponent,
|
||||
HighlightPipe,
|
||||
LinkifyPipe,
|
||||
UpdaterComponent,
|
||||
UpdateProgressDialogComponent,
|
||||
ShareMediaDialogComponent,
|
||||
LoginComponent,
|
||||
DownloadsComponent,
|
||||
UserProfileDialogComponent,
|
||||
SetDefaultAdminDialogComponent,
|
||||
ModifyUsersComponent,
|
||||
AddUserDialogComponent,
|
||||
ManageUserComponent,
|
||||
ManageRoleComponent,
|
||||
CookiesUploaderDialogComponent,
|
||||
LogsViewerComponent,
|
||||
ModifyPlaylistComponent,
|
||||
ConfirmDialogComponent,
|
||||
UnifiedFileCardComponent,
|
||||
RecentVideosComponent,
|
||||
EditSubscriptionDialogComponent,
|
||||
CustomPlaylistsComponent,
|
||||
EditCategoryDialogComponent,
|
||||
TwitchChatComponent,
|
||||
SeeMoreComponent,
|
||||
ConcurrentStreamComponent,
|
||||
SkipAdButtonComponent,
|
||||
TasksComponent,
|
||||
UpdateTaskScheduleDialogComponent,
|
||||
RestoreDbDialogComponent
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
BrowserModule,
|
||||
BrowserAnimationsModule,
|
||||
MatNativeDateModule,
|
||||
MatRadioModule,
|
||||
FormsModule,
|
||||
MatInputModule,
|
||||
MatSelectModule,
|
||||
ReactiveFormsModule,
|
||||
HttpClientModule,
|
||||
MatToolbarModule,
|
||||
MatCardModule,
|
||||
MatSnackBarModule,
|
||||
MatButtonModule,
|
||||
MatCheckboxModule,
|
||||
MatSidenavModule,
|
||||
MatIconModule,
|
||||
MatListModule,
|
||||
MatGridListModule,
|
||||
MatExpansionModule,
|
||||
MatProgressBarModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatButtonToggleModule,
|
||||
MatRippleModule,
|
||||
MatMenuModule,
|
||||
MatDialogModule,
|
||||
MatSlideToggleModule,
|
||||
MatAutocompleteModule,
|
||||
MatTabsModule,
|
||||
MatTooltipModule,
|
||||
MatPaginatorModule,
|
||||
MatSortModule,
|
||||
MatTableModule,
|
||||
MatDatepickerModule,
|
||||
MatChipsModule,
|
||||
DragDropModule,
|
||||
ClipboardModule,
|
||||
TextFieldModule,
|
||||
NgxFileDropModule,
|
||||
AvatarModule,
|
||||
ContentLoaderModule,
|
||||
VgCoreModule,
|
||||
VgControlsModule,
|
||||
VgOverlayPlayModule,
|
||||
VgBufferingModule,
|
||||
RouterModule,
|
||||
AppRoutingModule,
|
||||
],
|
||||
providers: [
|
||||
PostsService,
|
||||
{ provide: HTTP_INTERCEPTORS, useClass: H401Interceptor, multi: true }
|
||||
],
|
||||
exports: [
|
||||
HighlightPipe,
|
||||
LinkifyPipe
|
||||
],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
|
||||
export class AppModule { }
|
||||
|
||||
@@ -42,6 +42,11 @@ export class ConcurrentStreamComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
if (this.check_timeout) { clearInterval(this.check_timeout); }
|
||||
if (this.update_timeout) { clearInterval(this.update_timeout); }
|
||||
}
|
||||
|
||||
startServer() {
|
||||
this.started = true;
|
||||
this.server_started = true;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<span class="text" [ngStyle]="{'-webkit-line-clamp': !see_more_active ? line_limit : null}" [innerHTML]="text | linkify"></span>
|
||||
<span>
|
||||
<a [routerLink]="" (click)="toggleSeeMore()">
|
||||
<a [routerLink]="[]" (click)="toggleSeeMore()">
|
||||
<ng-container *ngIf="!see_more_active" i18n="See more">
|
||||
See more.
|
||||
</ng-container>
|
||||
|
||||
@@ -62,7 +62,7 @@ export class SkipAdButtonComponent implements OnInit {
|
||||
|
||||
getVideoIDHashFromURL(video_id) {
|
||||
if (!video_id) return null;
|
||||
return CryptoJS.SHA256(video_id).toString(CryptoJS.enc.Hex);;
|
||||
return CryptoJS.SHA256(video_id).toString(CryptoJS.enc.Hex);
|
||||
}
|
||||
|
||||
getVideoIDFromURL(url) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AfterViewInit, Component, ElementRef, Input, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';
|
||||
import { Component, ElementRef, Input, OnDestroy, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';
|
||||
import { PostsService } from 'app/posts.services';
|
||||
|
||||
@Component({
|
||||
@@ -6,7 +6,7 @@ import { PostsService } from 'app/posts.services';
|
||||
templateUrl: './twitch-chat.component.html',
|
||||
styleUrls: ['./twitch-chat.component.scss']
|
||||
})
|
||||
export class TwitchChatComponent implements OnInit, AfterViewInit {
|
||||
export class TwitchChatComponent implements OnInit, OnDestroy {
|
||||
|
||||
full_chat = null;
|
||||
visible_chat = null;
|
||||
@@ -33,7 +33,8 @@ export class TwitchChatComponent implements OnInit, AfterViewInit {
|
||||
this.getFullChat();
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
ngOnDestroy(): void {
|
||||
if (this.chat_check_interval_obj) { clearInterval(this.chat_check_interval_obj); }
|
||||
}
|
||||
|
||||
private isUserNearBottom(): boolean {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { Schedule } from 'api-types';
|
||||
import { Schedule, Task } from 'api-types';
|
||||
import { PostsService } from 'app/posts.services';
|
||||
|
||||
@Component({
|
||||
@@ -18,7 +18,7 @@ export class UpdateTaskScheduleDialogComponent implements OnInit {
|
||||
date = null;
|
||||
today = new Date();
|
||||
|
||||
constructor(@Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef<UpdateTaskScheduleDialogComponent>, private postsService: PostsService) {
|
||||
constructor(@Inject(MAT_DIALOG_DATA) public data: {task: Task}, private dialogRef: MatDialogRef<UpdateTaskScheduleDialogComponent>, private postsService: PostsService) {
|
||||
this.processTask(this.data.task);
|
||||
this.postsService.getTask(this.data.task.key).subscribe(res => {
|
||||
this.processTask(res['task']);
|
||||
@@ -28,7 +28,7 @@ export class UpdateTaskScheduleDialogComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
processTask(task) {
|
||||
processTask(task: Task): void {
|
||||
if (!task['schedule']) {
|
||||
this.enabled = false;
|
||||
return;
|
||||
@@ -39,7 +39,11 @@ export class UpdateTaskScheduleDialogComponent implements OnInit {
|
||||
this.recurring = schedule['type'] === Schedule.type.RECURRING;
|
||||
|
||||
if (this.recurring) {
|
||||
this.time = `${schedule['data']['hour']}:${schedule['data']['minute']}`;
|
||||
const hour = schedule['data']['hour'];
|
||||
const minute = schedule['data']['minute'];
|
||||
|
||||
// add padding 0s if necessary to hours and minutes
|
||||
this.time = (hour < 10 ? '0' : '') + hour + ':' + (minute < 10 ? '0' : '') + minute;
|
||||
|
||||
if (schedule['data']['dayOfWeek']) {
|
||||
this.days_of_week = schedule['data']['dayOfWeek'];
|
||||
@@ -75,7 +79,6 @@ export class UpdateTaskScheduleDialogComponent implements OnInit {
|
||||
}
|
||||
} else {
|
||||
this.date.setHours(hours, minutes);
|
||||
console.log(this.date);
|
||||
schedule['data'] = {timestamp: this.date.getTime()};
|
||||
}
|
||||
this.dialogRef.close(schedule);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import {Injectable, isDevMode, Inject} from '@angular/core';
|
||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
import 'rxjs/add/operator/map';
|
||||
import 'rxjs/add/operator/map';
|
||||
import 'rxjs/add/operator/catch';
|
||||
import 'rxjs/add/observable/throw';
|
||||
import { THEMES_CONFIG } from '../themes';
|
||||
|
||||
@@ -445,7 +445,7 @@ export const isoLangs = {
|
||||
'name': 'Navajo, Navaho',
|
||||
'nativeName': 'Diné bizaad, Dinékʼehǰí'
|
||||
},
|
||||
'nb': {
|
||||
'nb-NO': {
|
||||
'name': 'Norwegian Bokmål',
|
||||
'nativeName': 'Norsk bokmål',
|
||||
'ngID': 'nb'
|
||||
|
||||
@@ -49,8 +49,10 @@ export class SubscriptionComponent implements OnInit, OnDestroy {
|
||||
constructor(private postsService: PostsService, private route: ActivatedRoute, private router: Router, private dialog: MatDialog) { }
|
||||
|
||||
ngOnInit() {
|
||||
if (this.route.snapshot.paramMap.get('id')) {
|
||||
this.id = this.route.snapshot.paramMap.get('id');
|
||||
this.route.params.subscribe(params => {
|
||||
this.id = params['id'];
|
||||
|
||||
if (this.sub_interval) { clearInterval(this.sub_interval); }
|
||||
|
||||
this.postsService.service_initialized.subscribe(init => {
|
||||
if (init) {
|
||||
@@ -59,7 +61,7 @@ export class SubscriptionComponent implements OnInit, OnDestroy {
|
||||
this.sub_interval = setInterval(() => this.getSubscription(true), 1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// set filter property to cached
|
||||
const cached_filter_property = localStorage.getItem('filter_property');
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,222 +0,0 @@
|
||||
{
|
||||
"17f0ea5d2d7a262b0e875acc70475f102aee84e6": "Opprett en spilleliste",
|
||||
"cff1428d10d59d14e45edec3c735a27b5482db59": "Navn",
|
||||
"f0baeb8b69d120073b6d60d34785889b0c3232c8": "Lyd",
|
||||
"2d1ea268a6a9f483dbc2cbfe19bf4256a57a6af4": "Video",
|
||||
"f61c6867295f3b53d23557021f2f4e0aa1d0b8fc": "Type",
|
||||
"f47e2d56dd8a145b2e9599da9730c049d52962a2": "Lydfiler",
|
||||
"a52dae09be10ca3a65da918533ced3d3f4992238": "Videoer",
|
||||
"d9e83ac17026e70ef6e9c0f3240a3b2450367f40": "Endre youtube-dl-argumenter",
|
||||
"7fc1946abe2b40f60059c6cd19975d677095fd19": "Simulerte nye argumenter",
|
||||
"0b71824ae71972f236039bed43f8d2323e8fd570": "Legg til argument",
|
||||
"c8b0e59eb491f2ac7505f0fbab747062e6b32b23": "Søk etter kategori",
|
||||
"9eeb91caef5a50256dd87e1c4b7b3e8216479377": "Bruk argument-verdi",
|
||||
"25d8ad5eba2ec24e68295a27d6a4bb9b49e3dacd": "Argument-verdi",
|
||||
"7de2451ed3fb8d8b847979bd3f0c740b970f167b": "Legg til argument",
|
||||
"d7b35c384aecd25a516200d6921836374613dfe7": "Avbryt",
|
||||
"b2623aee44b70c9a4ba1fce16c8a593b0a4c7974": "Endre",
|
||||
"a38ae1082fec79ba1f379978337385a539a28e73": "Kvalitet",
|
||||
"4be966a9dcfbc9b54dfcc604b831c0289f847fa4": "Bruk nettadresse",
|
||||
"d3f02f845e62cebd75fde451ab8479d2a8ad784d": "Vis",
|
||||
"4a9889d36910edc8323d7bab60858ab3da6d91df": "Kun lyd",
|
||||
"96a01fafe135afc58b0f8071a4ab00234495ce18": "Multi-nedlastingsmodus",
|
||||
"6a21ba5fb0ac804a525bf9ab168038c3ee88e661": "Last ned",
|
||||
"6a3777f913cf3f288664f0632b9f24794fdcc24e": "Avbryt",
|
||||
"322ed150e02666fe2259c5b4614eac7066f4ffa0": "Avansert",
|
||||
"b7ffe7c6586d6f3f18a9246806a7c7d5538ab43e": "Simulert kommando:",
|
||||
"4e4c721129466be9c3862294dc40241b64045998": "Bruk egendefinerte argumenter:",
|
||||
"ad2f8ac8b7de7945b80c8e424484da94e597125f": "Egendefinerte argumenter",
|
||||
"a6911c2157f1b775284bbe9654ce5eb30cf45d7f": "Du trenger ikke å inkludere nettadressen, kun alt etter. Argumenter skilles ved bruk av to komma, slik: ,,",
|
||||
"3a92a3443c65a52f37ca7efb8f453b35dbefbf29": "Bruk defendefinert utdata",
|
||||
"d9c02face477f2f9cdaae318ccee5f89856851fb": "Egendefinert utdata",
|
||||
"fcfd4675b4c90f08d18d3abede9a9a4dff4cfdc7": "Dokumentasjon",
|
||||
"19d1ae64d94d28a29b2c57ae8671aace906b5401": "Sti er relativ til oppsettsnedlastingsstien. Ikke inkluder utvidelse.",
|
||||
"8fad10737d3e3735a6699a4d89cbf6c20f6bb55f": "Bruk identitetsbekreftelse",
|
||||
"08c74dc9762957593b91f6eb5d65efdfc975bf48": "Brukernavn",
|
||||
"c32ef07f8803a223a83ed17024b38e8d82292407": "Passord",
|
||||
"616e206cb4f25bd5885fc35925365e43cf5fb929": "Navn:",
|
||||
"c52db455cca9109ee47e1a612c3f4117c09eb71b": "Nettadresse:",
|
||||
"c6eb45d085384903e53ab001a3513d1de6a1dbac": "Opplaster:",
|
||||
"109c6f4a5e46efb933612ededfaf52a13178b7e0": "Filstørrelse:",
|
||||
"bd630d8669b16e5f264ec4649d9b469fe03e5ff4": "Sti:",
|
||||
"a67e7d843cef735c79d5ef1c8ba4af3e758912bb": "Opplastingsdato:",
|
||||
"f4e529ae5ffd73001d1ff4bbdeeb0a72e342e5c8": "Lukk",
|
||||
"4f389e41e4592f7f9bb76abdd8af4afdfb13f4f1": "Endre spilleliste",
|
||||
"511b600ae4cf037e4eb3b7a58410842cd5727490": "Legg til mer innhold",
|
||||
"52c9a103b812f258bcddc3d90a6e3f46871d25fe": "Lagre",
|
||||
"ca3dbbc7f3e011bffe32a10a3ea45cc84f30ecf1": "ID:",
|
||||
"e684046d73bcee88e82f7ff01e2852789a05fc32": "Antall:",
|
||||
"28f86ffd419b869711aa13f5e5ff54be6d70731c": "Rediger",
|
||||
"826b25211922a1b46436589233cb6f1a163d89b7": "Slett",
|
||||
"321e4419a943044e674beb55b8039f42a9761ca5": "Info",
|
||||
"34504b488c24c27e68089be549f0eeae6ebaf30b": "Slett og svartelist",
|
||||
"ebadf946ae90f13ecd0c70f09edbc0f983af8a0f": "Last opp nye kaker",
|
||||
"98a8a42e5efffe17ab786636ed0139b4c7032d0e": "Dra og slipp",
|
||||
"a8b7b9c168fd936a75e500806a8c0d7755ef1198": "Merk: Oppasting av nye kaker overskriver tidligere. Merk deg også at kaker gjelder for hele instansen, ikke per bruker.",
|
||||
"121cc5391cd2a5115bc2b3160379ee5b36cd7716": "Innstillinger",
|
||||
"801b98c6f02fe3b32f6afa3ee854c99ed83474e6": "Nettadresse",
|
||||
"54c512cca1923ab72faf1a0bd98d3d172469629a": "Nettadressen dette programmet nås fra, uten porten.",
|
||||
"cb2741a46e3560f6bc6dfd99d385e86b08b26d72": "Port",
|
||||
"22e8f1d0423a3b784fe40fab187b92c06541b577": "Ønsket port. Forvalet er 17442.",
|
||||
"d4477669a560750d2064051a510ef4d7679e2f3e": "Multi-brukermodus",
|
||||
"2eb03565fcdce7a7a67abc277a936a32fcf51557": "Bruker-basissti",
|
||||
"a64505c41150663968e277ec9b3ddaa5f4838798": "Basissti for brukere og deres nedlastede videoer.",
|
||||
"4e3120311801c4acd18de7146add2ee4a4417773": "Tillat abonnementer",
|
||||
"4bee2a4bef2d26d37c9b353c278e24e5cd309ce3": "Abonnements-basissti",
|
||||
"bc9892814ee2d119ae94378c905ea440a249b84a": "Basissti for videoer fra dine abonnementskanaler og spillelister. Den er relativ til YTDL-Material sin rotmappe.",
|
||||
"5bef4b25ba680da7fff06b86a91b1fc7e6a926e3": "Sjekkintervall",
|
||||
"0f56a7449b77630c114615395bbda4cab398efd8": "I sekunder, kun tall.",
|
||||
"27a56aad79d8b61269ed303f11664cc78bcc2522": "Drakt",
|
||||
"ff7cee38a2259526c519f878e71b964f41db4348": "Forvalg",
|
||||
"adb4562d2dbd3584370e44496969d58c511ecb63": "Mørk",
|
||||
"7a6bacee4c31cb5c0ac2d24274fb4610d8858602": "Tillat draktendring",
|
||||
"fe46ccaae902ce974e2441abe752399288298619": "Språk",
|
||||
"82421c3e46a0453a70c42900eab51d58d79e6599": "Generelt",
|
||||
"ab2756805742e84ad0cc0468f4be2d8aa9f855a5": "Lydmappe",
|
||||
"c2c89cdf45d46ea64d2ed2f9ac15dfa4d77e26ca": "Sti for lydbaserte nedlastinger. Den er relativ til YTDL-Material sin rotmappe.",
|
||||
"46826331da1949bd6fb74624447057099c9d20cd": "Videomappe",
|
||||
"17c92e6d47a213fa95b5aa344b3f258147123f93": "Sti for videonedlastinger. Den er relativ til YTDL-Material sin rotmappe.",
|
||||
"6b995e7130b4d667eaab6c5f61b362ace486d26d": "Egendefinerte argumenter for nedlastninger på hjemmesiden for hele programmet. Argumenter skilles med to komma, slik: ,,",
|
||||
"78e49b7339b4fa7184dd21bcaae107ce9b7076f6": "Bruk youtube-dl-arktivet",
|
||||
"ffc19f32b1cba0daefc0e5668f89346db1db83ad": "Inkluder miniatyrbilde",
|
||||
"384de8f8f112c9e6092eb2698706d391553f3e8d": "Inkluder metadata",
|
||||
"fb35145bfb84521e21b6385363d59221f436a573": "Drep alle nedlastinger",
|
||||
"0ba25ad86a240576c4f20a2fada4722ebba77b1e": "Nedlaster",
|
||||
"61f8fd90b5f8cb20c70371feb2ee5e1fac5a9095": "Topptittel",
|
||||
"78d3531417c0d4ba4c90f0d4ae741edc261ec8df": "Filbehandler påskrudd",
|
||||
"a5a1be0a5df07de9eec57f5d2a86ed0204b2e75a": "Nedlastingsbehandler påskrudd",
|
||||
"c33bd5392b39dbed36b8e5a1145163a15d45835f": "Tillat kvalitetsvalg",
|
||||
"bda5508e24e0d77debb28bcd9194d8fefb1cfb92": "Modus kun for nedlasting",
|
||||
"09d31c803a7252658694e1e3176b97f5655a3fe3": "Tillat multi-nedlastingsmodus",
|
||||
"1c4dbce56d96b8974aac24a02f7ab2ee81415014": "Skru på offentlig API",
|
||||
"23bd81dcc30b74d06279a26d7a42e8901c1b124e": "Offentlig API-nøkkel",
|
||||
"41016a73d8ad85e6cb26dffa0a8fab9fe8f60d8e": "Vis dokumentasjon",
|
||||
"1b258b258b4cc475ceb2871305b61756b0134f4a": "Generer",
|
||||
"00a94f58d9eb2e3aa561440eabea616d0c937fa2": "Dette vil slette din gamle API-nøkkel!",
|
||||
"d5d7c61349f3b0859336066e6d453fc35d334fe5": "Bruk YouTube-API",
|
||||
"ce10d31febb3d9d60c160750570310f303a22c22": "YouTube-API-nøkkel",
|
||||
"8602e313cdfa7c4cc475ccbe86459fce3c3fd986": "Å generere en nøkkel er lett!",
|
||||
"9b3cedfa83c6d7acb3210953289d1be4aab115c7": "Klikk her",
|
||||
"7f09776373995003161235c0c8d02b7f91dbc4df": "for å laste ned den offisielle Chrome-utvidelsen for YouTubeDL-Material selv.",
|
||||
"5b5296423906ab3371fdb2b5a5aaa83acaa2ee52": "Du må manuelt laste ned utvidelsen og endre dens innstillinger for å sette skjermflate-nettadresse.",
|
||||
"9a2ec6da48771128384887525bdcac992632c863": "for å installere den offisielle Firefox-utvidelsen for YouTubeDL-Material rett fra Firefox sin utvidelsesside.",
|
||||
"eb81be6b49e195e5307811d1d08a19259d411f37": "Detaljert oppsettsinstruks",
|
||||
"cb17ff8fe3961cf90f44bee97c88a3f3347a7e55": "Ikke mye kreves annet enn å endre utvidelses innstillinger for å sette skjermflate-nettadresse.",
|
||||
"61b81b11aad0b9d970ece2fce18405f07eac69c2": "Dra lenken nedenfor til bokmerker. Naviger til YouTube-videoen du ønsker å laste ned og klikk på bokmerket.",
|
||||
"c505d6c5de63cc700f0aaf8a4b31fae9e18024e5": "Genrer \"kun lyd\"-bookmerke",
|
||||
"d5f69691f9f05711633128b5a3db696783266b58": "Ekstra",
|
||||
"5fab47f146b0a4b809dcebf3db9da94df6299ea1": "Bruk forvalgt nedlastingsagent",
|
||||
"ec71e08aee647ea4a71fd6b7510c54d84a797ca6": "Velg en nedlaster",
|
||||
"0c43af932e6a4ee85500e28f01b3538b4eb27bc4": "Loggingsnivå",
|
||||
"db6c192032f4cab809aad35215f0aa4765761897": "Innloggingsutløp",
|
||||
"dc3d990391c944d1fbfc7cfb402f7b5e112fb3a8": "Tillat avansert nedlasting",
|
||||
"431e5f3a0dde88768d1074baedd65266412b3f02": "Bruk kaker",
|
||||
"80651a7ad1229ea6613557d3559f702cfa5aecf5": "Sett kaker",
|
||||
"bc2e854e111ecf2bd7db170da5e3c2ed08181d88": "Avansert",
|
||||
"37224420db54d4bc7696f157b779a7225f03ca9d": "Tillat brukerregistrering",
|
||||
"4f56ced9d6b85aeb1d4346433361d47ea72dac1a": "Intern",
|
||||
"e3d7c5f019e79a3235a28ba24df24f11712c7627": "LDAP",
|
||||
"fa548cee6ea11c160a416cac3e6bdec0363883dc": "Autentiseringsmetode",
|
||||
"1db9789b93069861019bd0ccaa5d4706b00afc61": "LDAP-nettadresse",
|
||||
"f50fa6c09c8944aed504f6325f2913ee6c7a296a": "BIND-DN",
|
||||
"080cc6abcba236390fc22e79792d0d3443a3bd2a": "BIND-identitetsdetaljer",
|
||||
"cfa67d14d84fe0e9fadf251dc51ffc181173b662": "Søkebase",
|
||||
"e01d54ecc1a0fcf9525a3c100ed8b83d94e61c23": "Søkefilter",
|
||||
"4d13a9cd5ed3dcee0eab22cb25198d43886942be": "Brukere",
|
||||
"eb3d5aefff38a814b76da74371cbf02c0789a1ef": "Logger",
|
||||
"fe8fd36dbf5deee1d56564965787a782a66eba44": "{VAR_SELECT, select, true {Close} false {Cancel} other {otha} }",
|
||||
"cec82c0a545f37420d55a9b6c45c20546e82f94e": "Om YouTubeDL-Material",
|
||||
"199c17e5d6a419313af3c325f06dcbb9645ca618": "er en fri YouTube-nedlaster bygd i henhold til Google sine Materielle spesifikasjoner. Du kan sømløst laste ned dine favorittvideoer som video- eller lydfiler, og tilogmed abonnere på dine favorittkanaler og spillelister for å holde deg oppdatert med nye videoer.",
|
||||
"bc0ad0ee6630acb7fcb7802ec79f5a0ee943c1a7": "har noen flotte funksjoner inkludert. Et vidtfavnende API, Docker-støtte, og lokalisering (oversettelser)-støtte. Les om alle støttede funksjoner ved å klikke på GitHub-ikonet ovenfor.",
|
||||
"a45e3b05f0529dc5246d70ef62304c94426d4c81": "Installert versjon:",
|
||||
"e22f3a5351944f3a1a10cfc7da6f65dfbe0037fe": "Ser etter oppdateringer …",
|
||||
"a16e92385b4fd9677bb830a4b796b8b79c113290": "Oppdatering tilgjengelig",
|
||||
"189b28aaa19b3c51c6111ad039c4fd5e2a22e370": "Du kan oppdatere fra innstillingsmenyen.",
|
||||
"b33536f59b94ec935a16bd6869d836895dc5300c": "Funnet en feil eller har et forslag å komme med?",
|
||||
"e1f398f38ff1534303d4bb80bd6cece245f24016": "for å opprette en feilrapport.",
|
||||
"42ff677ec14f111e88bd6cdd30145378e994d1bf": "Din profil",
|
||||
"ac9d09de42edca1296371e4d801349c9096ac8de": "UID:",
|
||||
"a5ed099ffc9e96f6970df843289ade8a7d20ab9f": "Opprettet:",
|
||||
"fa96f2137af0a24e6d6d54c598c0af7d5d5ad344": "Du er ikke innlogget.",
|
||||
"6765b4c916060f6bc42d9bb69e80377dbcb5e4e9": "Logg inn",
|
||||
"bb694b49d408265c91c62799c2b3a7e3151c824d": "Logg ut",
|
||||
"a1dbca87b9f36d2b06a5cbcffb5814c4ae9b798a": "Opprett administratorkonto",
|
||||
"2d2adf3ca26a676bca2269295b7455a26fd26980": "Fant ingen administratorkonto. Dette vil opprette og sette passord for en slik konto med brukernavn som «admin».",
|
||||
"70a67e04629f6d412db0a12d51820b480788d795": "Opprett",
|
||||
"994363f08f9fbfa3b3994ff7b35c6904fdff18d8": "Profil",
|
||||
"004b222ff9ef9dd4771b777950ca1d0e4cd4348a": "Om",
|
||||
"92eee6be6de0b11c924e3ab27db30257159c0a7c": "Hjem",
|
||||
"357064ca9d9ac859eb618e28e8126fa32be049e2": "Abonnementer",
|
||||
"822fab38216f64e8166d368b59fe756ca39d301b": "Nedlastinger",
|
||||
"a249a5ae13e0835383885aaf697d2890cc3e53e9": "Del spilleliste",
|
||||
"15da89490e04496ca9ea1e1b3d44fb5efd4a75d9": "Del video",
|
||||
"1d540dcd271b316545d070f9d182c372d923aadd": "Del lyd",
|
||||
"1f6d14a780a37a97899dc611881e6bc971268285": "Skru på deling",
|
||||
"6580b6a950d952df847cb3d8e7176720a740adc8": "Bruk tidsstempel",
|
||||
"4f2ed9e71a7c981db3e50ae2fedb28aff2ec4e6c": "Sekunder",
|
||||
"3a6e5a6aa78ca864f6542410c5dafb6334538106": "Kopier til utklippstavle",
|
||||
"5b3075e8dc3f3921ec316b0bd83b6d14a06c1a4f": "Lagre endringer",
|
||||
"4d8a18b04a1f785ecd8021ac824e0dfd5881dbfc": "Nedlastet",
|
||||
"348cc5d553b18e862eb1c1770e5636f6b05ba130": "En feil inntraff",
|
||||
"4f8b2bb476981727ab34ed40fde1218361f92c45": "Detaljer",
|
||||
"e9aff8e6df2e2bf6299ea27bb2894c70bc48bd4d": "En feil har inntruffet:",
|
||||
"77b0c73840665945b25bd128709aa64c8f017e1c": "Nedlastingsstart:",
|
||||
"08ff9375ec078065bcdd7637b7ea65fce2979266": "Nedlastingsslutt:",
|
||||
"ad127117f9471612f47d01eae09709da444a36a4": "Filsti(er):",
|
||||
"a9806cf78ce00eb2613eeca11354a97e033377b8": "Abonner på en spilleliste eller kanal",
|
||||
"93efc99ae087fc116de708ecd3ace86ca237cf30": "Spilleliste- eller kanal-nettadressen",
|
||||
"08f5d0ef937ae17feb1b04aff15ad88911e87baf": "Egendefinert navn",
|
||||
"ea30873bd3f0d5e4fb2378eec3f0a1db77634a28": "Last ned alle opplastinger",
|
||||
"28a678e9cabf86e44c32594c43fa0e890135c20f": "Last ned videoer oppdatert siste",
|
||||
"c76a955642714b8949ff3e4b4990864a2e2cac95": "Kun lyd-modus",
|
||||
"408ca4911457e84a348cecf214f02c69289aa8f1": "Kun strømming-modus",
|
||||
"f432e1a8d6adb12e612127978ce2e0ced933959c": "Disse legges til etter standard-argumentene.",
|
||||
"98b6ec9ec138186d663e64770267b67334353d63": "Egendefinert filutdata",
|
||||
"d0336848b0c375a1c25ba369b3481ee383217a4f": "Abonner",
|
||||
"e78c0d60ac39787f62c9159646fe0b3c1ed55a1d": "Type:",
|
||||
"a44d86aa1e6c20ced07aca3a7c081d8db9ded1c6": "Arkiv:",
|
||||
"8efc77bf327659c0fec1f518cf48a98cdcd9dddf": "Eksporter arkiv",
|
||||
"3042bd3ad8dffcfeca5fd1ae6159fd1047434e95": "Opphev abonnement",
|
||||
"e2319dec5b4ccfb6ed9f55ccabd63650a8fdf547": "Dine abonnementer",
|
||||
"807cf11e6ac1cde912496f764c176bdfdd6b7e19": "Kanaler",
|
||||
"29b89f751593e1b347eef103891b7a1ff36ec03f": "Navn ikke tilgjengelig. Henter kanal …",
|
||||
"4636cd4a1379c50d471e98786098c4d39e1e82ad": "Du har ingen kanalabonnementer.",
|
||||
"47546e45bbb476baaaad38244db444c427ddc502": "Spillelister",
|
||||
"2e0a410652cb07d069f576b61eab32586a18320d": "Navn ikke tilgjengelig. Henter spilleliste …",
|
||||
"587b57ced54965d8874c3fd0e9dfedb987e5df04": "Du har ingen spillelisteabonnement.",
|
||||
"3697f8583ea42868aa269489ad366103d94aece7": "Redigering",
|
||||
"7e892ba15f2c6c17e83510e273b3e10fc32ea016": "Søk",
|
||||
"2054791b822475aeaea95c0119113de3200f5e1c": "Lengde:",
|
||||
"94e01842dcee90531caa52e4147f70679bac87fe": "Slett og last ned igjen",
|
||||
"2031adb51e07a41844e8ba7704b054e98345c9c1": "Slett for alltid",
|
||||
"91ecce65f1d23f9419d1c953cd6b7bc7f91c110e": "Oppdaterer",
|
||||
"1372e61c5bd06100844bd43b98b016aabc468f62": "Velg en versjon:",
|
||||
"cfc2f436ec2beffb042e7511a73c89c372e86a6c": "Regustrer",
|
||||
"a1ad8b1be9be43b5183bd2c3186d4e19496f2a0b": "Økt-ID:",
|
||||
"eb98135e35af26a9a326ee69bd8ff104d36dd8ec": "(nåværende)",
|
||||
"b6c453e0e61faea184bbaf5c5b0a1e164f4de2a2": "Tøm alle nedlastinger",
|
||||
"7117fc42f860e86d983bfccfcf2654e5750f3406": "Ingen nedlastninger tilgjengelige!",
|
||||
"b7ff2e2b909c53abe088fe60b9f4b6ac7757247f": "Registrer en bruker",
|
||||
"024886ca34a6f309e3e51c2ed849320592c3faaa": "Brukernavn",
|
||||
"2bd201aea09e43fbfd3cd15ec0499b6755302329": "Håndter bruker",
|
||||
"29c97c8e76763bb15b6d515648fa5bd1eb0f7510": "Bruker-UID:",
|
||||
"e70e209561583f360b1e9cefd2cbb1fe434b6229": "Nytt passord",
|
||||
"6498fa1b8f563988f769654a75411bb8060134b9": "Sett nytt passord",
|
||||
"544e09cdc99a8978f48521d45f62db0da6dcf742": "Bruk rolle-forvalg",
|
||||
"4f20f2d5a6882190892e58b85f6ccbedfa737952": "Ja",
|
||||
"3d3ae7deebc5949b0c1c78b9847886a94321d9fd": "Nei",
|
||||
"57c6c05d8ebf4ef1180c2705033c044f655bb2c4": "Håndter rolle",
|
||||
"746f64ddd9001ac456327cd9a3d5152203a4b93c": "Brukernavn",
|
||||
"52c1447c1ec9570a2a3025c7e566557b8d19ed92": "Rolle",
|
||||
"59a8c38db3091a63ac1cb9590188dc3a972acfb3": "Handlinger",
|
||||
"632e8b20c98e8eec4059a605a4b011bb476137af": "Rediger bruker",
|
||||
"95b95a9c79e4fd9ed41f6855e37b3b06af25bcab": "Slett bruker",
|
||||
"4d92a0395dd66778a931460118626c5794a3fc7a": "Legg til brukere",
|
||||
"b0d7dd8a1b0349622d6e0c6e643e24a9ea0efa1d": "Rediger rolle",
|
||||
"5009630cdf32ab4f1c78737b9617b8773512c05a": "Linjer:",
|
||||
"8a0bda4c47f10b2423ff183acefbf70d4ab52ea2": "Tøm logger",
|
||||
"ccf5ea825526ac490974336cb5c24352886abc07": "Åpne fil",
|
||||
"5656a06f17c24b2d7eae9c221567b209743829a9": "Åpne fil i ny fane",
|
||||
"a0720c36ee1057e5c54a86591b722485c62d7b1a": "Gå til abonnement",
|
||||
"d02888c485d3aeab6de628508f4a00312a722894": "Mine videoer"
|
||||
}
|
||||
@@ -20,44 +20,14 @@ import '@angular/localize/init';
|
||||
|
||||
/***************************************************************************************************
|
||||
* BROWSER POLYFILLS
|
||||
*/
|
||||
|
||||
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
|
||||
// import 'core-js/es6/symbol';
|
||||
// import 'core-js/es6/object';
|
||||
// import 'core-js/es6/function';
|
||||
// import 'core-js/es6/parse-int';
|
||||
// import 'core-js/es6/parse-float';
|
||||
// import 'core-js/es6/number';
|
||||
// import 'core-js/es6/math';
|
||||
// import 'core-js/es6/string';
|
||||
// import 'core-js/es6/date';
|
||||
// import 'core-js/es6/array';
|
||||
// import 'core-js/es6/regexp';
|
||||
// import 'core-js/es6/map';
|
||||
// import 'core-js/es6/weak-map';
|
||||
// import 'core-js/es6/set';
|
||||
|
||||
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
||||
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
||||
|
||||
/** IE10 and IE11 requires the following to support `@angular/animation`. */
|
||||
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
||||
|
||||
|
||||
/** Evergreen browsers require these. **/
|
||||
// import 'core-js/es6/reflect';
|
||||
|
||||
|
||||
/** ALL Firefox browsers require the following to support `@angular/animation`. **/
|
||||
import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
||||
*/ // Run `npm install --save web-animations-js`.
|
||||
|
||||
|
||||
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by Angular itself.
|
||||
*/
|
||||
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
||||
import 'zone.js'; // Included with Angular CLI.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,18 @@ async function createLocalizationJSON() {
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const file = path.basename(files[i]);
|
||||
const file_parts = file.split('.');
|
||||
locales.push(file_parts[1]);
|
||||
if (file_parts.length !== 3 || file_parts[1] === 'en') continue;
|
||||
try {
|
||||
const locale_json = fs.readJSONSync(files[i]);
|
||||
const locale_json_keys = Object.keys(locale_json);
|
||||
let has_defined_keys = false;
|
||||
for (let i = 0; i < locale_json_keys.length; i++) {
|
||||
if (locale_json[locale_json_keys[i]] !== '') has_defined_keys = true;
|
||||
}
|
||||
if (has_defined_keys) locales.push(file_parts[1]);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
|
||||
fs.unlinkSync('src/assets/i18n/messages.en.json');
|
||||
|
||||
@@ -22,7 +22,9 @@ __karma__.loaded = function () {};
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
platformBrowserDynamicTesting(), {
|
||||
teardown: { destroyAfterEach: false }
|
||||
}
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
|
||||
Reference in New Issue
Block a user