e2e all passing!
This commit is contained in:
parent
b9888a969e
commit
2c04d7ce6f
2 changed files with 4 additions and 5 deletions
|
|
@ -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 []
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue