From 47173cf37e8f03656a008b865366e95be8da7ac9 Mon Sep 17 00:00:00 2001 From: ArabCoders Date: Fri, 29 Dec 2023 14:10:43 +0300 Subject: [PATCH] stop generating channel json/thumb when queued. --- app/src/Utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/Utils.py b/app/src/Utils.py index fbe4858e..fdb969e7 100644 --- a/app/src/Utils.py +++ b/app/src/Utils.py @@ -171,6 +171,11 @@ def ExtractInfo(config: dict, url: str, debug: bool = False) -> dict: **config, } + # Remove keys that are not needed for info extraction as those keys generate files when used with extract_info. + for key in ('writeinfojson', 'writethumbnail', 'writedescription', 'writeautomaticsub'): + if key in params: + del params[key] + if debug: params['verbose'] = True params['logger'] = logging.getLogger('YTPTube-ytdl')