supports chapter option on downloader
This commit is contained in:
parent
84c8b93e4f
commit
1146fd9659
4 changed files with 7 additions and 0 deletions
|
|
@ -57,6 +57,7 @@ class Downloader(DownloadArchiver, Generic[DownloaderOptionsT, DownloaderEntryT]
|
||||||
|
|
||||||
supports_download_archive: bool = True
|
supports_download_archive: bool = True
|
||||||
supports_subtitles: bool = True
|
supports_subtitles: bool = True
|
||||||
|
supports_chapters: bool = True
|
||||||
|
|
||||||
_extract_entry_num_retries: int = 5
|
_extract_entry_num_retries: int = 5
|
||||||
_extract_entry_retry_wait_sec: int = 3
|
_extract_entry_retry_wait_sec: int = 3
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ class SoundcloudAlbumsAndSinglesDownloader(
|
||||||
):
|
):
|
||||||
downloader_options_type = SoundcloudAlbumsAndSinglesDownloadOptions
|
downloader_options_type = SoundcloudAlbumsAndSinglesDownloadOptions
|
||||||
supports_subtitles = False
|
supports_subtitles = False
|
||||||
|
supports_chapters = False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def ytdl_option_defaults(cls) -> Dict:
|
def ytdl_option_defaults(cls) -> Dict:
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ class YoutubeMergePlaylistDownloader(
|
||||||
downloader_entry_type = YoutubeVideo
|
downloader_entry_type = YoutubeVideo
|
||||||
supports_download_archive = False
|
supports_download_archive = False
|
||||||
supports_subtitles = False
|
supports_subtitles = False
|
||||||
|
supports_chapters = False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def ytdl_option_defaults(cls) -> Dict:
|
def ytdl_option_defaults(cls) -> Dict:
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,10 @@ class SubscriptionYTDLOptions:
|
||||||
if not (chapters_plugin := self._get_plugin(ChaptersPlugin)):
|
if not (chapters_plugin := self._get_plugin(ChaptersPlugin)):
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
if not self._downloader.supports_chapters:
|
||||||
|
# TODO: warn here
|
||||||
|
return {}
|
||||||
|
|
||||||
return chapters_plugin.ytdl_options()
|
return chapters_plugin.ytdl_options()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue