multi-downloads are now fully working
This commit is contained in:
parent
476d369bd1
commit
e7af9ba972
5 changed files with 45 additions and 17 deletions
|
|
@ -54,7 +54,9 @@ COPY --chown=app:app ./healthcheck.sh /usr/local/bin/healthcheck
|
|||
|
||||
ENV PATH="/opt/python/bin:$PATH"
|
||||
|
||||
RUN chown -R app:app /config /downloads && chmod +x /usr/local/bin/healthcheck
|
||||
RUN chown -R app:app /config /downloads && chmod +x /usr/local/bin/healthcheck && \
|
||||
sed -i 's$#!\/app\/\.venv\/bin\/python$#!/opt/python/bin/python$' /opt/python/bin/* && \
|
||||
sed -i "s%'\/app\/\.venv'%'/opt/python'%" /opt/python/bin/activate*
|
||||
|
||||
VOLUME /config
|
||||
VOLUME /downloads
|
||||
|
|
|
|||
15
README.md
15
README.md
|
|
@ -15,7 +15,7 @@ YTPTube started as a fork of [meTube](https://github.com/alexta69/metube), Since
|
|||
* Support per link, `yt-dlp config` and `cookies`. and `output format`.
|
||||
* Tasks Runner. It allow you to queue channels for downloading using simple `json` file.
|
||||
* Webhook sender. It allow you to add webhook endpoints that receive events related to downloads using simple `json` file.
|
||||
* **Experimental** Multi-downloads support.
|
||||
* Multi-downloads support.
|
||||
|
||||
### Tips
|
||||
Your `yt-dlp` config should include the following options for optimal working conditions.
|
||||
|
|
@ -94,7 +94,7 @@ location /ytptube/ {
|
|||
}
|
||||
```
|
||||
|
||||
Note: the extra `proxy_set_header` directives are there to make WebSocket work.
|
||||
Note: the extra `proxy_set_header` directives are there to make web socket connection work.
|
||||
|
||||
### Caddy
|
||||
|
||||
|
|
@ -122,8 +122,9 @@ Before asking a question or submitting an issue for YTPTube, please remember tha
|
|||
In order to test with the yt-dlp command directly, you can either download it and run it locally, or for a better simulation of its actual conditions, you can run it within the YTPTube container itself. Assuming your YTPTube container is called `YTPTube`, run the following on your Docker host to get a shell inside the container:
|
||||
|
||||
```bash
|
||||
docker exec -ti ytptube sh
|
||||
docker exec -ti ytptube bash
|
||||
cd /downloads
|
||||
yt-dlp ....
|
||||
```
|
||||
|
||||
Once there, you can use the yt-dlp command freely.
|
||||
|
|
@ -181,23 +182,23 @@ The `config/ytdlp.json`, is a json file which can be used to alter the default `
|
|||
"subtitleslangs": [ "en", "ar" ],
|
||||
// postprocessors to run on the file
|
||||
"postprocessors": [
|
||||
// this processor convert the downloaded thumbnail to JPG.
|
||||
// this processor convert the downloaded thumbnail to jpg.
|
||||
{
|
||||
"key": "FFmpegThumbnailsConvertor",
|
||||
"format": "jpg"
|
||||
},
|
||||
// This processor convert subtitles to SRT
|
||||
// This processor convert subtitles to srt format.
|
||||
{
|
||||
"key": "FFmpegSubtitlesConvertor",
|
||||
"format": "srt"
|
||||
},
|
||||
// This processor embed metadata & info.json file into the final MKV file.
|
||||
// This processor embed metadata & info.json file into the final mkv file.
|
||||
{
|
||||
"key": "FFmpegMetadata",
|
||||
"add_infojson": true,
|
||||
"add_metadata": true
|
||||
},
|
||||
// This process embed subtitles into the final file if it doesn't subtitles embedded.
|
||||
// This process embed subtitles into the final file if it doesn't have subtitles embedded.
|
||||
{
|
||||
"key": "FFmpegEmbedSubtitle",
|
||||
"already_have_subtitle": false
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import logging
|
|||
import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import coloredlogs
|
||||
from version import APP_VERSION
|
||||
from dotenv import load_dotenv
|
||||
|
|
@ -50,10 +51,12 @@ class Config:
|
|||
|
||||
socket_timeout: int = 30
|
||||
|
||||
started: int = 0
|
||||
|
||||
ytdlp_version: str = YTDLP_VERSION
|
||||
|
||||
_int_vars: tuple = ('port', 'max_workers', 'socket_timeout', 'extract_info_timeout',)
|
||||
_immutable: tuple = ('version', '__instance', 'ytdl_options', 'new_version_available', 'ytdlp_version',)
|
||||
_immutable: tuple = ('version', '__instance', 'ytdl_options', 'new_version_available', 'ytdlp_version', 'started')
|
||||
_boolean_vars: tuple = ('keep_archive', 'ytdl_debug', 'debug', 'temp_keep', 'allow_manifestless',)
|
||||
|
||||
@staticmethod
|
||||
|
|
@ -165,6 +168,8 @@ class Config:
|
|||
|
||||
LOG.info(f'Keep temp: {self.temp_keep}')
|
||||
|
||||
self.started = time.time()
|
||||
|
||||
def _getAttributes(self) -> dict:
|
||||
attrs: dict = {}
|
||||
vClass: str = self.__class__
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
</div>
|
||||
<button class="modal-close is-large" aria-label="close" @click="video_link = ''"></button>
|
||||
</div>
|
||||
<PageFooter :app_version="config?.app?.version || 'unknown'"
|
||||
:ytdlp_version="config?.app.ytdlp_version || 'unknown'" />
|
||||
<PageFooter :app_version="config?.app?.version || 'unknown'" :ytdlp_version="config?.app.ytdlp_version || 'unknown'"
|
||||
:started="config?.app.started || 0" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,32 @@
|
|||
<style>
|
||||
.user-hint {
|
||||
user-select: none;
|
||||
cursor: help;
|
||||
border-bottom: 1px dotted;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="columns is-multiline mt-3">
|
||||
<div class="column has-text-left">
|
||||
© {{ Year }} - <a href="https://github.com/ArabCoders/ytptube" target="_blank">YTPTube</a>@{{ app_version }}
|
||||
<span class="is-hidden-mobile">
|
||||
- <a href="https://github.com/yt-dlp/yt-dlp">yt-dlp</a>@{{ ytdlp_version }}
|
||||
</span>
|
||||
<div class="columns mt-3 is-mobile">
|
||||
<div class="column is-8-mobile">
|
||||
<div class="has-text-left" v-if="app_version">
|
||||
© {{ Year }} - <a v-tooltip="'App Version: ' + app_version" href="https://github.com/ArabCoders/ytptube"
|
||||
target="_blank">YTPTube</a>
|
||||
- <a v-tooltip="'yt-dlp Version: ' + ytdlp_version" href="https://github.com/yt-dlp/yt-dlp">yt-dlp</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column is-4-mobile" v-if="started > 1">
|
||||
<div class="has-text-right">
|
||||
<span class="user-hint" v-tooltip="'App Started: ' + moment.unix(started).format('YYYY-M-DD H:mm Z')">
|
||||
{{ moment.unix(started).fromNow() }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineProps } from 'vue'
|
||||
import moment from "moment";
|
||||
|
||||
const Year = new Date().getFullYear()
|
||||
|
||||
|
|
@ -23,6 +39,10 @@ defineProps({
|
|||
type: String,
|
||||
required: true,
|
||||
},
|
||||
started: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue