From d95bf4272cb1c6b9b2cde1658f9ab7d312d6d363 Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 27 Nov 2021 14:13:48 +0700 Subject: [PATCH] speedup by only testing selected formats --- tubearchivist/home/src/download.py | 7 ++++--- tubearchivist/home/src/index.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tubearchivist/home/src/download.py b/tubearchivist/home/src/download.py index 8280181c..d96d59ec 100644 --- a/tubearchivist/home/src/download.py +++ b/tubearchivist/home/src/download.py @@ -140,9 +140,10 @@ class PendingList: obs = { "default_search": "ytsearch", "quiet": True, - "skip_download": True, - "check_formats": True, + "check_formats": "selected", "noplaylist": True, + "writethumbnail": True, + "simulate": True, } try: vid = youtube_dl.YoutubeDL(obs).extract_info(youtube_id) @@ -617,7 +618,7 @@ class VideoDownloader: "retries": 3, "writethumbnail": False, "noplaylist": True, - "check_formats": True, + "check_formats": "selected", } if self.config["downloads"]["format"]: obs["format"] = self.config["downloads"]["format"] diff --git a/tubearchivist/home/src/index.py b/tubearchivist/home/src/index.py index 86643461..e28acf87 100644 --- a/tubearchivist/home/src/index.py +++ b/tubearchivist/home/src/index.py @@ -311,7 +311,7 @@ class YoutubeVideo: "quiet": True, "default_search": "ytsearch", "skip_download": True, - "check_formats": True, + "check_formats": "selected", "noplaylist": True, } try: