integration running, need to do resolve hacking

This commit is contained in:
Jesse Bannon 2023-12-07 18:09:22 -08:00
parent 887676ef5e
commit 32bcc157ac
5 changed files with 14 additions and 7 deletions

View file

@ -516,10 +516,14 @@ class MultiUrlDownloader(SourcePlugin[MultiUrlValidator]):
# Same with sponsorblock chapters # Same with sponsorblock chapters
SPONSORBLOCK_CHAPTERS: download_entry.kwargs_get(SPONSORBLOCK_CHAPTERS), SPONSORBLOCK_CHAPTERS: download_entry.kwargs_get(SPONSORBLOCK_CHAPTERS),
COMMENTS: download_entry.kwargs_get(COMMENTS), COMMENTS: download_entry.kwargs_get(COMMENTS),
}
)
entry.add(
{
# Tracks number of entries downloaded # Tracks number of entries downloaded
DOWNLOAD_INDEX: download_idx, v.download_index.variable_name: download_idx + 1,
# Tracks number of entries with the same upload date to make them unique # Tracks number of entries with the same upload date to make them unique
UPLOAD_DATE_INDEX: upload_date_idx, v.upload_date_index.variable_name: upload_date_idx + 1,
} }
) )

View file

@ -128,9 +128,10 @@ ENTRY_DEFAULT_VARIABLES: Dict[MetadataVariable, str] = {
v.channel_id: entry_get(v.channel_id, v.uploader_id), v.channel_id: entry_get(v.channel_id, v.uploader_id),
} }
ENTRY_INJECTED_VARIABLES: Dict[MetadataVariable, str] = { # TODO: MARK AS UNRESOLVABLE UNTIL THEY ARE ADDED
v.download_index: entry_get_int(v.download_index, 1), ENTRY_INJECTED_VARIABLES: Dict[Variable, str] = {
v.upload_date_index: entry_get_int(v.upload_date_index, 1), v.download_index: "{%int(1)}",
v.upload_date_index: "{%int(1)}",
} }
ENTRY_DERIVED_VARIABLES: Dict[Variable, str] = { ENTRY_DERIVED_VARIABLES: Dict[Variable, str] = {

View file

@ -52,6 +52,7 @@ SPLIT_BY_CHAPTERS_PARENT_ENTRY = _("split_by_chapters_parent_entry", backend=Tru
COMMENTS = _("comments", backend=True) COMMENTS = _("comments", backend=True)
UID = _("id") UID = _("id")
EXTRACTOR = _("extractor") EXTRACTOR = _("extractor")
EXTRACTOR_KEY = _("extractor_key")
IE_KEY = _("ie_key") IE_KEY = _("ie_key")
EPOCH = _("epoch") EPOCH = _("epoch")
CHANNEL = _("channel") CHANNEL = _("channel")

View file

@ -73,7 +73,7 @@ class DownloadMapping:
""" """
return DownloadMapping( return DownloadMapping(
upload_date=entry.get(v.upload_date_standardized), upload_date=entry.get(v.upload_date_standardized),
extractor=entry.extractor, extractor=entry.get(v.extractor),
file_names=set(), file_names=set(),
) )

View file

@ -16,6 +16,7 @@ from ytdl_sub.entries.variables.kwargs import DESCRIPTION
from ytdl_sub.entries.variables.kwargs import EPOCH from ytdl_sub.entries.variables.kwargs import EPOCH
from ytdl_sub.entries.variables.kwargs import EXT from ytdl_sub.entries.variables.kwargs import EXT
from ytdl_sub.entries.variables.kwargs import EXTRACTOR from ytdl_sub.entries.variables.kwargs import EXTRACTOR
from ytdl_sub.entries.variables.kwargs import EXTRACTOR_KEY
from ytdl_sub.entries.variables.kwargs import IE_KEY from ytdl_sub.entries.variables.kwargs import IE_KEY
from ytdl_sub.entries.variables.kwargs import PLAYLIST_COUNT from ytdl_sub.entries.variables.kwargs import PLAYLIST_COUNT
from ytdl_sub.entries.variables.kwargs import PLAYLIST_ENTRY from ytdl_sub.entries.variables.kwargs import PLAYLIST_ENTRY
@ -69,7 +70,7 @@ def mock_entry_dict_factory(mock_downloaded_file_path) -> Callable:
PLAYLIST_INDEX: playlist_index, PLAYLIST_INDEX: playlist_index,
PLAYLIST_COUNT: playlist_count, PLAYLIST_COUNT: playlist_count,
EXTRACTOR: "mock-entry-dict", EXTRACTOR: "mock-entry-dict",
IE_KEY: "mock-ie-key", EXTRACTOR_KEY: "mock-extractor-key",
TITLE: f"Mock Entry {uid}", TITLE: f"Mock Entry {uid}",
EXT: "mp4", EXT: "mp4",
UPLOAD_DATE: upload_date, UPLOAD_DATE: upload_date,