This commit is contained in:
Jesse Bannon 2024-04-25 23:25:18 -07:00
parent a05c1e0263
commit aa1f6ea487
4 changed files with 25 additions and 25 deletions

View file

@ -263,13 +263,13 @@ class ChaptersPlugin(Plugin[ChaptersOptions]):
"force_keyframes": self.plugin_options.force_key_frames,
}
if self.plugin_options.remove_sponsorblock_categories is not None:
remove_chapters_post_processor["remove_sponsor_segments"] = (
self.plugin_options.remove_sponsorblock_categories
)
remove_chapters_post_processor[
"remove_sponsor_segments"
] = self.plugin_options.remove_sponsorblock_categories
if self.plugin_options.remove_chapters_regex is not None:
remove_chapters_post_processor["remove_chapters_patterns"] = (
self.plugin_options.remove_chapters_regex
)
remove_chapters_post_processor[
"remove_chapters_patterns"
] = self.plugin_options.remove_chapters_regex
if self.plugin_options.embed_chapters:
builder.add(

View file

@ -159,9 +159,9 @@ class SplitByChaptersPlugin(SplitPlugin[SplitByChaptersOptions]):
metadata_value_dict = {}
if self.is_dry_run:
metadata_value_dict["Warning"] = (
"Dry-run assumes embedded chapters with no modifications"
)
metadata_value_dict[
"Warning"
] = "Dry-run assumes embedded chapters with no modifications"
metadata_value_dict["Source Title"] = new_entry.title
metadata_value_dict["Segment"] = f"{timestamp_begin} - {timestamp_end}"

View file

@ -74,13 +74,13 @@ class BaseSubscription(ABC):
}
)
self._enhanced_download_archive: Optional[EnhancedDownloadArchive] = (
_initialize_download_archive(
output_options=self.output_options,
overrides=self.overrides,
working_directory=self.working_directory,
output_directory=self.output_directory,
)
self._enhanced_download_archive: Optional[
EnhancedDownloadArchive
] = _initialize_download_archive(
output_options=self.output_options,
overrides=self.overrides,
working_directory=self.working_directory,
output_directory=self.output_directory,
)
# Add post-archive variables

View file

@ -143,9 +143,9 @@ class SubscriptionValueValidator(SubscriptionLeafValidator, StringValidator):
presets=presets,
indent_overrides=indent_overrides,
)
self._overrides_to_add[SubscriptionVariables.subscription_value().variable_name] = (
self.value
)
self._overrides_to_add[
SubscriptionVariables.subscription_value().variable_name
] = self.value
class SubscriptionListValuesValidator(SubscriptionLeafValidator, StringListValidator):
@ -170,9 +170,9 @@ class SubscriptionListValuesValidator(SubscriptionLeafValidator, StringListValid
for idx, list_value in enumerate(self.list):
# Write the first list value into subscription_value as well
if idx == 0:
self._overrides_to_add[SubscriptionVariables.subscription_value().variable_name] = (
list_value.value
)
self._overrides_to_add[
SubscriptionVariables.subscription_value().variable_name
] = list_value.value
self._overrides_to_add[
SubscriptionVariables.subscription_value_i(index=idx).variable_name
@ -219,9 +219,9 @@ class SubscriptionMapValidator(SubscriptionLeafValidator, LiteralDictValidator):
presets=presets,
indent_overrides=indent_overrides,
)
self._overrides_to_add[SubscriptionVariables.subscription_map().variable_name] = (
ScriptUtils.to_script(self.dict)
)
self._overrides_to_add[
SubscriptionVariables.subscription_map().variable_name
] = ScriptUtils.to_script(self.dict)
class SubscriptionValidator(SubscriptionOutput):