A feature-rich command-line audio/video downloader
[movefiles] Don't give "cant find" warning when move is unnecessary
pukkandan9882064024ab
diff --git a/youtube_dlc/postprocessor/movefilesafterdownload.py b/youtube_dlc/postprocessor/movefilesafterdownload.pyindex 4146a9549c..7dcf12a3b3 100644--- a/youtube_dlc/postprocessor/movefilesafterdownload.py+++ b/youtube_dlc/postprocessor/movefilesafterdownload.py@@ -28,14 +28,14 @@ class MoveFilesAfterDownloadPP(PostProcessor):self.files_to_move[info['filepath']] = finalpathfor oldfile, newfile in self.files_to_move.items():- if not os.path.exists(encodeFilename(oldfile)):- self.report_warning('File "%s" cannot be found' % oldfile)- continueif not newfile:newfile = os.path.join(finaldir, os.path.basename(encodeFilename(oldfile)))oldfile, newfile = compat_str(oldfile), compat_str(newfile)if os.path.abspath(encodeFilename(oldfile)) == os.path.abspath(encodeFilename(newfile)):continue+ if not os.path.exists(encodeFilename(oldfile)):+ self.report_warning('File "%s" cannot be found' % oldfile)+ continueif os.path.exists(encodeFilename(newfile)):if self.get_param('overwrites', True):self.report_warning('Replacing existing file "%s"' % newfile)