aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeorgekav <>2022-06-06 20:46:29 +0200
committergeorgekav <>2022-06-06 20:46:29 +0200
commit2e6658ce4901d6d0a443235d0fe4b4d15f2a78e0 (patch)
treef1a02641ed3296ba31e7d3ea0baff815d973d189
parentMerge pull request #144 from shalak/enhance_bookmarklets (diff)
downloadmetube-2e6658ce4901d6d0a443235d0fe4b4d15f2a78e0.tar.gz
metube-2e6658ce4901d6d0a443235d0fe4b4d15f2a78e0.tar.bz2
metube-2e6658ce4901d6d0a443235d0fe4b4d15f2a78e0.zip
Use paths parameters from yt_dlp for passing the path instead of making it part of the output template.
This allows to use postprocessors like split-chapters that use their own output template parameter key ("chapter") and not the default one. By providing paths dictionary the postprocessors will respect that path for the output of the processed files.
-rw-r--r--app/ytdl.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/ytdl.py b/app/ytdl.py
index 38e29b8..0128329 100644
--- a/app/ytdl.py
+++ b/app/ytdl.py
@@ -72,7 +72,8 @@ class Download:
'quiet': True,
'no_color': True,
#'skip_download': True,
- 'outtmpl': os.path.join(self.download_dir, self.output_template),
+ 'paths': {"home": self.download_dir},
+ 'outtmpl': { "default": self.output_template},
'format': self.format,
'cachedir': False,
'socket_timeout': 30,
bgstack15