Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72857882e4 | ||
|
|
59abd76966 | ||
|
|
8ab7c4db4d | ||
|
|
17d48354cb | ||
|
|
ac54a1dd13 | ||
|
|
75c6c84c5c | ||
|
|
cdad7ca873 | ||
|
|
1f6d6d7839 | ||
|
|
e59cf383d5 | ||
|
|
643c752b6a | ||
|
|
5e51bf7ff5 | ||
|
|
245b70f654 | ||
|
|
2d1fc0dda5 | ||
| ee83bad6e8 | |||
|
|
3609f573a2 | ||
| e258dea2ca | |||
|
|
f2622adc7e | ||
|
|
4f4348cb91 | ||
|
|
fabe1c7d5e |
5
.github/workflows/docker-image.yml
vendored
5
.github/workflows/docker-image.yml
vendored
@@ -22,6 +22,5 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
- name: Build the Docker image
|
- name: Build the Docker image
|
||||||
run: docker buildx build . --file Dockerfile --tag ${{secrets.DOCKER_HUB_USERNAME}}/yt-dlp-webui:latest --platform linux/amd64,linux/arm/v7,linux/arm64
|
run: docker buildx build . --file Dockerfile --tag ${{secrets.DOCKER_HUB_USERNAME}}/yt-dlp-webui:latest --push --platform linux/amd64,linux/arm/v7,linux/arm64
|
||||||
- name: Publish the Docker image
|
|
||||||
run: docker push ${{secrets.DOCKER_HUB_USERNAME}}/yt-dlp-webui:latest
|
|
||||||
|
|||||||
11
.github/workflows/docker-publish.yml
vendored
11
.github/workflows/docker-publish.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Docker
|
name: Docker (ghcr.io)
|
||||||
|
|
||||||
# This workflow uses actions that are not certified by GitHub.
|
# This workflow uses actions that are not certified by GitHub.
|
||||||
# They are provided by a third-party and are governed by
|
# They are provided by a third-party and are governed by
|
||||||
@@ -6,14 +6,13 @@ name: Docker
|
|||||||
# documentation.
|
# documentation.
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# schedule:
|
|
||||||
# - cron: '39 13 * * *'
|
|
||||||
release:
|
release:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
# Publish semver tags as releases.
|
|
||||||
tags: [ 'v*.*.*' ]
|
tags: [ 'v*.*.*' ]
|
||||||
# pull_request:
|
push:
|
||||||
# branches: [ master ]
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Use docker.io for Docker Hub if empty
|
# Use docker.io for Docker Hub if empty
|
||||||
|
|||||||
22
Dockerfile
22
Dockerfile
@@ -6,24 +6,30 @@ FROM alpine:3.17 AS build
|
|||||||
WORKDIR /usr/src/yt-dlp-webui
|
WORKDIR /usr/src/yt-dlp-webui
|
||||||
# install core dependencies
|
# install core dependencies
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk add curl wget psmisc ffmpeg nodejs yarn go yt-dlp
|
apk add nodejs npm go
|
||||||
# copia la salsa
|
# copia la salsa
|
||||||
COPY . .
|
COPY . .
|
||||||
# build frontend
|
# build frontend
|
||||||
WORKDIR /usr/src/yt-dlp-webui/frontend
|
WORKDIR /usr/src/yt-dlp-webui/frontend
|
||||||
RUN yarn install && \
|
RUN npm install
|
||||||
yarn build
|
RUN npm run build
|
||||||
# build backend + incubator
|
# build backend + incubator
|
||||||
WORKDIR /usr/src/yt-dlp-webui
|
WORKDIR /usr/src/yt-dlp-webui
|
||||||
RUN go build -o yt-dlp-webui
|
RUN go build -o yt-dlp-webui
|
||||||
|
|
||||||
|
# but here yes :)
|
||||||
|
FROM alpine:edge
|
||||||
|
|
||||||
FROM alpine:3.17
|
WORKDIR /downloads
|
||||||
|
|
||||||
WORKDIR /usr/src/yt-dlp-webui/downloads
|
|
||||||
VOLUME /downloads
|
VOLUME /downloads
|
||||||
|
|
||||||
COPY --from=build /usr/src/yt-dlp-webui /usr/bin/yt-dlp-webui
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN apk update && \
|
||||||
|
apk add psmisc ffmpeg yt-dlp
|
||||||
|
|
||||||
|
COPY --from=build /usr/src/yt-dlp-webui /app
|
||||||
|
RUN chmod +x /app/yt-dlp-webui
|
||||||
|
|
||||||
EXPOSE 3033
|
EXPOSE 3033
|
||||||
CMD [ "/usr/bin/yt-dlp-webui" , "--out", "/downloads" ]
|
CMD [ "./yt-dlp-webui" , "--out", "/downloads" ]
|
||||||
|
|||||||
@@ -9,8 +9,11 @@ Developed to be as lightweight as possible (because my server is basically an in
|
|||||||
|
|
||||||
The bottleneck remains yt-dlp startup time.
|
The bottleneck remains yt-dlp startup time.
|
||||||
|
|
||||||
**I strongly recomend the ghcr build instead of docker hub one.**
|
**Docker images are available on [Docker Hub](https://hub.docker.com/r/marcobaobao/yt-dlp-webui) or [ghcr.io](https://github.com/marcopeocchi/yt-dlp-web-ui/pkgs/container/yt-dlp-web-ui)**.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker pull marcobaobao/yt-dlp-webui:latest
|
||||||
|
```
|
||||||
```sh
|
```sh
|
||||||
docker pull ghcr.io/marcopeocchi/yt-dlp-web-ui:latest
|
docker pull ghcr.io/marcopeocchi/yt-dlp-web-ui:latest
|
||||||
```
|
```
|
||||||
@@ -86,6 +89,8 @@ Future releases will have:
|
|||||||
```sh
|
```sh
|
||||||
# recomended for ARM and x86 devices
|
# recomended for ARM and x86 devices
|
||||||
docker pull ghcr.io/marcopeocchi/yt-dlp-web-ui:latest
|
docker pull ghcr.io/marcopeocchi/yt-dlp-web-ui:latest
|
||||||
|
# or
|
||||||
|
# docker pull marcobaobao/yt-dlp-webui:latest
|
||||||
docker run -d -p 3033:3033 -v <your dir>:/downloads ghcr.io/marcopeocchi/yt-dlp-web-ui:latest
|
docker run -d -p 3033:3033 -v <your dir>:/downloads ghcr.io/marcopeocchi/yt-dlp-web-ui:latest
|
||||||
|
|
||||||
# or even
|
# or even
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ export default function Home({ socket }: Props) {
|
|||||||
disabled={url === ''}
|
disabled={url === ''}
|
||||||
onClick={() => settings.formatSelection ? sendUrlFormatSelection() : sendUrl()}
|
onClick={() => settings.formatSelection ? sendUrlFormatSelection() : sendUrl()}
|
||||||
>
|
>
|
||||||
{i18n.t('startButton')}
|
{settings.formatSelection ? i18n.t('selectFormatButton') : i18n.t('startButton')}
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item>
|
<Grid item>
|
||||||
@@ -387,6 +387,7 @@ export default function Home({ socket }: Props) {
|
|||||||
setPickedAudioFormat('')
|
setPickedAudioFormat('')
|
||||||
}}>
|
}}>
|
||||||
{downloadFormats.best.format_note || downloadFormats.best.format_id} - {downloadFormats.best.vcodec}+{downloadFormats.best.acodec}
|
{downloadFormats.best.format_note || downloadFormats.best.format_id} - {downloadFormats.best.vcodec}+{downloadFormats.best.acodec}
|
||||||
|
({downloadFormats.best.resolution}{(downloadFormats.best.filesize_approx>0)?", ~"+Math.round(downloadFormats.best.filesize_approx/1024/1024)+" MiB":""})
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
{/* video only */}
|
{/* video only */}
|
||||||
@@ -411,6 +412,7 @@ export default function Home({ socket }: Props) {
|
|||||||
disabled={pickedVideoFormat === format.format_id}
|
disabled={pickedVideoFormat === format.format_id}
|
||||||
>
|
>
|
||||||
{format.format_note} - {format.vcodec === 'none' ? format.acodec : format.vcodec}
|
{format.format_note} - {format.vcodec === 'none' ? format.acodec : format.vcodec}
|
||||||
|
({format.resolution}{(format.filesize_approx>0)?", ~"+Math.round(format.filesize_approx/1024/1024)+" MiB":""})
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
))
|
))
|
||||||
@@ -436,6 +438,7 @@ export default function Home({ socket }: Props) {
|
|||||||
disabled={pickedAudioFormat === format.format_id}
|
disabled={pickedAudioFormat === format.format_id}
|
||||||
>
|
>
|
||||||
{format.format_note} - {format.vcodec === 'none' ? format.acodec : format.vcodec}
|
{format.format_note} - {format.vcodec === 'none' ? format.acodec : format.vcodec}
|
||||||
|
{(format.filesize_approx>0)?" (~"+Math.round(format.filesize_approx/1024/1024)+" MiB)":""}
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ languages:
|
|||||||
urlInput: YouTube or other supported service video URL
|
urlInput: YouTube or other supported service video URL
|
||||||
statusTitle: Status
|
statusTitle: Status
|
||||||
statusReady: Ready
|
statusReady: Ready
|
||||||
|
selectFormatButton: Select format
|
||||||
startButton: Start
|
startButton: Start
|
||||||
abortAllButton: Abort All
|
abortAllButton: Abort All
|
||||||
updateBinButton: Update yt-dlp binary
|
updateBinButton: Update yt-dlp binary
|
||||||
|
|||||||
1
frontend/src/types.d.ts
vendored
1
frontend/src/types.d.ts
vendored
@@ -59,4 +59,5 @@ export interface IDLFormat {
|
|||||||
resolution: string,
|
resolution: string,
|
||||||
vcodec: string,
|
vcodec: string,
|
||||||
acodec: string,
|
acodec: string,
|
||||||
|
filesize_approx: number,
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,8 @@ export function toFormatArgs(codes: string[]): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getWebSocketEndpoint() {
|
export function getWebSocketEndpoint() {
|
||||||
return `ws://${localStorage.getItem('server-addr') || window.location.hostname}:${localStorage.getItem('server-port') || window.location.port}/ws-rpc`
|
const protocol = window.location.protocol === 'https:' ? 'wss' : 'ws'
|
||||||
|
return `${protocol}://${localStorage.getItem('server-addr') || window.location.hostname}:${localStorage.getItem('server-port') || window.location.port}/ws-rpc`
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getHttpRPCEndpoint() {
|
export function getHttpRPCEndpoint() {
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ type Format struct {
|
|||||||
Resolution string `json:"resolution"`
|
Resolution string `json:"resolution"`
|
||||||
VCodec string `json:"vcodec"`
|
VCodec string `json:"vcodec"`
|
||||||
ACodec string `json:"acodec"`
|
ACodec string `json:"acodec"`
|
||||||
|
Size float32 `json:"filesize_approx"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// struct representing the response sent to the client
|
// struct representing the response sent to the client
|
||||||
|
|||||||
Reference in New Issue
Block a user