aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/postprocessor/common.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-10-10 02:23:42 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-10-10 02:23:50 +0530
commitaa9a92fdbbca172689495f2990af6a135bae90d5 (patch)
treee01a91056c2cfa476a6d3346c7dbf07a5b6f46e1 /yt_dlp/postprocessor/common.py
parenta170527e1fc382dd7be214c5134f5013a5f0747f (diff)
downloadhypervideo-pre-aa9a92fdbbca172689495f2990af6a135bae90d5.tar.lz
hypervideo-pre-aa9a92fdbbca172689495f2990af6a135bae90d5.tar.xz
hypervideo-pre-aa9a92fdbbca172689495f2990af6a135bae90d5.zip
[downloader/ffmpeg] Fix bug in initializing `FFmpegPostProcessor`
When `FFmpegFD` initializes the PP, it passes `self` as the `downloader` But it does not have a `_postprocessor_hooks` attribute Closes #1211
Diffstat (limited to 'yt_dlp/postprocessor/common.py')
-rw-r--r--yt_dlp/postprocessor/common.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/yt_dlp/postprocessor/common.py b/yt_dlp/postprocessor/common.py
index 376a1c95e..d2daeb0fb 100644
--- a/yt_dlp/postprocessor/common.py
+++ b/yt_dlp/postprocessor/common.py
@@ -90,9 +90,7 @@ class PostProcessor(metaclass=PostProcessorMetaClass):
def set_downloader(self, downloader):
"""Sets the downloader for this PP."""
self._downloader = downloader
- if not downloader:
- return
- for ph in downloader._postprocessor_hooks:
+ for ph in getattr(downloader, '_postprocessor_hooks', []):
self.add_progress_hook(ph)
@staticmethod