summaryrefslogtreecommitdiffstats
path: root/yt_dlp/postprocessor/movefilesafterdownload.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
commit7e21328585afda6d66f98ca476301680eeffac32 (patch)
tree266a4e7b20443f94572748781d71fc0375a15037 /yt_dlp/postprocessor/movefilesafterdownload.py
parentAdding upstream version 2024.05.27. (diff)
downloadyt-dlp-7e21328585afda6d66f98ca476301680eeffac32.tar.xz
yt-dlp-7e21328585afda6d66f98ca476301680eeffac32.zip
Adding upstream version 2024.07.01.upstream/2024.07.01
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/postprocessor/movefilesafterdownload.py')
-rw-r--r--yt_dlp/postprocessor/movefilesafterdownload.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/yt_dlp/postprocessor/movefilesafterdownload.py b/yt_dlp/postprocessor/movefilesafterdownload.py
index 23b0924..35e8705 100644
--- a/yt_dlp/postprocessor/movefilesafterdownload.py
+++ b/yt_dlp/postprocessor/movefilesafterdownload.py
@@ -34,16 +34,15 @@ class MoveFilesAfterDownloadPP(PostProcessor):
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)
+ self.report_warning(f'File "{oldfile}" cannot be found')
continue
if os.path.exists(encodeFilename(newfile)):
if self.get_param('overwrites', True):
- self.report_warning('Replacing existing file "%s"' % newfile)
+ self.report_warning(f'Replacing existing file "{newfile}"')
os.remove(encodeFilename(newfile))
else:
self.report_warning(
- 'Cannot move file "%s" out of temporary directory since "%s" already exists. '
- % (oldfile, newfile))
+ f'Cannot move file "{oldfile}" out of temporary directory since "{newfile}" already exists. ')
continue
make_dir(newfile, PostProcessingError)
self.to_screen(f'Moving file "{oldfile}" to "{newfile}"')