]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/downloader/external.py
[cleanup] Minor fixes (See desc)
[yt-dlp.git] / yt_dlp / downloader / external.py
index 4fe56bb957368b8fa9416798be981a777aae7a40..85c6a6977bfbfa020671aeabc99fa8339b43732d 100644 (file)
@@ -299,7 +299,7 @@ def _make_cmd(self, tmpfilename, info_dict):
                 fragment_filename = '%s-Frag%d' % (os.path.basename(tmpfilename), frag_index)
                 url_list.append('%s\n\tout=%s' % (fragment['url'], fragment_filename))
             stream, _ = self.sanitize_open(url_list_file, 'wb')
-            stream.write('\n'.join(url_list).encode('utf-8'))
+            stream.write('\n'.join(url_list).encode())
             stream.close()
             cmd += ['-i', url_list_file]
         else:
@@ -368,7 +368,7 @@ def _call_downloader(self, tmpfilename, info_dict):
 
         # These exists only for compatibility. Extractors should use
         # info_dict['downloader_options']['ffmpeg_args'] instead
-        args += info_dict.get('_ffmpeg_args')
+        args += info_dict.get('_ffmpeg_args') or []
         seekable = info_dict.get('_seekable')
         if seekable is not None:
             # setting -seekable prevents ffmpeg from guessing if the server