[core] Fix format string injection for metadata JSON filename message.
authormk-pmb <mk-pmb@users.noreply.github.com>
Wed, 13 Sep 2023 18:57:05 +0000 (20:57 +0200)
committerdirkf <fieldhouse@gmx.net>
Wed, 6 Dec 2023 02:45:41 +0000 (02:45 +0000)
youtube_dl/YoutubeDL.py

index 13a41928f2c59c5fdd9a44abf1b53339918db22a..6f2aba5ac8efe8b74e46054f9bd5ac3b148cad92 100755 (executable)
@@ -2635,12 +2635,12 @@ class YoutubeDL(object):
             self.to_screen(msg('[info] %s is already present', label.title()))
             return 'exists'
         else:
-            self.to_screen(msg('[info] Writing %s as JSON to: ' + infofn, label))
+            self.to_screen(msg('[info] Writing %s as JSON to: ', label) + infofn)
             try:
                 write_json_file(self.filter_requested_info(info_dict), infofn)
                 return True
             except (OSError, IOError):
-                self.report_error(msg('Cannot write %s to JSON file ' + infofn, label))
+                self.report_error(msg('Cannot write %s to JSON file ', label) + infofn)
                 return
 
     def _write_thumbnails(self, info_dict, filename):