Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 185d6efc5a | |||
| 76e8832071 | |||
| 7d2503fe77 | |||
|
|
dcd80b7366 | ||
|
|
515888b156 | ||
|
|
57cc86d328 |
6
.github/workflows/docker-publish.yml
vendored
6
.github/workflows/docker-publish.yml
vendored
@@ -8,12 +8,12 @@ name: Docker
|
|||||||
on:
|
on:
|
||||||
# schedule:
|
# schedule:
|
||||||
# - cron: '39 13 * * *'
|
# - cron: '39 13 * * *'
|
||||||
push:
|
release:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
# Publish semver tags as releases.
|
# Publish semver tags as releases.
|
||||||
tags: [ 'v*.*.*' ]
|
tags: [ 'v*.*.*' ]
|
||||||
pull_request:
|
# pull_request:
|
||||||
branches: [ master ]
|
# branches: [ master ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Use docker.io for Docker Hub if empty
|
# Use docker.io for Docker Hub if empty
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
FROM alpine:3.17
|
FROM alpine:3.17
|
||||||
# folder structure
|
# folder structure
|
||||||
WORKDIR /usr/src/yt-dlp-webui/downloads
|
WORKDIR /usr/src/yt-dlp-webui/downloads
|
||||||
VOLUME /usr/src/yt-dlp-webui/downloads
|
VOLUME /downloads
|
||||||
WORKDIR /usr/src/yt-dlp-webui
|
WORKDIR /usr/src/yt-dlp-webui
|
||||||
# install core dependencies
|
# install core dependencies
|
||||||
RUN apk update
|
RUN apk update
|
||||||
@@ -17,4 +17,4 @@ WORKDIR /usr/src/yt-dlp-webui
|
|||||||
RUN go build -o yt-dlp-webui
|
RUN go build -o yt-dlp-webui
|
||||||
# expose and run
|
# expose and run
|
||||||
EXPOSE 3033
|
EXPOSE 3033
|
||||||
CMD [ "yt-dlp-webui" , "--out", "./downloads" ]
|
CMD [ "./yt-dlp-webui" , "--out", "/downloads" ]
|
||||||
|
|||||||
27
README.md
27
README.md
@@ -11,13 +11,14 @@ The bottleneck remains yt-dlp startup time (until yt-dlp will provide a rpc inte
|
|||||||
|
|
||||||
**I strongly recomend the ghcr build instead of docker hub one.**
|
**I strongly recomend the ghcr build instead of docker hub one.**
|
||||||
|
|
||||||
```shell
|
```sh
|
||||||
docker pull ghcr.io/marcopeocchi/yt-dlp-web-ui:master
|
docker pull ghcr.io/marcopeocchi/yt-dlp-web-ui:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|

|
||||||
|

|
||||||
|
|
||||||
Changelog:
|
## Changelog
|
||||||
```
|
```
|
||||||
05/03/22: Korean translation by kimpig
|
05/03/22: Korean translation by kimpig
|
||||||
|
|
||||||
@@ -45,10 +46,6 @@ Refactoring and JSDoc.
|
|||||||
12/01/23: Switched from TypeScript to Golang on the backend. It was a great effort but it was worth it.
|
12/01/23: Switched from TypeScript to Golang on the backend. It was a great effort but it was worth it.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
|
|
||||||
The currently avaible settings are:
|
The currently avaible settings are:
|
||||||
@@ -85,22 +82,22 @@ Future releases will have:
|
|||||||
- **The download doesn't start.**
|
- **The download doesn't start.**
|
||||||
- As before server address is not specified or simply yt-dlp process takes a lot of time to fire up. (Forking yt-dlp isn't fast especially if you have a lower-end/low-power NAS/server/desktop where the server is running)
|
- As before server address is not specified or simply yt-dlp process takes a lot of time to fire up. (Forking yt-dlp isn't fast especially if you have a lower-end/low-power NAS/server/desktop where the server is running)
|
||||||
|
|
||||||
## [Docker](https://github.com/marcopeocchi/yt-dlp-web-ui/pkgs/container/yt-dlp-web-ui/63294924?tag=master) installation
|
## [Docker](https://github.com/marcopeocchi/yt-dlp-web-ui/pkgs/container/yt-dlp-web-ui) installation
|
||||||
```sh
|
```sh
|
||||||
# recomended for ARM and x86 devices
|
# recomended for ARM and x86 devices
|
||||||
docker pull ghcr.io/marcopeocchi/yt-dlp-web-ui:master
|
docker pull ghcr.io/marcopeocchi/yt-dlp-web-ui:latest
|
||||||
docker run -d -p 3022:3022 -v <your dir>:/usr/src/yt-dlp-webui/downloads ghcr.io/marcopeocchi/yt-dlp-web-ui:master
|
docker run -d -p 3033:3033 -v <your dir>:/usr/src/yt-dlp-webui/downloads ghcr.io/marcopeocchi/yt-dlp-web-ui:latest
|
||||||
|
|
||||||
# or even
|
# or even
|
||||||
docker pull ghcr.io/marcopeocchi/yt-dlp-web-ui:master
|
docker pull ghcr.io/marcopeocchi/yt-dlp-web-ui:latest
|
||||||
docker create --name yt-dlp-webui -p 8082:3022 -v <your dir>:/usr/src/yt-dlp-webui/downloads ghcr.io/marcopeocchi/yt-dlp-web-ui:master
|
docker create --name yt-dlp-webui -p 8082:3033 -v <your dir>:/usr/src/yt-dlp-webui/downloads ghcr.io/marcopeocchi/yt-dlp-web-ui:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Or with docker but building the container manually.
|
Or with docker but building the container manually.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker build -t yt-dlp-webui .
|
docker build -t yt-dlp-webui .
|
||||||
docker run -d -p 3022:3022 -v <your dir>:/usr/src/yt-dlp-webui/downloads yt-dlp-webui
|
docker run -d -p 3033:3033 -v <your dir>:/usr/src/yt-dlp-webui/downloads yt-dlp-webui
|
||||||
```
|
```
|
||||||
|
|
||||||
## [Prebuilt binaries](https://github.com/marcopeocchi/yt-dlp-web-ui/releases) installation
|
## [Prebuilt binaries](https://github.com/marcopeocchi/yt-dlp-web-ui/releases) installation
|
||||||
@@ -197,4 +194,4 @@ For more information open an issue on GitHub and I will provide more info ASAP.
|
|||||||
- I genuinely don't know. I know that standalone yt-dlp is slow to start up even on my M1 Mac, so....
|
- I genuinely don't know. I know that standalone yt-dlp is slow to start up even on my M1 Mac, so....
|
||||||
|
|
||||||
## What yt-dlp-webui is not
|
## What yt-dlp-webui is not
|
||||||
`yt-dlp-webui` isn't your ordinary website where downloading stuff from the internet, so don't try asking for links of where this is hosted. It's a self hosted platform for a Linux NAS.
|
`yt-dlp-webui` isn't your ordinary website where to download stuff from the internet, so don't try asking for links of where this is hosted. It's a self hosted platform for a Linux NAS.
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
"@mui/icons-material": "^5.6.2",
|
"@mui/icons-material": "^5.6.2",
|
||||||
"@mui/material": "^5.6.4",
|
"@mui/material": "^5.6.4",
|
||||||
"@reduxjs/toolkit": "^1.8.1",
|
"@reduxjs/toolkit": "^1.8.1",
|
||||||
"radash": "^10.6.0",
|
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-redux": "^8.0.1",
|
"react-redux": "^8.0.1",
|
||||||
@@ -32,8 +31,6 @@
|
|||||||
"@types/uuid": "^8.3.4",
|
"@types/uuid": "^8.3.4",
|
||||||
"@vitejs/plugin-react": "^1.3.2",
|
"@vitejs/plugin-react": "^1.3.2",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
"path-browserify": "^1.0.1",
|
|
||||||
"process": "^0.11.10",
|
|
||||||
"typescript": "^4.6.4",
|
"typescript": "^4.6.4",
|
||||||
"vite": "^2.9.10"
|
"vite": "^2.9.10"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ export default function Home({ socket }: Props) {
|
|||||||
socket.onopen = () => {
|
socket.onopen = () => {
|
||||||
dispatch(connected())
|
dispatch(connected())
|
||||||
setCustomArgs(localStorage.getItem('last-input-args') ?? '')
|
setCustomArgs(localStorage.getItem('last-input-args') ?? '')
|
||||||
|
setFilenameOverride(localStorage.getItem('last-filename-override') ?? '')
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
@@ -136,7 +137,6 @@ export default function Home({ socket }: Props) {
|
|||||||
|
|
||||||
setUrl('')
|
setUrl('')
|
||||||
setWorkingUrl('')
|
setWorkingUrl('')
|
||||||
setFilenameOverride('')
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
resetInput()
|
resetInput()
|
||||||
@@ -179,6 +179,7 @@ export default function Home({ socket }: Props) {
|
|||||||
*/
|
*/
|
||||||
const handleFilenameOverrideChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
const handleFilenameOverrideChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setFilenameOverride(e.target.value)
|
setFilenameOverride(e.target.value)
|
||||||
|
localStorage.setItem('last-filename-override', e.target.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -297,6 +298,7 @@ export default function Home({ socket }: Props) {
|
|||||||
fullWidth
|
fullWidth
|
||||||
label={i18n.t('customFilename')}
|
label={i18n.t('customFilename')}
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
|
value={fileNameOverride}
|
||||||
onChange={handleFilenameOverrideChange}
|
onChange={handleFilenameOverrideChange}
|
||||||
disabled={!status.connected || (settings.formatSelection && downloadFormats != null)}
|
disabled={!status.connected || (settings.formatSelection && downloadFormats != null)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
import i18n from "../../assets/i18n.yaml";
|
import i18n from "../../assets/i18n.yaml"
|
||||||
|
|
||||||
export default class I18nBuilder {
|
export default class I18nBuilder {
|
||||||
private language: string;
|
private language: string
|
||||||
private textMap = i18n.languages;
|
private textMap = i18n.languages
|
||||||
|
|
||||||
constructor(language: string) {
|
constructor(language: string) {
|
||||||
this.language = language;
|
this.language = language
|
||||||
}
|
}
|
||||||
|
|
||||||
getLanguage(): string {
|
getLanguage(): string {
|
||||||
return this.language;
|
return this.language
|
||||||
}
|
}
|
||||||
|
|
||||||
setLanguage(language: string): void {
|
setLanguage(language: string): void {
|
||||||
this.language = language;
|
this.language = language
|
||||||
}
|
}
|
||||||
|
|
||||||
t(key: string): string {
|
t(key: string): string {
|
||||||
const map = this.textMap[this.language]
|
const map = this.textMap[this.language]
|
||||||
if (map) {
|
if (map) {
|
||||||
const translation = map[key];
|
const translation = map[key]
|
||||||
return translation ?? 'caption not defined';
|
return translation ?? 'caption not defined'
|
||||||
}
|
}
|
||||||
return 'caption not defined';
|
return 'caption not defined'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,10 +20,13 @@ export class RPCClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private sendHTTP<T>(req: RPCRequest) {
|
private sendHTTP<T>(req: RPCRequest) {
|
||||||
return new Promise<RPCResponse<T>>((resolve, reject) => {
|
return new Promise<RPCResponse<T>>((resolve) => {
|
||||||
fetch(getHttpRPCEndpoint(), {
|
fetch(getHttpRPCEndpoint(), {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify(req)
|
body: JSON.stringify({
|
||||||
|
id: this.incrementSeq(),
|
||||||
|
...req
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(data => resolve(data))
|
.then(data => resolve(data))
|
||||||
@@ -59,6 +62,7 @@ export class RPCClient {
|
|||||||
|
|
||||||
public running() {
|
public running() {
|
||||||
this.send({
|
this.send({
|
||||||
|
id: this.incrementSeq(),
|
||||||
method: 'Service.Running',
|
method: 'Service.Running',
|
||||||
params: [],
|
params: [],
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user