apply formatter
This commit is contained in:
parent
9dbb024c37
commit
730a5a89d5
3 changed files with 9 additions and 5 deletions
|
|
@ -428,15 +428,17 @@ class Downloader(DownloadArchiver, Generic[DownloaderOptionsT], ABC):
|
|||
"""
|
||||
Downloads only info.json files and forms EntryParent trees
|
||||
"""
|
||||
url = self.overrides.apply_formatter(collection_url.url)
|
||||
|
||||
with self._separate_download_archives():
|
||||
entry_dicts = self.extract_info_via_info_json(
|
||||
only_info_json=True,
|
||||
url=collection_url.url,
|
||||
url=url,
|
||||
log_prefix_on_info_json_dl="Downloading metadata for",
|
||||
)
|
||||
|
||||
self.parents = EntryParent.from_entry_dicts(
|
||||
url=collection_url.url,
|
||||
url=url,
|
||||
entry_dicts=entry_dicts,
|
||||
working_directory=self.working_directory,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -59,13 +59,13 @@ class CollectionUrlValidator(StrictDictValidator):
|
|||
)
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
def url(self) -> OverridesStringFormatterValidator:
|
||||
"""
|
||||
URL to download from, listed in priority from lowest (top) to highest (bottom). If a
|
||||
download exists in more than one URL, it will resolve to the bottom-most one and inherit
|
||||
those variables.
|
||||
"""
|
||||
return self._url.value
|
||||
return self._url
|
||||
|
||||
@property
|
||||
def variables(self) -> DictFormatterValidator:
|
||||
|
|
|
|||
|
|
@ -144,7 +144,9 @@ class YoutubeMergePlaylistDownloader(Downloader[YoutubeMergePlaylistDownloaderOp
|
|||
|
||||
def download(self) -> List[Tuple[Entry, FileMetadata]]:
|
||||
"""Download a single Youtube video, then split it into multiple videos"""
|
||||
entry_dict = self.extract_info(url=self.collection.collection_urls.list[0].url)
|
||||
url = self.overrides.apply_formatter(self.collection.collection_urls.list[0].url)
|
||||
|
||||
entry_dict = self.extract_info(url=url)
|
||||
merged_video = self._to_merged_video(entry_dict=entry_dict)
|
||||
|
||||
merged_video_metadata = self._get_chapters(
|
||||
|
|
|
|||
Loading…
Reference in a new issue