]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/postprocessor/common.py
[cleanup] Misc fixes and cleanup
[yt-dlp.git] / yt_dlp / postprocessor / common.py
index addc46e5bea43882893337c3639d98910864d8be..9f22b378dfc49ee1a64f0d1b1da59b4f07ef7ae7 100644 (file)
@@ -176,6 +176,8 @@ def add_progress_hook(self, ph):
 
     def report_progress(self, s):
         s['_default_template'] = '%(postprocessor)s %(status)s' % s
+        if not self._downloader:
+            return
 
         progress_dict = s.copy()
         progress_dict.pop('info_dict')
@@ -184,7 +186,8 @@ def report_progress(self, s):
         progress_template = self.get_param('progress_template', {})
         tmpl = progress_template.get('postprocess')
         if tmpl:
-            self._downloader.to_stdout(self._downloader.evaluate_outtmpl(tmpl, progress_dict))
+            self._downloader.to_screen(
+                self._downloader.evaluate_outtmpl(tmpl, progress_dict), skip_eol=True, quiet=False)
 
         self._downloader.to_console_title(self._downloader.evaluate_outtmpl(
             progress_template.get('postprocess-title') or 'yt-dlp %(progress._default_template)s',