aboutsummaryrefslogtreecommitdiffstats
path: root/ytdlp_plugins/postprocessor
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-01-02 16:23:20 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-01-03 19:40:05 +0530
commitebed8b373214316fce489fe21629fcef91bb9af3 (patch)
tree06901b187ee0b01709902c02b3dd82ca1bb89e2b /ytdlp_plugins/postprocessor
parent1e43a6f7336f4d9691dc52a1bc7cfe14ba7a936d (diff)
downloadhypervideo-pre-ebed8b373214316fce489fe21629fcef91bb9af3.tar.lz
hypervideo-pre-ebed8b373214316fce489fe21629fcef91bb9af3.tar.xz
hypervideo-pre-ebed8b373214316fce489fe21629fcef91bb9af3.zip
Add more post-processing stages
playlist = After entire playlist after_video = After downloading all formats of a video
Diffstat (limited to 'ytdlp_plugins/postprocessor')
-rw-r--r--ytdlp_plugins/postprocessor/sample.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ytdlp_plugins/postprocessor/sample.py b/ytdlp_plugins/postprocessor/sample.py
index 6891280d5..551c4bfff 100644
--- a/ytdlp_plugins/postprocessor/sample.py
+++ b/ytdlp_plugins/postprocessor/sample.py
@@ -14,8 +14,10 @@ class SamplePluginPP(PostProcessor):
# ℹ️ See docstring of yt_dlp.postprocessor.common.PostProcessor.run
def run(self, info):
- filepath = info.get('filepath')
- if filepath: # PP was called after download (default)
+ if info.get('_type', 'video') != 'video': # PP was called for playlist
+ self.to_screen(f'Post-processing playlist {info.get("id")!r} with {self._kwargs}')
+ elif info.get('filepath'): # PP was called after download (default)
+ filepath = info.get('filepath')
self.to_screen(f'Post-processed {filepath!r} with {self._kwargs}')
else: # PP was called before actual download
filepath = info.get('_filename')