.
This commit is contained in:
parent
66b686727b
commit
960ef979cd
@ -20,7 +20,11 @@ class ExecAfterDownloadPP(PostProcessor):
|
|||||||
if '{}' not in cmd:
|
if '{}' not in cmd:
|
||||||
cmd += ' {}'
|
cmd += ' {}'
|
||||||
|
|
||||||
|
# expose the playlist_index and title variables to exec argument
|
||||||
|
# youtube-dl -x -o "%(playlist_index)s - %(title)s.%(ext)s" --exec "id3v2 -T {playlist_index} -t {title} {}" PLAYLIST_ID
|
||||||
cmd = cmd.replace('{}', compat_shlex_quote(information['filepath']))
|
cmd = cmd.replace('{}', compat_shlex_quote(information['filepath']))
|
||||||
|
cmd = cmd.replace('{title}', compat_shlex_quote(information['title']))
|
||||||
|
cmd = cmd.replace('{playlist_index}', str(information['playlist_index']))
|
||||||
|
|
||||||
self._downloader.to_screen('[exec] Executing command: %s' % cmd)
|
self._downloader.to_screen('[exec] Executing command: %s' % cmd)
|
||||||
retCode = subprocess.call(encodeArgument(cmd), shell=True)
|
retCode = subprocess.call(encodeArgument(cmd), shell=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user