Fixed bug preventing postprocessors from running.
This commit is contained in:
parent
2432549e89
commit
14ba9fa5ca
6 changed files with 9 additions and 9 deletions
2
.github/workflows/delete-builds.yml
vendored
2
.github/workflows/delete-builds.yml
vendored
|
|
@ -12,8 +12,6 @@ on:
|
||||||
- info
|
- info
|
||||||
- warning
|
- warning
|
||||||
- debug
|
- debug
|
||||||
schedule:
|
|
||||||
- cron: "0 0 * * *"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
delete-builds:
|
delete-builds:
|
||||||
|
|
|
||||||
3
.vscode/launch.json
vendored
3
.vscode/launch.json
vendored
|
|
@ -33,7 +33,8 @@
|
||||||
"YTP_DOWNLOAD_PATH": "${workspaceFolder}/var/downloads",
|
"YTP_DOWNLOAD_PATH": "${workspaceFolder}/var/downloads",
|
||||||
"YTP_TEMP_PATH": "${workspaceFolder}/var/tmp",
|
"YTP_TEMP_PATH": "${workspaceFolder}/var/tmp",
|
||||||
"YTP_YTDL_OPTIONS_FILE": "${workspaceFolder}/var/config/ytdlp.json",
|
"YTP_YTDL_OPTIONS_FILE": "${workspaceFolder}/var/config/ytdlp.json",
|
||||||
"YTP_URL_HOST": "http://localhost:8081"
|
"YTP_URL_HOST": "http://localhost:8081",
|
||||||
|
"YTP_YTDL_DEBUG": "true",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ ENV YTP_TEMP_PATH=/tmp
|
||||||
ENV YTP_DOWNLOAD_PATH=/downloads
|
ENV YTP_DOWNLOAD_PATH=/downloads
|
||||||
|
|
||||||
RUN mkdir /config /downloads && ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime && echo ${TZ} > /etc/timezone && \
|
RUN mkdir /config /downloads && ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime && echo ${TZ} > /etc/timezone && \
|
||||||
apk add --update --no-cache bash ffmpeg aria2 coreutils curl shadow sqlite tzdata && \
|
apk add --update --no-cache bash ffmpeg mkvtoolnix patch aria2 coreutils curl shadow sqlite tzdata && \
|
||||||
useradd -u ${USER_ID:-1000} -U -d /app -s /bin/bash app && \
|
useradd -u ${USER_ID:-1000} -U -d /app -s /bin/bash app && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import re
|
||||||
import sys
|
import sys
|
||||||
import coloredlogs
|
import coloredlogs
|
||||||
|
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
config_path: str = '.'
|
config_path: str = '.'
|
||||||
download_path: str = '.'
|
download_path: str = '.'
|
||||||
|
|
|
||||||
|
|
@ -104,9 +104,6 @@ class Download:
|
||||||
|
|
||||||
if self.debug:
|
if self.debug:
|
||||||
params['verbose'] = True
|
params['verbose'] = True
|
||||||
params['logger'] = logging.getLogger('YTPTube-ytdl')
|
|
||||||
else:
|
|
||||||
params['quiet'] = True
|
|
||||||
|
|
||||||
if self.info.ytdlp_cookies:
|
if self.info.ytdlp_cookies:
|
||||||
try:
|
try:
|
||||||
|
|
@ -122,8 +119,8 @@ class Download:
|
||||||
logging.error(
|
logging.error(
|
||||||
f'Invalid cookies: was provided for {self.info.title} - {str(e)}')
|
f'Invalid cookies: was provided for {self.info.title} - {str(e)}')
|
||||||
|
|
||||||
logging.debug(
|
logging.info(
|
||||||
f'Downloading {self.info._id} {self.info.title}... {params}')
|
f'Downloading {self.info._id=} {self.info.title=}... {params=}')
|
||||||
ret = yt_dlp.YoutubeDL(params=params).download([self.info.url])
|
ret = yt_dlp.YoutubeDL(params=params).download([self.info.url])
|
||||||
|
|
||||||
self.status_queue.put(
|
self.status_queue.put(
|
||||||
|
|
|
||||||
|
|
@ -191,6 +191,8 @@ def mergeDict(source: dict, destination: dict) -> dict:
|
||||||
source=value,
|
source=value,
|
||||||
destination=destination_copy.setdefault(key, {})
|
destination=destination_copy.setdefault(key, {})
|
||||||
)
|
)
|
||||||
|
elif isinstance(value, list) and isinstance(destination_key_value, list):
|
||||||
|
destination_copy[key] = destination_key_value + value
|
||||||
else:
|
else:
|
||||||
destination_copy[key] = value
|
destination_copy[key] = value
|
||||||
|
|
||||||
|
|
@ -202,6 +204,7 @@ def mergeConfig(config: dict, new_config: dict) -> dict:
|
||||||
|
|
||||||
ignored_keys: tuple = (
|
ignored_keys: tuple = (
|
||||||
'cookiefile',
|
'cookiefile',
|
||||||
|
'download_archive'
|
||||||
'paths',
|
'paths',
|
||||||
'outtmpl',
|
'outtmpl',
|
||||||
'progress_hooks',
|
'progress_hooks',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue