From af0aee79e79dc524e035a139b9608d7bc4634823 Mon Sep 17 00:00:00 2001 From: teddy171 Date: Mon, 30 Jan 2023 08:37:53 +0800 Subject: [PATCH] fix: remove unused value --- youtube_dl/downloader/external.py | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py index 4d28226ec..f98323a52 100644 --- a/youtube_dl/downloader/external.py +++ b/youtube_dl/downloader/external.py @@ -221,23 +221,14 @@ class Aria2pFD(ExternalFD): return cls.__avail def _call_downloader(self, tmpfilename, info_dict): - try: - aria2 = aria2p.API( - aria2p.Client( - host='http://localhost', - port=6800, - secret='' - ) + aria2 = aria2p.API( + aria2p.Client( + host='http://localhost', + port=6800, + secret='' ) - except NameError as exc: - raise ModuleNotFoundError("No moudle named aria2p") from exc - - # ANSI colors - color_code = tuple( - f"\033[{i}m" - for i in range(30, 38) ) - pre_len = -1 + options = { 'min-split-size': '1M', 'max-connection-per-server': 4,