diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 054933e14..16b6a3bc1 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -27,7 +27,12 @@ from .compat import functools, urllib # isort: split from .compat import compat_os_name, compat_shlex_quote, urllib_req_to_req from .cookies import LenientSimpleCookie, load_cookies -from .downloader import FFmpegFD, DashSegmentsFD, get_suitable_downloader, shorten_protocol_name +from .downloader import ( + DashSegmentsFD, + FFmpegFD, + get_suitable_downloader, + shorten_protocol_name, +) from .downloader.rtmp import rtmpdump_version from .extractor import gen_extractor_classes, get_info_extractor from .extractor.common import UnsupportedURLIE @@ -3281,7 +3286,7 @@ def existing_video_file(*filepaths): 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 not (fd is FFmpegFD or fd is DashSegmentsFD) and 'no-direct-merge' not in self.params['compat_opts'] and ( + if fd not in [FFmpegFD, DashSegmentsFD] and 'no-direct-merge' not in self.params['compat_opts'] and ( info_dict.get('section_start') or info_dict.get('section_end')): msg = ('This format cannot be partially downloaded' if FFmpegFD.available() else 'You have requested downloading the video partially, but ffmpeg is not installed') diff --git a/yt_dlp/options.py b/yt_dlp/options.py index a6e145125..23ba7015a 100644 --- a/yt_dlp/options.py +++ b/yt_dlp/options.py @@ -416,13 +416,13 @@ def _alias_callback(option, opt_str, value, parser, opts, nargs): general.add_option( '--live-from-start', action='store_true', dest='live_from_start', - help=('Download livestreams from the start. Currently only supported for YouTube (Experimental).', - 'Time ranges can be specified using --download-sections to download only a part of the stream.', - 'Negative values are allowed for specifying a relative previous time, using the # syntax', - 'e.g. --download-sections "#-24hours - 0" (download last 24 hours),', - 'e.g. --download-sections "#-1h - 30m" (download from 1 hour ago until the next 30 minutes),', - 'e.g. --download-sections "#-3days - -2days" (download from 3 days ago until 2 days ago).', - 'It is also possible to specify an exact unix timestamp range, using the * syntax', + help=('Download livestreams from the start. Currently only supported for YouTube (Experimental). ' + 'Time ranges can be specified using --download-sections to download only a part of the stream. ' + 'Negative values are allowed for specifying a relative previous time, using the # syntax ' + 'e.g. --download-sections "#-24hours - 0" (download last 24 hours), ' + 'e.g. --download-sections "#-1h - 30m" (download from 1 hour ago until the next 30 minutes), ' + 'e.g. --download-sections "#-3days - -2days" (download from 3 days ago until 2 days ago). ' + 'It is also possible to specify an exact unix timestamp range, using the * syntax, ' 'e.g. --download-sections "*1672531200 - 1672549200" (download between those two timestamps)')) general.add_option( '--no-live-from-start',