From 2c04d7ce6f870766b3128eff764256c1e7dc7139 Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Wed, 13 Dec 2023 09:42:57 -0800 Subject: [PATCH] e2e all passing! --- src/ytdl_sub/plugins/split_by_chapters.py | 5 +++-- src/ytdl_sub/subscriptions/subscription_download.py | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ytdl_sub/plugins/split_by_chapters.py b/src/ytdl_sub/plugins/split_by_chapters.py index 76d7edf2..386b067f 100644 --- a/src/ytdl_sub/plugins/split_by_chapters.py +++ b/src/ytdl_sub/plugins/split_by_chapters.py @@ -113,7 +113,7 @@ class SplitByChaptersOptions(OptionsDictValidator): class SplitByChaptersPlugin(SplitPlugin[SplitByChaptersOptions]): plugin_options_type = SplitByChaptersOptions - def modify_entry(self, entry: Entry) -> Optional[Entry]: + def _non_split_entry(self, entry: Entry) -> Entry: entry.add( { "chapter_title": f"{{ {v.title.variable_name} }}", @@ -178,7 +178,8 @@ class SplitByChaptersPlugin(SplitPlugin[SplitByChaptersOptions]): # If no chapters, do not split anything if not chapters.contains_any_chapters(): if self.plugin_options.when_no_chapters == "pass": - return [(entry, FileMetadata())] + # Modify the entry t + return [(self._non_split_entry(entry), FileMetadata())] if self.plugin_options.when_no_chapters == "drop": return [] diff --git a/src/ytdl_sub/subscriptions/subscription_download.py b/src/ytdl_sub/subscriptions/subscription_download.py index 47be6c25..7bbd09ca 100644 --- a/src/ytdl_sub/subscriptions/subscription_download.py +++ b/src/ytdl_sub/subscriptions/subscription_download.py @@ -289,9 +289,7 @@ class SubscriptionDownload(BaseSubscription, ABC): self._cleanup_entry_files(split_entry) - # Have the split_plugin modify the parent entry before sending it to deletion - # This is needed to resolve any variables that may be needed to delete - self._cleanup_entry_files(split_plugin.modify_entry(entry)) + self._cleanup_entry_files(entry) def _process_subscription( self,