youtube e2e working
This commit is contained in:
parent
f5408636c7
commit
f0420acef1
2 changed files with 4 additions and 34 deletions
|
|
@ -23,8 +23,6 @@ from ytdl_sub.downloaders.ytdlp import YTDLP
|
|||
from ytdl_sub.entries.entry import Entry
|
||||
from ytdl_sub.entries.entry_parent import EntryParent
|
||||
from ytdl_sub.entries.script.variable_definitions import VARIABLES as v
|
||||
from ytdl_sub.entries.variables.kwargs import PLAYLIST_ENTRY
|
||||
from ytdl_sub.entries.variables.kwargs import SOURCE_ENTRY
|
||||
from ytdl_sub.utils.file_handler import FileHandler
|
||||
from ytdl_sub.utils.logger import Logger
|
||||
from ytdl_sub.utils.thumbnail import ThumbnailTypes
|
||||
|
|
@ -114,22 +112,18 @@ class UrlDownloaderThumbnailPlugin(SourcePluginExtension):
|
|||
directory, run this function. This lets the downloader add any extra files directly to the
|
||||
output directory, for things like YT channel image, banner.
|
||||
"""
|
||||
if entry.kwargs_contains(PLAYLIST_ENTRY):
|
||||
if playlist_metadata := entry.get(v.playlist_metadata, dict):
|
||||
self._download_parent_thumbnails(
|
||||
thumbnail_list_info=collection_url.playlist_thumbnails,
|
||||
entry=entry,
|
||||
parent=EntryParent(
|
||||
entry.kwargs(PLAYLIST_ENTRY), working_directory=self.working_directory
|
||||
),
|
||||
parent=EntryParent(playlist_metadata, working_directory=self.working_directory),
|
||||
)
|
||||
|
||||
if entry.kwargs_contains(SOURCE_ENTRY):
|
||||
if source_metadata := entry.get(v.source_metadata, dict):
|
||||
self._download_parent_thumbnails(
|
||||
thumbnail_list_info=collection_url.source_thumbnails,
|
||||
entry=entry,
|
||||
parent=EntryParent(
|
||||
entry.kwargs(SOURCE_ENTRY), working_directory=self.working_directory
|
||||
),
|
||||
parent=EntryParent(source_metadata, working_directory=self.working_directory),
|
||||
)
|
||||
|
||||
def modify_entry(self, entry: Entry) -> Optional[Entry]:
|
||||
|
|
|
|||
|
|
@ -16,30 +16,6 @@ def _(key: str, backend: bool = False) -> str:
|
|||
return key
|
||||
|
||||
|
||||
SOURCE_ENTRY = _("source_entry", backend=True)
|
||||
SOURCE_INDEX = _("source_index")
|
||||
SOURCE_COUNT = _("source_count")
|
||||
SOURCE_TITLE = _("source_title")
|
||||
SOURCE_UID = _("source_uid")
|
||||
SOURCE_DESCRIPTION = _("source_description")
|
||||
SOURCE_WEBPAGE_URL = _("source_webpage_url")
|
||||
SOURCE_UPLOADER = _("source_uploader")
|
||||
SOURCE_UPLOADER_ID = _("source_uploader_id")
|
||||
SOURCE_UPLOADER_URL = _("source_uploader_url")
|
||||
|
||||
PLAYLIST_ENTRY = _("playlist_entry", backend=True)
|
||||
PLAYLIST_WEBPAGE_URL = _("playlist_webpage_url")
|
||||
PLAYLIST_INDEX = _("playlist_index")
|
||||
PLAYLIST_COUNT = _("playlist_count")
|
||||
PLAYLIST_MAX_UPLOAD_YEAR = _("playlist_max_upload_year")
|
||||
PLAYLIST_MAX_UPLOAD_YEAR_TRUNCATED = _("playlist_max_upload_year_truncated")
|
||||
PLAYLIST_TITLE = _("playlist_title")
|
||||
PLAYLIST_DESCRIPTION = _("playlist_description")
|
||||
PLAYLIST_UID = _("playlist_uid")
|
||||
PLAYLIST_UPLOADER = _("playlist_uploader")
|
||||
PLAYLIST_UPLOADER_ID = _("playlist_uploader_id")
|
||||
PLAYLIST_UPLOADER_URL = _("playlist_uploader_url")
|
||||
|
||||
CHAPTERS = _("chapters", backend=True)
|
||||
YTDL_SUB_CUSTOM_CHAPTERS = _("ytdl_sub_custom_chapters", backend=True)
|
||||
YTDL_SUB_REGEX_SOURCE_VARS = _("ytdl_sub_regex_source_vars", backend=True)
|
||||
|
|
|
|||
Loading…
Reference in a new issue