From 3a408f9d199127ca2626359e21a866a09ab236b3 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Wed, 11 May 2022 06:36:29 +0530 Subject: [PATCH] Show name of downloader in verbose log Closes #3703 --- yt_dlp/YoutubeDL.py | 2 +- yt_dlp/downloader/common.py | 4 ++++ yt_dlp/downloader/f4m.py | 2 -- yt_dlp/downloader/ism.py | 2 -- yt_dlp/downloader/mhtml.py | 2 -- yt_dlp/downloader/niconico.py | 2 -- yt_dlp/downloader/youtube_live_chat.py | 2 -- 7 files changed, 5 insertions(+), 11 deletions(-) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 38ecd276f..83210f6c8 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -2833,7 +2833,7 @@ class YoutubeDL: urls = '", "'.join( (f['url'].split(',')[0] + ',' if f['url'].startswith('data:') else f['url']) for f in info.get('requested_formats', []) or [info]) - self.write_debug('Invoking downloader on "%s"' % urls) + self.write_debug(f'Invoking {fd.FD_NAME} downloader on "{urls}"') # Note: Ideally info should be a deep-copied so that hooks cannot modify it. # But it may contain objects that are not deep-copyable diff --git a/yt_dlp/downloader/common.py b/yt_dlp/downloader/common.py index d79863300..1f14ebb3a 100644 --- a/yt_dlp/downloader/common.py +++ b/yt_dlp/downloader/common.py @@ -98,6 +98,10 @@ class FileDownloader: def to_screen(self, *args, **kargs): self.ydl.to_screen(*args, quiet=self.params.get('quiet'), **kargs) + @property + def FD_NAME(self): + return re.sub(r'(?