mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 14:45:14 +00:00 
			
		
		
		
	[cleanup] Misc
This commit is contained in:
		| @@ -58,6 +58,7 @@ from .postprocessor import ( | ||||
| from .update import detect_variant | ||||
| from .utils import ( | ||||
|     DEFAULT_OUTTMPL, | ||||
|     IDENTITY, | ||||
|     LINK_TEMPLATES, | ||||
|     NO_DEFAULT, | ||||
|     NUMBER_RE, | ||||
| @@ -1002,7 +1003,7 @@ class YoutubeDL: | ||||
|         return self.params['outtmpl'] | ||||
| 
 | ||||
|     def _parse_outtmpl(self): | ||||
|         sanitize = lambda x: x | ||||
|         sanitize = IDENTITY | ||||
|         if self.params.get('restrictfilenames'):  # Remove spaces in the default template | ||||
|             sanitize = lambda x: x.replace(' - ', ' ').replace(' ', '-') | ||||
| 
 | ||||
| @@ -2983,13 +2984,12 @@ class YoutubeDL: | ||||
|                         info_dict['ext'] = os.path.splitext(file)[1][1:] | ||||
|                     return file | ||||
| 
 | ||||
|                 success = True | ||||
|                 merger, fd = FFmpegMergerPP(self), None | ||||
|                 fd, success = None, True | ||||
|                 if info_dict.get('protocol') or info_dict.get('url'): | ||||
|                     fd = get_suitable_downloader(info_dict, self.params, to_stdout=temp_filename == '-') | ||||
|                     if fd is not FFmpegFD and ( | ||||
|                             info_dict.get('section_start') or info_dict.get('section_end')): | ||||
|                         msg = ('This format cannot be partially downloaded' if merger.available | ||||
|                         msg = ('This format cannot be partially downloaded' if FFmpegFD.available() | ||||
|                                else 'You have requested downloading the video partially, but ffmpeg is not installed') | ||||
|                         self.report_error(f'{msg}. Aborting') | ||||
|                         return | ||||
| @@ -3048,6 +3048,7 @@ class YoutubeDL: | ||||
|                     dl_filename = existing_video_file(full_filename, temp_filename) | ||||
|                     info_dict['__real_download'] = False | ||||
| 
 | ||||
|                     merger = FFmpegMergerPP(self) | ||||
|                     downloaded = [] | ||||
|                     if dl_filename is not None: | ||||
|                         self.report_file_already_downloaded(dl_filename) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan