lint
This commit is contained in:
parent
a05c1e0263
commit
aa1f6ea487
4 changed files with 25 additions and 25 deletions
|
|
@ -263,13 +263,13 @@ class ChaptersPlugin(Plugin[ChaptersOptions]):
|
||||||
"force_keyframes": self.plugin_options.force_key_frames,
|
"force_keyframes": self.plugin_options.force_key_frames,
|
||||||
}
|
}
|
||||||
if self.plugin_options.remove_sponsorblock_categories is not None:
|
if self.plugin_options.remove_sponsorblock_categories is not None:
|
||||||
remove_chapters_post_processor["remove_sponsor_segments"] = (
|
remove_chapters_post_processor[
|
||||||
self.plugin_options.remove_sponsorblock_categories
|
"remove_sponsor_segments"
|
||||||
)
|
] = self.plugin_options.remove_sponsorblock_categories
|
||||||
if self.plugin_options.remove_chapters_regex is not None:
|
if self.plugin_options.remove_chapters_regex is not None:
|
||||||
remove_chapters_post_processor["remove_chapters_patterns"] = (
|
remove_chapters_post_processor[
|
||||||
self.plugin_options.remove_chapters_regex
|
"remove_chapters_patterns"
|
||||||
)
|
] = self.plugin_options.remove_chapters_regex
|
||||||
|
|
||||||
if self.plugin_options.embed_chapters:
|
if self.plugin_options.embed_chapters:
|
||||||
builder.add(
|
builder.add(
|
||||||
|
|
|
||||||
|
|
@ -159,9 +159,9 @@ class SplitByChaptersPlugin(SplitPlugin[SplitByChaptersOptions]):
|
||||||
|
|
||||||
metadata_value_dict = {}
|
metadata_value_dict = {}
|
||||||
if self.is_dry_run:
|
if self.is_dry_run:
|
||||||
metadata_value_dict["Warning"] = (
|
metadata_value_dict[
|
||||||
"Dry-run assumes embedded chapters with no modifications"
|
"Warning"
|
||||||
)
|
] = "Dry-run assumes embedded chapters with no modifications"
|
||||||
|
|
||||||
metadata_value_dict["Source Title"] = new_entry.title
|
metadata_value_dict["Source Title"] = new_entry.title
|
||||||
metadata_value_dict["Segment"] = f"{timestamp_begin} - {timestamp_end}"
|
metadata_value_dict["Segment"] = f"{timestamp_begin} - {timestamp_end}"
|
||||||
|
|
|
||||||
|
|
@ -74,13 +74,13 @@ class BaseSubscription(ABC):
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
self._enhanced_download_archive: Optional[EnhancedDownloadArchive] = (
|
self._enhanced_download_archive: Optional[
|
||||||
_initialize_download_archive(
|
EnhancedDownloadArchive
|
||||||
output_options=self.output_options,
|
] = _initialize_download_archive(
|
||||||
overrides=self.overrides,
|
output_options=self.output_options,
|
||||||
working_directory=self.working_directory,
|
overrides=self.overrides,
|
||||||
output_directory=self.output_directory,
|
working_directory=self.working_directory,
|
||||||
)
|
output_directory=self.output_directory,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add post-archive variables
|
# Add post-archive variables
|
||||||
|
|
|
||||||
|
|
@ -143,9 +143,9 @@ class SubscriptionValueValidator(SubscriptionLeafValidator, StringValidator):
|
||||||
presets=presets,
|
presets=presets,
|
||||||
indent_overrides=indent_overrides,
|
indent_overrides=indent_overrides,
|
||||||
)
|
)
|
||||||
self._overrides_to_add[SubscriptionVariables.subscription_value().variable_name] = (
|
self._overrides_to_add[
|
||||||
self.value
|
SubscriptionVariables.subscription_value().variable_name
|
||||||
)
|
] = self.value
|
||||||
|
|
||||||
|
|
||||||
class SubscriptionListValuesValidator(SubscriptionLeafValidator, StringListValidator):
|
class SubscriptionListValuesValidator(SubscriptionLeafValidator, StringListValidator):
|
||||||
|
|
@ -170,9 +170,9 @@ class SubscriptionListValuesValidator(SubscriptionLeafValidator, StringListValid
|
||||||
for idx, list_value in enumerate(self.list):
|
for idx, list_value in enumerate(self.list):
|
||||||
# Write the first list value into subscription_value as well
|
# Write the first list value into subscription_value as well
|
||||||
if idx == 0:
|
if idx == 0:
|
||||||
self._overrides_to_add[SubscriptionVariables.subscription_value().variable_name] = (
|
self._overrides_to_add[
|
||||||
list_value.value
|
SubscriptionVariables.subscription_value().variable_name
|
||||||
)
|
] = list_value.value
|
||||||
|
|
||||||
self._overrides_to_add[
|
self._overrides_to_add[
|
||||||
SubscriptionVariables.subscription_value_i(index=idx).variable_name
|
SubscriptionVariables.subscription_value_i(index=idx).variable_name
|
||||||
|
|
@ -219,9 +219,9 @@ class SubscriptionMapValidator(SubscriptionLeafValidator, LiteralDictValidator):
|
||||||
presets=presets,
|
presets=presets,
|
||||||
indent_overrides=indent_overrides,
|
indent_overrides=indent_overrides,
|
||||||
)
|
)
|
||||||
self._overrides_to_add[SubscriptionVariables.subscription_map().variable_name] = (
|
self._overrides_to_add[
|
||||||
ScriptUtils.to_script(self.dict)
|
SubscriptionVariables.subscription_map().variable_name
|
||||||
)
|
] = ScriptUtils.to_script(self.dict)
|
||||||
|
|
||||||
|
|
||||||
class SubscriptionValidator(SubscriptionOutput):
|
class SubscriptionValidator(SubscriptionOutput):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue