diff --git a/.github/workflows/delete-builds.yml b/.github/workflows/delete-builds.yml index 52bb9740..c835a0d9 100644 --- a/.github/workflows/delete-builds.yml +++ b/.github/workflows/delete-builds.yml @@ -12,8 +12,6 @@ on: - info - warning - debug - schedule: - - cron: "0 0 * * *" jobs: delete-builds: diff --git a/.vscode/launch.json b/.vscode/launch.json index 114acd41..19d0092c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -33,7 +33,8 @@ "YTP_DOWNLOAD_PATH": "${workspaceFolder}/var/downloads", "YTP_TEMP_PATH": "${workspaceFolder}/var/tmp", "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", } } ] diff --git a/Dockerfile b/Dockerfile index 8f7a0571..9af4364c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,7 @@ ENV YTP_TEMP_PATH=/tmp ENV YTP_DOWNLOAD_PATH=/downloads 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 && \ rm -rf /var/cache/apk/* diff --git a/app/src/Config.py b/app/src/Config.py index 49bd92ed..0bb1a42d 100644 --- a/app/src/Config.py +++ b/app/src/Config.py @@ -5,6 +5,7 @@ import re import sys import coloredlogs + class Config: config_path: str = '.' download_path: str = '.' diff --git a/app/src/Download.py b/app/src/Download.py index 74203090..abe4f77c 100644 --- a/app/src/Download.py +++ b/app/src/Download.py @@ -104,9 +104,6 @@ class Download: if self.debug: params['verbose'] = True - params['logger'] = logging.getLogger('YTPTube-ytdl') - else: - params['quiet'] = True if self.info.ytdlp_cookies: try: @@ -122,8 +119,8 @@ class Download: logging.error( f'Invalid cookies: was provided for {self.info.title} - {str(e)}') - logging.debug( - f'Downloading {self.info._id} {self.info.title}... {params}') + logging.info( + f'Downloading {self.info._id=} {self.info.title=}... {params=}') ret = yt_dlp.YoutubeDL(params=params).download([self.info.url]) self.status_queue.put( diff --git a/app/src/Utils.py b/app/src/Utils.py index eac4637a..fbe4858e 100644 --- a/app/src/Utils.py +++ b/app/src/Utils.py @@ -191,6 +191,8 @@ def mergeDict(source: dict, destination: dict) -> dict: source=value, destination=destination_copy.setdefault(key, {}) ) + elif isinstance(value, list) and isinstance(destination_key_value, list): + destination_copy[key] = destination_key_value + value else: destination_copy[key] = value @@ -202,6 +204,7 @@ def mergeConfig(config: dict, new_config: dict) -> dict: ignored_keys: tuple = ( 'cookiefile', + 'download_archive' 'paths', 'outtmpl', 'progress_hooks',