diff options
author | pukkandan <pukkandan@gmail.com> | 2021-02-03 19:06:09 +0530 |
---|---|---|
committer | pukkandan <pukkandan@gmail.com> | 2021-02-05 04:11:39 +0530 |
commit | de6000d913fd35643cb6faf89919665ddd9ab225 (patch) | |
tree | 6960b6211f37df02e81189f88bdcbd3267edfcfd /youtube_dlc/postprocessor/movefilesafterdownload.py | |
parent | ff88a05cff49ec1a2d6b93c0a420b63537fd6f42 (diff) | |
download | hypervideo-pre-de6000d913fd35643cb6faf89919665ddd9ab225.tar.lz hypervideo-pre-de6000d913fd35643cb6faf89919665ddd9ab225.tar.xz hypervideo-pre-de6000d913fd35643cb6faf89919665ddd9ab225.zip |
Multiple output templates for different file types
Syntax: -o common_template -o type:type_template
Types supported: subtitle|thumbnail|description|annotation|infojson|pl_description|pl_infojson
Diffstat (limited to 'youtube_dlc/postprocessor/movefilesafterdownload.py')
-rw-r--r-- | youtube_dlc/postprocessor/movefilesafterdownload.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dlc/postprocessor/movefilesafterdownload.py b/youtube_dlc/postprocessor/movefilesafterdownload.py index 7dcf12a3b..7f34ac5c5 100644 --- a/youtube_dlc/postprocessor/movefilesafterdownload.py +++ b/youtube_dlc/postprocessor/movefilesafterdownload.py @@ -25,6 +25,7 @@ class MoveFilesAfterDownloadPP(PostProcessor): dl_path, dl_name = os.path.split(encodeFilename(info['filepath'])) finaldir = info.get('__finaldir', dl_path) finalpath = os.path.join(finaldir, dl_name) + self.files_to_move.update(info['__files_to_move']) self.files_to_move[info['filepath']] = finalpath for oldfile, newfile in self.files_to_move.items(): @@ -39,7 +40,7 @@ class MoveFilesAfterDownloadPP(PostProcessor): if os.path.exists(encodeFilename(newfile)): if self.get_param('overwrites', True): self.report_warning('Replacing existing file "%s"' % newfile) - os.path.remove(encodeFilename(newfile)) + os.remove(encodeFilename(newfile)) else: self.report_warning( 'Cannot move file "%s" out of temporary directory since "%s" already exists. ' |