diff --git a/src/ytdl_sub/config/preset.py b/src/ytdl_sub/config/preset.py index d8380839..b89e1d53 100644 --- a/src/ytdl_sub/config/preset.py +++ b/src/ytdl_sub/config/preset.py @@ -255,11 +255,18 @@ class Preset(_PresetShell): """ return cls(config=config, name=preset_name, value=preset_dict) - @property - def yaml(self) -> str: + def yaml(self, subscription_only: bool) -> str: """ + Parameters + ---------- + subscription_only: + Only include the subscription contents, not the surrounding boiler-plate. + Returns ------- Preset in YAML format """ + if subscription_only: + return dump_yaml(self._value) + return dump_yaml({"presets": {self._name: self._value}}) diff --git a/src/ytdl_sub/config/validators/variable_validation.py b/src/ytdl_sub/config/validators/variable_validation.py index 82069d7c..941d228e 100644 --- a/src/ytdl_sub/config/validators/variable_validation.py +++ b/src/ytdl_sub/config/validators/variable_validation.py @@ -1,4 +1,6 @@ from typing import Dict +from typing import List +from typing import Set from ytdl_sub.config.overrides import Overrides from ytdl_sub.config.plugin.plugin_mapping import PluginMapping @@ -7,80 +9,166 @@ from ytdl_sub.config.plugin.preset_plugins import PresetPlugins from ytdl_sub.config.preset_options import OutputOptions from ytdl_sub.config.validators.options import OptionsValidator from ytdl_sub.downloaders.url.validators import MultiUrlValidator +from ytdl_sub.entries.script.variable_definitions import UNRESOLVED_VARIABLES +from ytdl_sub.entries.script.variable_definitions import VARIABLES +from ytdl_sub.script.script import Script +from ytdl_sub.script.utils.name_validation import is_function +from ytdl_sub.utils.script import ScriptUtils from ytdl_sub.validators.string_formatter_validators import validate_formatters +class ResolutionLevel: + ORIGINAL = 0 + FILL = 1 + RESOLVE = 2 + INTERNAL = 3 + + @classmethod + def name_of(cls, resolution_level: int) -> str: + """ + Name of the resolution level. + """ + if resolution_level == cls.ORIGINAL: + return "original" + if resolution_level == cls.FILL: + return "fill" + if resolution_level == cls.RESOLVE: + return "resolve" + if resolution_level == cls.INTERNAL: + return "internal" + raise ValueError("Invalid resolution level") + + @classmethod + def all(cls) -> List[int]: + """ + All possible resolution levels. + """ + return [cls.ORIGINAL, cls.FILL, cls.RESOLVE, cls.INTERNAL] + + class VariableValidation: + + def _get_resolve_partial_filter(self) -> Set[str]: + # Exclude sanitized variables from partial validation. This lessens the work + # and prevents double-evaluation, which can lead to bad behavior like double-prints. + return { + name + for name in self.script.variable_names + if name not in self.unresolved_variables and not name.endswith("_sanitized") + } + + def _apply_resolution_level(self) -> None: + if self._resolution_level == ResolutionLevel.FILL: + self.unresolved_variables |= VARIABLES.variable_names(include_sanitized=True) + # Only partial resolve definitions that are already resolved + self.unresolved_variables |= { + name + for name in self.overrides.keys + if not is_function(name) and not self.script.definition_of(name).maybe_resolvable + } + elif self._resolution_level == ResolutionLevel.RESOLVE: + # Partial resolve everything, but not including internal variables + self.unresolved_variables |= VARIABLES.variable_names(include_sanitized=True) + elif self._resolution_level == ResolutionLevel.INTERNAL: + # Partial resolve everything including internal variables + pass + else: + raise ValueError("Invalid resolution level for validation") + + self.script = self.script.resolve_partial( + unresolvable=self.unresolved_variables, + output_filter=self._get_resolve_partial_filter(), + ) + def __init__( self, overrides: Overrides, downloader_options: MultiUrlValidator, output_options: OutputOptions, plugins: PresetPlugins, + resolution_level: int = ResolutionLevel.RESOLVE, ): self.overrides = overrides self.downloader_options = downloader_options self.output_options = output_options self.plugins = plugins - self.script = self.overrides.script - self.unresolved_variables = self.plugins.get_all_variables( + self.script: Script = self.overrides.script + self.unresolved_variables = ( + self.plugins.get_all_variables( + additional_options=[self.output_options, self.downloader_options] + ) + | UNRESOLVED_VARIABLES + ) + self.unresolved_runtime_variables = self.plugins.get_all_variables( additional_options=[self.output_options, self.downloader_options] ) + self._resolution_level = resolution_level - def _add_variables(self, plugin_op: PluginOperation, options: OptionsValidator) -> None: + self._apply_resolution_level() + + def _add_runtime_variables(self, plugin_op: PluginOperation, options: OptionsValidator) -> None: """ Add dummy variables for script validation """ added_variables = options.added_variables( - unresolved_variables=self.unresolved_variables, + unresolved_variables=self.unresolved_runtime_variables, ).get(plugin_op, set()) modified_variables = options.modified_variables().get(plugin_op, set()) - self.unresolved_variables -= added_variables | modified_variables + self.unresolved_runtime_variables -= added_variables | modified_variables - def ensure_proper_usage(self) -> Dict: + def ensure_proper_usage(self, partial_resolve_formatters: bool = False) -> Dict: """ Validate variables resolve as plugins are executed, and return a mock script which contains actualized added variables from the plugins """ - resolved_subscription: Dict = {} - self._add_variables(PluginOperation.DOWNLOADER, options=self.downloader_options) + self._add_runtime_variables(PluginOperation.DOWNLOADER, options=self.downloader_options) # Always add output options first - self._add_variables(PluginOperation.MODIFY_ENTRY_METADATA, options=self.output_options) + self._add_runtime_variables( + PluginOperation.MODIFY_ENTRY_METADATA, options=self.output_options + ) # Metadata variables to be added for plugin_options in PluginMapping.order_options_by( self.plugins.zipped(), PluginOperation.MODIFY_ENTRY_METADATA ): - self._add_variables(PluginOperation.MODIFY_ENTRY_METADATA, options=plugin_options) + self._add_runtime_variables( + PluginOperation.MODIFY_ENTRY_METADATA, options=plugin_options + ) for plugin_options in PluginMapping.order_options_by( self.plugins.zipped(), PluginOperation.MODIFY_ENTRY ): - self._add_variables(PluginOperation.MODIFY_ENTRY, options=plugin_options) + self._add_runtime_variables(PluginOperation.MODIFY_ENTRY, options=plugin_options) # Validate that any formatter in the plugin options can resolve resolved_subscription |= validate_formatters( script=self.script, unresolved_variables=self.unresolved_variables, + unresolved_runtime_variables=self.unresolved_runtime_variables, validator=plugin_options, + partial_resolve_formatters=partial_resolve_formatters, ) resolved_subscription |= validate_formatters( script=self.script, unresolved_variables=self.unresolved_variables, + unresolved_runtime_variables=self.unresolved_runtime_variables, validator=self.output_options, + partial_resolve_formatters=partial_resolve_formatters, ) # TODO: make this a function raw_download_output = validate_formatters( script=self.script, unresolved_variables=self.unresolved_variables, + unresolved_runtime_variables=self.unresolved_runtime_variables, validator=self.downloader_options.urls, + partial_resolve_formatters=partial_resolve_formatters, ) resolved_subscription["download"] = [] for url_output in raw_download_output["download"]: @@ -90,5 +178,19 @@ class VariableValidation: if url_output["url"]: resolved_subscription["download"].append(url_output) - assert not self.unresolved_variables + # TODO: make function + resolved_subscription["overrides"] = {} + for name in self.overrides.keys: + value = self.script.definition_of(name) + if name in self.script.function_names: + # Keep custom functions as-is + resolved_subscription["overrides"][name] = self.overrides.dict_with_format_strings[ + name + ] + elif resolved := value.maybe_resolvable: + resolved_subscription["overrides"][name] = resolved.native + else: + resolved_subscription["overrides"][name] = ScriptUtils.to_native_script(value) + + assert not self.unresolved_runtime_variables return resolved_subscription diff --git a/src/ytdl_sub/entries/script/variable_definitions.py b/src/ytdl_sub/entries/script/variable_definitions.py index 67505473..97fb7759 100644 --- a/src/ytdl_sub/entries/script/variable_definitions.py +++ b/src/ytdl_sub/entries/script/variable_definitions.py @@ -1135,6 +1135,16 @@ class VariableDefinitions( ] } + @cache + def variable_names(self, include_sanitized: bool): + """ + Returns all variable names, and can include sanitized. + """ + var_names: Set[str] = self.scripts().keys() + if include_sanitized: + var_names |= {f"{name}_sanitized" for name in var_names} + return var_names + @cache def injected_variables(self) -> Set[MetadataVariable]: """ diff --git a/src/ytdl_sub/script/script.py b/src/ytdl_sub/script/script.py index 5d73613e..41c3f1be 100644 --- a/src/ytdl_sub/script/script.py +++ b/src/ytdl_sub/script/script.py @@ -1,5 +1,4 @@ # pylint: disable=missing-raises-doc -import copy from collections import defaultdict from typing import Dict from typing import List @@ -693,6 +692,18 @@ class Script: raise RuntimeException(f"Tried to get unresolved variable {variable_name}") + def definition_of(self, name: str) -> SyntaxTree: + """ + Returns + ------- + The definition of the variable or function. + """ + if name.startswith("%") and name[1:] in self._functions: + return self._functions[name[1:]] + if name in self._variables: + return self._variables[name] + raise RuntimeException(f"Tried to get non-existent definition with name {name}") + @property def variable_names(self) -> Set[str]: """ @@ -713,10 +724,57 @@ class Script: """ return set(to_function_definition_name(name) for name in self._functions.keys()) - def resolve_partial( + def _resolve_partial_loop( + self, + output_filter: Optional[Set[str]], + resolved: Dict[Variable, Resolvable], + unresolved: Dict[Variable, Argument], + unresolvable: Optional[Set[str]], + ): + to_partially_resolve: Set[Variable] = ( + {Variable(name) for name in output_filter} if output_filter else set(unresolved.keys()) + ) + + partially_resolved = True + while partially_resolved: + + partially_resolved = False + + for variable in list(to_partially_resolve): + definition = unresolved[variable] + maybe_resolved = definition + + if isinstance(definition, Variable) and definition.name not in unresolvable: + if definition in resolved: + maybe_resolved = resolved[definition] + elif definition in unresolved: + maybe_resolved = unresolved[definition] + else: + raise UNREACHABLE + elif isinstance(definition, VariableDependency): + maybe_resolved = definition.partial_resolve( + resolved_variables=resolved, + unresolved_variables=unresolved, + custom_functions=self._functions, + ) + + if isinstance(maybe_resolved, Resolvable): + resolved[variable] = maybe_resolved + del unresolved[variable] + to_partially_resolve.remove(variable) + partially_resolved = True + else: + unresolved[variable] = maybe_resolved + + # If the definition changed, then the script changed + # which means we can iterate again + partially_resolved |= definition != maybe_resolved + + def _resolve_partial( self, unresolvable: Optional[Set[str]] = None, - ) -> "Script": + output_filter: Optional[Set[str]] = None, + ) -> Dict[str, SyntaxTree]: """ Returns ------- @@ -731,40 +789,54 @@ class Script: if name not in unresolvable } - partially_resolved = True - while partially_resolved: - - partially_resolved = False - - for variable in list(unresolved.keys()): - definition = unresolved[variable] - - maybe_resolved = definition - if isinstance(definition, Variable) and definition.name not in unresolvable: - maybe_resolved = resolved.get(definition, unresolved[definition]) - elif isinstance(definition, VariableDependency): - maybe_resolved = definition.partial_resolve( - resolved_variables=resolved, - unresolved_variables=unresolved, - custom_functions=self._functions, - ) - - if isinstance(maybe_resolved, Resolvable): - resolved[variable] = maybe_resolved - del unresolved[variable] - partially_resolved = True - else: - unresolved[variable] = maybe_resolved - - # If the definition changed, then the script changed - # which means we can iterate again - partially_resolved |= definition != maybe_resolved - - return copy.deepcopy(self).add_parsed( - {var_name: self._variables[var_name] for var_name in unresolvable} - | { - var.name: ResolvedSyntaxTree(ast=[definition]) - for var, definition in resolved.items() - } - | {var.name: SyntaxTree(ast=[definition]) for var, definition in unresolved.items()} + self._resolve_partial_loop( + output_filter=output_filter, + resolved=resolved, + unresolved=unresolved, + unresolvable=unresolvable, ) + + if output_filter: + out: Dict[str, SyntaxTree] = {} + for name in output_filter: + variable_name = Variable(name) + if variable_name in resolved: + out[name] = ResolvedSyntaxTree(ast=[resolved[variable_name]]) + else: + out[name] = SyntaxTree(ast=[unresolved[variable_name]]) + + return out + + return { + var.name: ResolvedSyntaxTree(ast=[definition]) for var, definition in resolved.items() + } | {var.name: SyntaxTree(ast=[definition]) for var, definition in unresolved.items()} + + def resolve_partial( + self, + unresolvable: Optional[Set[str]] = None, + output_filter: Optional[Set[str]] = None, + ) -> "Script": + """ + Updates the internal script to resolve as much as possible. + """ + out = self._resolve_partial(unresolvable=unresolvable, output_filter=output_filter) + for var_name, definition in out.items(): + self._variables[var_name] = definition + + return self + + def resolve_partial_once( + self, variable_definitions: Dict[str, SyntaxTree], unresolvable: Optional[Set[str]] = None + ) -> Dict[str, SyntaxTree]: + """ + Partially resolves the input variable definitions as much as possible. + """ + try: + self.add_parsed(variable_definitions) + return self._resolve_partial( + unresolvable=unresolvable, + output_filter=set(list(variable_definitions.keys())), + ) + finally: + for name in variable_definitions.keys(): + self._variables.pop(name, None) diff --git a/src/ytdl_sub/script/types/function.py b/src/ytdl_sub/script/types/function.py index d34c0a47..bf64108b 100644 --- a/src/ytdl_sub/script/types/function.py +++ b/src/ytdl_sub/script/types/function.py @@ -371,13 +371,6 @@ class BuiltInFunction(Function, BuiltInFunctionType): If the conditional partially resolvable enough to warrant evaluation, perform it here. """ - if self.is_subset_of( - variables=resolved_variables, custom_function_definitions=custom_functions - ): - return self.resolve( - resolved_variables=resolved_variables, - custom_functions=custom_functions, - ) if self.name == "if": maybe_resolvable_arg, is_resolvable = VariableDependency.try_partial_resolve( diff --git a/src/ytdl_sub/script/types/syntax_tree.py b/src/ytdl_sub/script/types/syntax_tree.py index 2a970300..e914f396 100644 --- a/src/ytdl_sub/script/types/syntax_tree.py +++ b/src/ytdl_sub/script/types/syntax_tree.py @@ -55,6 +55,10 @@ class SyntaxTree(VariableDependency): custom_functions=custom_functions, ) + # If no arguments, must be empty string + if len(maybe_resolvable_values) == 0: + return String(value="") + # Mimic the above resolve behavior if len(maybe_resolvable_values) > 1: return BuiltInFunction(name="concat", args=maybe_resolvable_values) diff --git a/src/ytdl_sub/script/types/variable_dependency.py b/src/ytdl_sub/script/types/variable_dependency.py index 5cfee863..a185a0af 100644 --- a/src/ytdl_sub/script/types/variable_dependency.py +++ b/src/ytdl_sub/script/types/variable_dependency.py @@ -279,8 +279,11 @@ class VariableDependency(ABC): if not isinstance(maybe_resolvable_args[-1], Resolvable): is_resolvable = False elif isinstance(arg, Variable): - if arg not in resolved_variables: + if arg in resolved_variables: + maybe_resolvable_args[-1] = resolved_variables[arg] + else: is_resolvable = False + # Could be un unresolvable if arg in unresolved_variables: maybe_resolvable_args[-1] = unresolved_variables[arg] diff --git a/src/ytdl_sub/subscriptions/base_subscription.py b/src/ytdl_sub/subscriptions/base_subscription.py index 656e98ed..553eb74d 100644 --- a/src/ytdl_sub/subscriptions/base_subscription.py +++ b/src/ytdl_sub/subscriptions/base_subscription.py @@ -8,6 +8,7 @@ from ytdl_sub.config.plugin.preset_plugins import PresetPlugins from ytdl_sub.config.preset import Preset from ytdl_sub.config.preset_options import OutputOptions from ytdl_sub.config.preset_options import YTDLOptions +from ytdl_sub.config.validators.variable_validation import ResolutionLevel from ytdl_sub.config.validators.variable_validation import VariableValidation from ytdl_sub.downloaders.url.validators import MultiUrlValidator from ytdl_sub.entries.variables.override_variables import SubscriptionVariables @@ -79,7 +80,7 @@ class BaseSubscription(ABC): ) # Validate after adding the subscription name - self._validated_dict = VariableValidation( + _ = VariableValidation( overrides=self.overrides, downloader_options=self.downloader_options, output_options=self.output_options, @@ -254,12 +255,22 @@ class BaseSubscription(ABC): ------- Subscription in yaml format """ - return self._preset_options.yaml + return self._preset_options.yaml(subscription_only=False) - def resolved_yaml(self) -> str: + def resolved_yaml(self, resolution_level: int = ResolutionLevel.RESOLVE) -> str: """ Returns ------- Human-readable, condensed YAML definition of the subscription. """ - return dump_yaml(self._validated_dict) + if resolution_level == ResolutionLevel.ORIGINAL: + return self._preset_options.yaml(subscription_only=True) + + out = VariableValidation( + overrides=self.overrides, + downloader_options=self.downloader_options, + output_options=self.output_options, + plugins=self.plugins, + resolution_level=resolution_level, + ).ensure_proper_usage(partial_resolve_formatters=True) + return dump_yaml(out) diff --git a/src/ytdl_sub/validators/string_formatter_validators.py b/src/ytdl_sub/validators/string_formatter_validators.py index 66a9815a..b9fdd3ea 100644 --- a/src/ytdl_sub/validators/string_formatter_validators.py +++ b/src/ytdl_sub/validators/string_formatter_validators.py @@ -5,14 +5,12 @@ from typing import Set from typing import Union from typing import final -from ytdl_sub.entries.script.variable_definitions import VARIABLES from ytdl_sub.script.parser import parse from ytdl_sub.script.script import Script from ytdl_sub.script.types.syntax_tree import SyntaxTree from ytdl_sub.script.utils.exceptions import RuntimeException from ytdl_sub.script.utils.exceptions import ScriptVariableNotResolved from ytdl_sub.script.utils.exceptions import UserException -from ytdl_sub.script.utils.exceptions import UserThrownRuntimeError from ytdl_sub.utils.exceptions import StringFormattingVariableNotFoundException from ytdl_sub.utils.script import ScriptUtils from ytdl_sub.validators.validators import DictValidator @@ -244,15 +242,15 @@ class UnstructuredOverridesDictFormatterValidator(UnstructuredDictFormatterValid def _validate_formatter( mock_script: Script, unresolved_variables: Set[str], + unresolved_runtime_variables: Set[str], formatter_validator: Union[StringFormatterValidator, OverridesStringFormatterValidator], -) -> str: + partial_resolve_entry_formatters: bool, +) -> Any: parsed = formatter_validator.parsed if resolved := parsed.maybe_resolvable: - return resolved.native + return formatter_validator.post_process(resolved.native) is_static_formatter = isinstance(formatter_validator, OverridesStringFormatterValidator) - if is_static_formatter: - unresolved_variables = unresolved_variables.union({VARIABLES.entry_metadata.variable_name}) variable_names = {var.name for var in parsed.variables} custom_function_names = {f"%{func.name}" for func in parsed.custom_functions} @@ -272,20 +270,32 @@ def _validate_formatter( "contains the following custom functions that do not exist: " f"{', '.join(sorted(custom_function_names - mock_script.function_names))}" ) - if unresolved := variable_names.intersection(unresolved_variables): + if unresolved := variable_names.intersection(unresolved_runtime_variables): raise StringFormattingVariableNotFoundException( "contains the following variables that are unresolved when executing this " f"formatter: {', '.join(sorted(unresolved))}" ) + + if partial_resolve_entry_formatters and not is_static_formatter: + parsed = mock_script.resolve_partial_once( + variable_definitions={"tmp_var": formatter_validator.parsed}, + unresolvable=unresolved_variables, + )["tmp_var"] + try: if is_static_formatter: - return mock_script.resolve_once_parsed( - {"tmp_var": formatter_validator.parsed}, - unresolvable=unresolved_variables, - update=True, - )["tmp_var"].native + return formatter_validator.post_process( + mock_script.resolve_once_parsed( + {"tmp_var": formatter_validator.parsed}, + unresolvable=unresolved_variables, + update=True, + )["tmp_var"].native + ) - return formatter_validator.format_string + if maybe_resolved := parsed.maybe_resolvable: + return formatter_validator.post_process(maybe_resolved) + + return ScriptUtils.to_native_script(parsed) except RuntimeException as exc: if isinstance(exc, ScriptVariableNotResolved) and is_static_formatter: raise StringFormattingVariableNotFoundException( @@ -293,18 +303,14 @@ def _validate_formatter( "entry variables" ) from exc raise StringFormattingVariableNotFoundException(exc) from exc - except UserThrownRuntimeError as exc: - # Errors are expected for non-static formatters due to missing entry - # data. Raise otherwise. - if not is_static_formatter: - return formatter_validator.format_string - raise exc def validate_formatters( script: Script, unresolved_variables: Set[str], + unresolved_runtime_variables: Set[str], validator: Validator, + partial_resolve_formatters: bool, ) -> Dict: """ Ensure all OverridesStringFormatterValidator's only contain variables from the overrides @@ -320,7 +326,9 @@ def validate_formatters( resolved_dict[validator.leaf_name] |= validate_formatters( script=script, unresolved_variables=unresolved_variables, + unresolved_runtime_variables=unresolved_runtime_variables, validator=validator_value, + partial_resolve_formatters=partial_resolve_formatters, ) elif isinstance(validator, ListValidator): resolved_dict[validator.leaf_name] = [] @@ -328,7 +336,9 @@ def validate_formatters( list_output = validate_formatters( script=script, unresolved_variables=unresolved_variables, + unresolved_runtime_variables=unresolved_runtime_variables, validator=list_value, + partial_resolve_formatters=partial_resolve_formatters, ) assert len(list_output) == 1 resolved_dict[validator.leaf_name].append(list(list_output.values())[0]) @@ -336,7 +346,9 @@ def validate_formatters( resolved_dict[validator.leaf_name] = _validate_formatter( mock_script=script, unresolved_variables=unresolved_variables, + unresolved_runtime_variables=unresolved_runtime_variables, formatter_validator=validator, + partial_resolve_entry_formatters=partial_resolve_formatters, ) elif isinstance(validator, (DictFormatterValidator, OverridesDictFormatterValidator)): resolved_dict[validator.leaf_name] = {} @@ -344,7 +356,9 @@ def validate_formatters( resolved_dict[validator.leaf_name] |= _validate_formatter( mock_script=script, unresolved_variables=unresolved_variables, + unresolved_runtime_variables=unresolved_runtime_variables, formatter_validator=validator_value, + partial_resolve_entry_formatters=partial_resolve_formatters, ) else: resolved_dict[validator.leaf_name] = validator._value diff --git a/tests/integration/plugins/test_output_options.py b/tests/integration/plugins/test_output_options.py index 458416b4..b65692b5 100644 --- a/tests/integration/plugins/test_output_options.py +++ b/tests/integration/plugins/test_output_options.py @@ -236,24 +236,14 @@ class TestOutputOptions: ): output_options_subscription_dict["output_options"]["keep_files_date_eval"] = "nope" - subscription = Subscription.from_dict( - config=config, - preset_name=subscription_name, - preset_dict=output_options_subscription_dict, - ) - expected_error_msg = ( "Validation error in subscription_test.output_options.keep_files_date_eval: " "Expected a standardized date in the form of YYYY-MM-DD, but received 'nope'" ) - with ( - mock_download_collection_entries( - is_youtube_channel=False, - num_urls=1, - is_extracted_audio=False, - is_dry_run=True, - ), - pytest.raises(ValidationException, match=re.escape(expected_error_msg)), - ): - subscription.download(dry_run=True) + with pytest.raises(ValidationException, match=re.escape(expected_error_msg)): + _ = Subscription.from_dict( + config=config, + preset_name=subscription_name, + preset_dict=output_options_subscription_dict, + ) diff --git a/tests/resources/expected_json/music/inspect_full_overrides.json b/tests/resources/expected_json/music/inspect_full_overrides.json deleted file mode 100644 index b4fcae9c..00000000 --- a/tests/resources/expected_json/music/inspect_full_overrides.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "album_cover_path": "Lester Young/{ %concat( \"[\", %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ), \"] \", %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }/folder.{ thumbnail_ext }", - "album_dir": "[{ %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ) }] { %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "artist_dir": "Lester Young", - "avatar_uncropped_thumbnail_file_name": "", - "banner_uncropped_thumbnail_file_name": "", - "enable_resolution_assert": "{ %bool(True) }", - "enable_throttle_protection": "{ %bool(True) }", - "include_sibling_metadata": "{ %bool(True) }", - "modified_webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", - "music_directory": "tv_show_directory_path", - "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", - "resolution_assert_height_gte": "{ %int(361) }", - "resolution_assert_ignore_titles": "{ [ ] }", - "resolution_assert_is_ignored": "{ %print_if_true( %concat( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), resolution_assert_ignore_titles ) ) }", - "resolution_assert_print": "{ %bool(True) }", - "resolution_readable": "{ %map_get_non_empty( entry_metadata, \"width\", 0 ) }x{ %map_get_non_empty( entry_metadata, \"height\", 0 ) }", - "subscription_array": "{ [ \"https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists\" ] }", - "subscription_indent_1": "Jazz", - "subscription_value": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", - "subscription_value_1": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", - "track_album": "{ %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "track_album_artist": "Lester Young", - "track_artist": "Lester Young", - "track_date": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", - "track_file_name": "{ %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ) } - { %sanitize( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }.{ ext }", - "track_full_path": "{ artist_dir }/{ %concat( \"[\", %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ), \"] \", %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }/{ %concat( %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ), \" - \", %sanitize( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ), \".\", ext ) }", - "track_genre": "Jazz", - "track_genre_default": "Unset", - "track_number": "{ %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ) }", - "track_number_padded": "{ %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ) }", - "track_original_date": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", - "track_title": "{ %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) }", - "track_total": "{ %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ) }", - "track_year": "{ %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ) }", - "url": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", - "url10": "", - "url100": "", - "url11": "", - "url12": "", - "url13": "", - "url14": "", - "url15": "", - "url16": "", - "url17": "", - "url18": "", - "url19": "", - "url2": "", - "url20": "", - "url21": "", - "url22": "", - "url23": "", - "url24": "", - "url25": "", - "url26": "", - "url27": "", - "url28": "", - "url29": "", - "url3": "", - "url30": "", - "url31": "", - "url32": "", - "url33": "", - "url34": "", - "url35": "", - "url36": "", - "url37": "", - "url38": "", - "url39": "", - "url4": "", - "url40": "", - "url41": "", - "url42": "", - "url43": "", - "url44": "", - "url45": "", - "url46": "", - "url47": "", - "url48": "", - "url49": "", - "url5": "", - "url50": "", - "url51": "", - "url52": "", - "url53": "", - "url54": "", - "url55": "", - "url56": "", - "url57": "", - "url58": "", - "url59": "", - "url6": "", - "url60": "", - "url61": "", - "url62": "", - "url63": "", - "url64": "", - "url65": "", - "url66": "", - "url67": "", - "url68": "", - "url69": "", - "url7": "", - "url70": "", - "url71": "", - "url72": "", - "url73": "", - "url74": "", - "url75": "", - "url76": "", - "url77": "", - "url78": "", - "url79": "", - "url8": "", - "url80": "", - "url81": "", - "url82": "", - "url83": "", - "url84": "", - "url85": "", - "url86": "", - "url87": "", - "url88": "", - "url89": "", - "url9": "", - "url90": "", - "url91": "", - "url92": "", - "url93": "", - "url94": "", - "url95": "", - "url96": "", - "url97": "", - "url98": "", - "url99": "", - "urls": "{ [ \"https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists\" ] }" -} \ No newline at end of file diff --git a/tests/resources/expected_json/music/inspect_full_variables.json b/tests/resources/expected_json/music/inspect_full_variables.json deleted file mode 100644 index 25c2274a..00000000 --- a/tests/resources/expected_json/music/inspect_full_variables.json +++ /dev/null @@ -1,482 +0,0 @@ -{ - "album_cover_path": "Lester Young/{ %concat( \"[\", %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ), \"] \", %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }/folder.{ thumbnail_ext }", - "album_cover_path_sanitized": "{ %sanitize( %concat( \"Lester Young\", \"/\", %concat( \"[\", %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ), \"] \", %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ), \"/folder.\", thumbnail_ext ) ) }", - "album_dir": "[{ %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ) }] { %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "album_dir_sanitized": "{ %sanitize( %concat( \"[\", %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ), \"] \", %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ) }", - "artist_dir": "Lester Young", - "artist_dir_sanitized": "Lester Young", - "avatar_uncropped_thumbnail_file_name": "", - "avatar_uncropped_thumbnail_file_name_sanitized": "", - "banner_uncropped_thumbnail_file_name": "", - "banner_uncropped_thumbnail_file_name_sanitized": "", - "channel": "{ %map_get_non_empty( entry_metadata, \"channel\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "channel_id": "{ %map_get_non_empty( entry_metadata, \"channel_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "channel_id_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"channel_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "channel_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"channel\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "chapters": "{ [ ] }", - "chapters_sanitized": "[]", - "comments": "{ [ ] }", - "comments_sanitized": "[]", - "creator": "{ %map_get_non_empty( entry_metadata, \"creator\", %map_get_non_empty( entry_metadata, \"channel\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "creator_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"creator\", %map_get_non_empty( entry_metadata, \"channel\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ) }", - "description": "{ %map_get_non_empty( entry_metadata, \"description\", '' ) }", - "description_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"description\", '' ) ) }", - "download_index": "{ %int(1) }", - "download_index_padded6": "000001", - "download_index_padded6_sanitized": "000001", - "download_index_sanitized": "1", - "duration": "{ %map_get_non_empty( entry_metadata, \"duration\", 0 ) }", - "duration_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"duration\", 0 ) ) }", - "enable_resolution_assert": "{ %bool(True) }", - "enable_resolution_assert_sanitized": "true", - "enable_throttle_protection": "{ %bool(True) }", - "enable_throttle_protection_sanitized": "true", - "entry_metadata": "{ { } }", - "entry_metadata_sanitized": "{ %sanitize( entry_metadata ) }", - "epoch": "{ %map_get( entry_metadata, \"epoch\" ) }", - "epoch_date": "{ %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) }", - "epoch_date_sanitized": "{ %sanitize( %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) }", - "epoch_hour": "{ %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%H\" ) }", - "epoch_hour_sanitized": "{ %sanitize( %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%H\" ) ) }", - "epoch_sanitized": "{ %sanitize( %map_get( entry_metadata, \"epoch\" ) ) }", - "ext": "{ %throw( \"Plugin variable ext has not been created yet\" ) }", - "ext_sanitized": "{ %sanitize( ext ) }", - "extractor": "{ %map_get( entry_metadata, \"extractor\" ) }", - "extractor_key": "{ %map_get( entry_metadata, \"extractor_key\" ) }", - "extractor_key_sanitized": "{ %sanitize( %map_get( entry_metadata, \"extractor_key\" ) ) }", - "extractor_sanitized": "{ %sanitize( %map_get( entry_metadata, \"extractor\" ) ) }", - "height": "{ %map_get_non_empty( entry_metadata, \"height\", 0 ) }", - "height_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"height\", 0 ) ) }", - "ie_key": "{ %map_get_non_empty( entry_metadata, \"ie_key\", %map_get( entry_metadata, \"extractor_key\" ) ) }", - "ie_key_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"ie_key\", %map_get( entry_metadata, \"extractor_key\" ) ) ) }", - "include_sibling_metadata": "{ %bool(True) }", - "include_sibling_metadata_sanitized": "true", - "info_json_ext": "info.json", - "info_json_ext_sanitized": "info.json", - "modified_webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", - "modified_webpage_url_sanitized": "{ %sanitize( %map_get( entry_metadata, \"webpage_url\" ) ) }", - "music_directory": "tv_show_directory_path", - "music_directory_sanitized": "tv_show_directory_path", - "playlist_count": "{ %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ) }", - "playlist_count_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ) ) }", - "playlist_description": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"description\", %map_get_non_empty( entry_metadata, \"description\", '' ) ) }", - "playlist_description_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"description\", %map_get_non_empty( entry_metadata, \"description\", '' ) ) ) }", - "playlist_index": "{ %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ) }", - "playlist_index_padded": "{ %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ) }", - "playlist_index_padded6": "{ %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 6 ) }", - "playlist_index_padded6_sanitized": "{ %sanitize( %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 6 ) ) }", - "playlist_index_padded_sanitized": "{ %sanitize( %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ) ) }", - "playlist_index_reversed": "{ %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ) }", - "playlist_index_reversed_padded": "{ %pad_zero( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ), 2 ) }", - "playlist_index_reversed_padded6": "{ %pad_zero( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ), 6 ) }", - "playlist_index_reversed_padded6_sanitized": "{ %sanitize( %pad_zero( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ), 6 ) ) }", - "playlist_index_reversed_padded_sanitized": "{ %sanitize( %pad_zero( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ), 2 ) ) }", - "playlist_index_reversed_sanitized": "{ %sanitize( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ) ) }", - "playlist_index_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ) ) }", - "playlist_max_upload_date": "{ %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) }", - "playlist_max_upload_date_sanitized": "{ %sanitize( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ) }", - "playlist_max_upload_year": "{ %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ) }", - "playlist_max_upload_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ) ) }", - "playlist_max_upload_year_truncated": "{ %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year_truncated\" ) ) }", - "playlist_max_upload_year_truncated_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year_truncated\" ) ) ) }", - "playlist_metadata": "{ %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ) }", - "playlist_metadata_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ) ) }", - "playlist_title": "{ %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "playlist_title_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "playlist_uid": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_id\", %map_get( entry_metadata, \"id\" ) ) }", - "playlist_uid_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "playlist_uploader": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "playlist_uploader_id": "{ %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "playlist_uploader_id_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "playlist_uploader_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "playlist_uploader_url": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader_url\", %map_get( entry_metadata, \"webpage_url\" ) ) }", - "playlist_uploader_url_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) }", - "playlist_webpage_url": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) }", - "playlist_webpage_url_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) }", - "release_date": "{ %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) }", - "release_date_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ) }", - "release_date_standardized": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"date_standardized\" ) ) }", - "release_date_standardized_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"date_standardized\" ) ) ) }", - "release_day": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day\" ) ) }", - "release_day_of_year": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year\" ) ) }", - "release_day_of_year_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_padded\" ) ) }", - "release_day_of_year_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_padded\" ) ) ) }", - "release_day_of_year_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_reversed\" ) ) }", - "release_day_of_year_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_reversed_padded\" ) ) }", - "release_day_of_year_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_reversed_padded\" ) ) ) }", - "release_day_of_year_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_reversed\" ) ) ) }", - "release_day_of_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year\" ) ) ) }", - "release_day_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_padded\" ) ) }", - "release_day_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_padded\" ) ) ) }", - "release_day_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_reversed\" ) ) }", - "release_day_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_reversed_padded\" ) ) }", - "release_day_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_reversed_padded\" ) ) ) }", - "release_day_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_reversed\" ) ) ) }", - "release_day_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day\" ) ) ) }", - "release_month": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month\" ) ) }", - "release_month_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_padded\" ) ) }", - "release_month_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_padded\" ) ) ) }", - "release_month_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_reversed\" ) ) }", - "release_month_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_reversed_padded\" ) ) }", - "release_month_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_reversed_padded\" ) ) ) }", - "release_month_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_reversed\" ) ) ) }", - "release_month_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month\" ) ) ) }", - "release_year": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year\" ) ) }", - "release_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year\" ) ) ) }", - "release_year_truncated": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year_truncated\" ) ) }", - "release_year_truncated_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year_truncated_reversed\" ) ) }", - "release_year_truncated_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year_truncated_reversed\" ) ) ) }", - "release_year_truncated_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year_truncated\" ) ) ) }", - "requested_subtitles": "{ { } }", - "requested_subtitles_sanitized": "{}", - "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", - "resolution_assert_height_gte": "{ %int(361) }", - "resolution_assert_height_gte_sanitized": "361", - "resolution_assert_ignore_titles": "{ [ ] }", - "resolution_assert_ignore_titles_sanitized": "[]", - "resolution_assert_is_ignored": "{ %print_if_true( %concat( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), resolution_assert_ignore_titles ) ) }", - "resolution_assert_is_ignored_sanitized": "{ %sanitize( %print_if_true( %concat( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), resolution_assert_ignore_titles ) ) ) }", - "resolution_assert_print": "{ %bool(True) }", - "resolution_assert_print_sanitized": "true", - "resolution_assert_sanitized": "{ %sanitize( %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) ) }", - "resolution_readable": "{ %map_get_non_empty( entry_metadata, \"width\", 0 ) }x{ %map_get_non_empty( entry_metadata, \"height\", 0 ) }", - "resolution_readable_sanitized": "{ %sanitize( %concat( %map_get_non_empty( entry_metadata, \"width\", 0 ), \"x\", %map_get_non_empty( entry_metadata, \"height\", 0 ) ) ) }", - "sibling_metadata": "{ %map_get_non_empty( entry_metadata, \"sibling_metadata\", [ ] ) }", - "sibling_metadata_sanitized": "{ %sanitize( sibling_metadata ) }", - "source_count": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_count\", 1 ) }", - "source_count_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_count\", 1 ) ) }", - "source_description": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"description\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"description\", %map_get_non_empty( entry_metadata, \"description\", '' ) ) ) }", - "source_description_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"description\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"description\", %map_get_non_empty( entry_metadata, \"description\", '' ) ) ) ) }", - "source_index": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_index\", 1 ) }", - "source_index_padded": "{ %pad_zero( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_index\", 1 ), 2 ) }", - "source_index_padded_sanitized": "{ %sanitize( %pad_zero( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_index\", 1 ), 2 ) ) }", - "source_index_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_index\", 1 ) ) }", - "source_metadata": "{ %map_get_non_empty( entry_metadata, \"source_metadata\", { } ) }", - "source_metadata_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ) ) }", - "source_title": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"title\", %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "source_title_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"title\", %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "source_uid": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"id\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "source_uid_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"id\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "source_uploader": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "source_uploader_id": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader_id\", %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "source_uploader_id_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader_id\", %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "source_uploader_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ) }", - "source_uploader_url": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"webpage_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) ) }", - "source_uploader_url_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"webpage_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) ) ) }", - "source_webpage_url": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"webpage_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) }", - "source_webpage_url_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"webpage_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) ) }", - "sponsorblock_chapters": "{ [ ] }", - "sponsorblock_chapters_sanitized": "[]", - "subscription_array": "{ [ \"https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists\" ] }", - "subscription_array_sanitized": "[\uff02https\uff1a\u29f8\u29f8www.youtube.com\u29f8channel\u29f8UCsItMF6_fP754ihIsSRLk5A\u29f8playlists\uff02]", - "subscription_has_download_archive": "{ %bool(False) }", - "subscription_has_download_archive_sanitized": "false", - "subscription_indent_1": "Jazz", - "subscription_indent_1_sanitized": "Jazz", - "subscription_name": "Lester Young", - "subscription_name_sanitized": "Lester Young", - "subscription_value": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", - "subscription_value_1": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", - "subscription_value_1_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8channel\u29f8UCsItMF6_fP754ihIsSRLk5A\u29f8playlists", - "subscription_value_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8channel\u29f8UCsItMF6_fP754ihIsSRLk5A\u29f8playlists", - "thumbnail_ext": "jpg", - "thumbnail_ext_sanitized": "jpg", - "title": "{ %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) }", - "title_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "title_sanitized_plex": "{ %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "title_sanitized_plex_sanitized": "{ %sanitize( %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "track_album": "{ %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "track_album_artist": "Lester Young", - "track_album_artist_sanitized": "Lester Young", - "track_album_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "track_artist": "Lester Young", - "track_artist_sanitized": "Lester Young", - "track_date": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", - "track_date_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) ) }", - "track_file_name": "{ %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ) } - { %sanitize( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }.{ ext }", - "track_file_name_sanitized": "{ %sanitize( %concat( %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ), \" - \", %sanitize( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ), \".\", ext ) ) }", - "track_full_path": "{ artist_dir }/{ %concat( \"[\", %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ), \"] \", %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }/{ %concat( %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ), \" - \", %sanitize( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ), \".\", ext ) }", - "track_full_path_sanitized": "{ %sanitize( %concat( artist_dir, \"/\", %concat( \"[\", %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ), \"] \", %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ), \"/\", %concat( %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ), \" - \", %sanitize( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ), \".\", ext ) ) ) }", - "track_genre": "Jazz", - "track_genre_default": "Unset", - "track_genre_default_sanitized": "Unset", - "track_genre_sanitized": "Jazz", - "track_number": "{ %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ) }", - "track_number_padded": "{ %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ) }", - "track_number_padded_sanitized": "{ %sanitize( %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ) ) }", - "track_number_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ) ) }", - "track_original_date": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", - "track_original_date_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) ) }", - "track_title": "{ %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) }", - "track_title_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "track_total": "{ %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ) }", - "track_total_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ) ) }", - "track_year": "{ %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ) }", - "track_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ) ) }", - "uid": "{ %map_get( entry_metadata, \"id\" ) }", - "uid_sanitized": "{ %sanitize( %map_get( entry_metadata, \"id\" ) ) }", - "uid_sanitized_plex": "{ %sanitize_plex_episode( %map_get( entry_metadata, \"id\" ) ) }", - "uid_sanitized_plex_sanitized": "{ %sanitize( %sanitize_plex_episode( %map_get( entry_metadata, \"id\" ) ) ) }", - "upload_date": "{ %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) }", - "upload_date_index": "{ %int(1) }", - "upload_date_index_padded": "01", - "upload_date_index_padded_sanitized": "01", - "upload_date_index_reversed": "{ %int(99) }", - "upload_date_index_reversed_padded": "99", - "upload_date_index_reversed_padded_sanitized": "99", - "upload_date_index_reversed_sanitized": "99", - "upload_date_index_sanitized": "1", - "upload_date_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) }", - "upload_date_standardized": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", - "upload_date_standardized_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) ) }", - "upload_day": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day\" ) ) }", - "upload_day_of_year": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year\" ) ) }", - "upload_day_of_year_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_padded\" ) ) }", - "upload_day_of_year_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_padded\" ) ) ) }", - "upload_day_of_year_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_reversed\" ) ) }", - "upload_day_of_year_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_reversed_padded\" ) ) }", - "upload_day_of_year_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_reversed_padded\" ) ) ) }", - "upload_day_of_year_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_reversed\" ) ) ) }", - "upload_day_of_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year\" ) ) ) }", - "upload_day_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ) }", - "upload_day_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ) ) }", - "upload_day_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_reversed\" ) ) }", - "upload_day_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_reversed_padded\" ) ) }", - "upload_day_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_reversed_padded\" ) ) ) }", - "upload_day_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_reversed\" ) ) ) }", - "upload_day_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day\" ) ) ) }", - "upload_month": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ) }", - "upload_month_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_padded\" ) ) }", - "upload_month_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_padded\" ) ) ) }", - "upload_month_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_reversed\" ) ) }", - "upload_month_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_reversed_padded\" ) ) }", - "upload_month_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_reversed_padded\" ) ) ) }", - "upload_month_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_reversed\" ) ) ) }", - "upload_month_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ) ) }", - "upload_year": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }", - "upload_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) }", - "upload_year_truncated": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year_truncated\" ) ) }", - "upload_year_truncated_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year_truncated_reversed\" ) ) }", - "upload_year_truncated_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year_truncated_reversed\" ) ) ) }", - "upload_year_truncated_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year_truncated\" ) ) ) }", - "uploader": "{ %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "uploader_id": "{ %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) }", - "uploader_id_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "uploader_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "uploader_url": "{ %map_get_non_empty( entry_metadata, \"uploader_url\", %map_get( entry_metadata, \"webpage_url\" ) ) }", - "uploader_url_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"uploader_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) }", - "url": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", - "url10": "", - "url100": "", - "url100_sanitized": "", - "url10_sanitized": "", - "url11": "", - "url11_sanitized": "", - "url12": "", - "url12_sanitized": "", - "url13": "", - "url13_sanitized": "", - "url14": "", - "url14_sanitized": "", - "url15": "", - "url15_sanitized": "", - "url16": "", - "url16_sanitized": "", - "url17": "", - "url17_sanitized": "", - "url18": "", - "url18_sanitized": "", - "url19": "", - "url19_sanitized": "", - "url2": "", - "url20": "", - "url20_sanitized": "", - "url21": "", - "url21_sanitized": "", - "url22": "", - "url22_sanitized": "", - "url23": "", - "url23_sanitized": "", - "url24": "", - "url24_sanitized": "", - "url25": "", - "url25_sanitized": "", - "url26": "", - "url26_sanitized": "", - "url27": "", - "url27_sanitized": "", - "url28": "", - "url28_sanitized": "", - "url29": "", - "url29_sanitized": "", - "url2_sanitized": "", - "url3": "", - "url30": "", - "url30_sanitized": "", - "url31": "", - "url31_sanitized": "", - "url32": "", - "url32_sanitized": "", - "url33": "", - "url33_sanitized": "", - "url34": "", - "url34_sanitized": "", - "url35": "", - "url35_sanitized": "", - "url36": "", - "url36_sanitized": "", - "url37": "", - "url37_sanitized": "", - "url38": "", - "url38_sanitized": "", - "url39": "", - "url39_sanitized": "", - "url3_sanitized": "", - "url4": "", - "url40": "", - "url40_sanitized": "", - "url41": "", - "url41_sanitized": "", - "url42": "", - "url42_sanitized": "", - "url43": "", - "url43_sanitized": "", - "url44": "", - "url44_sanitized": "", - "url45": "", - "url45_sanitized": "", - "url46": "", - "url46_sanitized": "", - "url47": "", - "url47_sanitized": "", - "url48": "", - "url48_sanitized": "", - "url49": "", - "url49_sanitized": "", - "url4_sanitized": "", - "url5": "", - "url50": "", - "url50_sanitized": "", - "url51": "", - "url51_sanitized": "", - "url52": "", - "url52_sanitized": "", - "url53": "", - "url53_sanitized": "", - "url54": "", - "url54_sanitized": "", - "url55": "", - "url55_sanitized": "", - "url56": "", - "url56_sanitized": "", - "url57": "", - "url57_sanitized": "", - "url58": "", - "url58_sanitized": "", - "url59": "", - "url59_sanitized": "", - "url5_sanitized": "", - "url6": "", - "url60": "", - "url60_sanitized": "", - "url61": "", - "url61_sanitized": "", - "url62": "", - "url62_sanitized": "", - "url63": "", - "url63_sanitized": "", - "url64": "", - "url64_sanitized": "", - "url65": "", - "url65_sanitized": "", - "url66": "", - "url66_sanitized": "", - "url67": "", - "url67_sanitized": "", - "url68": "", - "url68_sanitized": "", - "url69": "", - "url69_sanitized": "", - "url6_sanitized": "", - "url7": "", - "url70": "", - "url70_sanitized": "", - "url71": "", - "url71_sanitized": "", - "url72": "", - "url72_sanitized": "", - "url73": "", - "url73_sanitized": "", - "url74": "", - "url74_sanitized": "", - "url75": "", - "url75_sanitized": "", - "url76": "", - "url76_sanitized": "", - "url77": "", - "url77_sanitized": "", - "url78": "", - "url78_sanitized": "", - "url79": "", - "url79_sanitized": "", - "url7_sanitized": "", - "url8": "", - "url80": "", - "url80_sanitized": "", - "url81": "", - "url81_sanitized": "", - "url82": "", - "url82_sanitized": "", - "url83": "", - "url83_sanitized": "", - "url84": "", - "url84_sanitized": "", - "url85": "", - "url85_sanitized": "", - "url86": "", - "url86_sanitized": "", - "url87": "", - "url87_sanitized": "", - "url88": "", - "url88_sanitized": "", - "url89": "", - "url89_sanitized": "", - "url8_sanitized": "", - "url9": "", - "url90": "", - "url90_sanitized": "", - "url91": "", - "url91_sanitized": "", - "url92": "", - "url92_sanitized": "", - "url93": "", - "url93_sanitized": "", - "url94": "", - "url94_sanitized": "", - "url95": "", - "url95_sanitized": "", - "url96": "", - "url96_sanitized": "", - "url97": "", - "url97_sanitized": "", - "url98": "", - "url98_sanitized": "", - "url99": "", - "url99_sanitized": "", - "url9_sanitized": "", - "url_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8channel\u29f8UCsItMF6_fP754ihIsSRLk5A\u29f8playlists", - "urls": "{ [ \"https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists\" ] }", - "urls_sanitized": "[\uff02https\uff1a\u29f8\u29f8www.youtube.com\u29f8channel\u29f8UCsItMF6_fP754ihIsSRLk5A\u29f8playlists\uff02]", - "webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", - "webpage_url_sanitized": "{ %sanitize( %map_get( entry_metadata, \"webpage_url\" ) ) }", - "width": "{ %map_get_non_empty( entry_metadata, \"width\", 0 ) }", - "width_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"width\", 0 ) ) }", - "ytdl_sub_entry_date_eval": "{ %string( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) ) }", - "ytdl_sub_entry_date_eval_sanitized": "{ %sanitize( %string( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) ) ) }", - "ytdl_sub_input_url": "", - "ytdl_sub_input_url_count": "{ %int(0) }", - "ytdl_sub_input_url_count_sanitized": "0", - "ytdl_sub_input_url_index": "{ %int(-1) }", - "ytdl_sub_input_url_index_sanitized": "-1", - "ytdl_sub_input_url_sanitized": "" -} \ No newline at end of file diff --git a/tests/resources/expected_json/music/inspect_overrides.json b/tests/resources/expected_json/music/inspect_overrides.json deleted file mode 100644 index 69ef99c4..00000000 --- a/tests/resources/expected_json/music/inspect_overrides.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "album_cover_path": "Lester Young/{ %concat( \"[\", playlist_max_upload_year, \"] \", %sanitize( playlist_title ) ) }/folder.{ thumbnail_ext }", - "album_dir": "[{ playlist_max_upload_year }] { %sanitize( playlist_title ) }", - "artist_dir": "Lester Young", - "avatar_uncropped_thumbnail_file_name": "", - "banner_uncropped_thumbnail_file_name": "", - "enable_resolution_assert": "{ %bool(True) }", - "enable_throttle_protection": "{ %bool(True) }", - "include_sibling_metadata": "{ %bool(True) }", - "modified_webpage_url": "{ webpage_url }", - "music_directory": "tv_show_directory_path", - "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", - "resolution_assert_height_gte": "{ %int(361) }", - "resolution_assert_ignore_titles": "{ [ ] }", - "resolution_assert_is_ignored": "{ %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, resolution_assert_ignore_titles ) ) }", - "resolution_assert_print": "{ %bool(True) }", - "resolution_readable": "{ width }x{ height }", - "subscription_array": "{ [ \"https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists\" ] }", - "subscription_indent_1": "Jazz", - "subscription_value": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", - "subscription_value_1": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", - "track_album": "{ playlist_title }", - "track_album_artist": "Lester Young", - "track_artist": "Lester Young", - "track_date": "{ upload_date_standardized }", - "track_file_name": "{ playlist_index_padded } - { %sanitize( title ) }.{ ext }", - "track_full_path": "{ artist_dir }/{ %concat( \"[\", playlist_max_upload_year, \"] \", %sanitize( playlist_title ) ) }/{ %concat( playlist_index_padded, \" - \", %sanitize( title ), \".\", ext ) }", - "track_genre": "Jazz", - "track_genre_default": "Unset", - "track_number": "{ playlist_index }", - "track_number_padded": "{ playlist_index_padded }", - "track_original_date": "{ upload_date_standardized }", - "track_title": "{ title }", - "track_total": "{ playlist_count }", - "track_year": "{ playlist_max_upload_year }", - "url": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", - "url10": "", - "url100": "", - "url11": "", - "url12": "", - "url13": "", - "url14": "", - "url15": "", - "url16": "", - "url17": "", - "url18": "", - "url19": "", - "url2": "", - "url20": "", - "url21": "", - "url22": "", - "url23": "", - "url24": "", - "url25": "", - "url26": "", - "url27": "", - "url28": "", - "url29": "", - "url3": "", - "url30": "", - "url31": "", - "url32": "", - "url33": "", - "url34": "", - "url35": "", - "url36": "", - "url37": "", - "url38": "", - "url39": "", - "url4": "", - "url40": "", - "url41": "", - "url42": "", - "url43": "", - "url44": "", - "url45": "", - "url46": "", - "url47": "", - "url48": "", - "url49": "", - "url5": "", - "url50": "", - "url51": "", - "url52": "", - "url53": "", - "url54": "", - "url55": "", - "url56": "", - "url57": "", - "url58": "", - "url59": "", - "url6": "", - "url60": "", - "url61": "", - "url62": "", - "url63": "", - "url64": "", - "url65": "", - "url66": "", - "url67": "", - "url68": "", - "url69": "", - "url7": "", - "url70": "", - "url71": "", - "url72": "", - "url73": "", - "url74": "", - "url75": "", - "url76": "", - "url77": "", - "url78": "", - "url79": "", - "url8": "", - "url80": "", - "url81": "", - "url82": "", - "url83": "", - "url84": "", - "url85": "", - "url86": "", - "url87": "", - "url88": "", - "url89": "", - "url9": "", - "url90": "", - "url91": "", - "url92": "", - "url93": "", - "url94": "", - "url95": "", - "url96": "", - "url97": "", - "url98": "", - "url99": "", - "urls": "{ [ \"https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists\" ] }" -} \ No newline at end of file diff --git a/tests/resources/expected_json/music/inspect_sub_fill.json b/tests/resources/expected_json/music/inspect_sub_fill.json new file mode 100644 index 00000000..b66bfe9b --- /dev/null +++ b/tests/resources/expected_json/music/inspect_sub_fill.json @@ -0,0 +1,242 @@ +{ + "audio_extract": { + "codec": "best", + "enable": true + }, + "download": [ + { + "download_reverse": true, + "include_sibling_metadata": true, + "playlist_thumbnails": [ + { + "name": "", + "uid": "avatar_uncropped" + }, + { + "name": "", + "uid": "banner_uncropped" + } + ], + "source_thumbnails": [ + { + "name": "", + "uid": "avatar_uncropped" + }, + { + "name": "", + "uid": "banner_uncropped" + } + ], + "url": [ + "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists" + ], + "variables": {}, + "webpage_url": "{ modified_webpage_url }", + "ytdl_options": {} + } + ], + "format": "ba[ext=webm]/ba", + "music_tags": { + "album": [ + "{ track_album }" + ], + "albumartist": [ + "Lester Young" + ], + "albumartists": [ + "Lester Young" + ], + "artist": [ + "Lester Young" + ], + "artists": [ + "Lester Young" + ], + "date": [ + "{ track_date }" + ], + "genres": [ + "Jazz" + ], + "original_date": [ + "{ track_original_date }" + ], + "title": [ + "{ track_title }" + ], + "track": [ + "{ track_number }" + ], + "tracktotal": [ + "{ track_total }" + ], + "year": [ + "{ track_year }" + ] + }, + "output_options": { + "download_archive_name": ".ytdl-sub-Lester Young-download-archive.json", + "file_name": "{ track_full_path }", + "keep_files_date_eval": "{ upload_date_standardized }", + "maintain_download_archive": true, + "output_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpzald2h7x", + "preserve_mtime": false, + "thumbnail_name": "{ album_cover_path }" + }, + "overrides": { + "album_cover_path": "Lester Young/{ %concat( \"[\", playlist_max_upload_year, \"] \", %sanitize( playlist_title ) ) }/folder.{ thumbnail_ext }", + "album_dir": "[{ playlist_max_upload_year }] { %sanitize( playlist_title ) }", + "artist_dir": "Lester Young", + "avatar_uncropped_thumbnail_file_name": "", + "banner_uncropped_thumbnail_file_name": "", + "enable_resolution_assert": true, + "enable_throttle_protection": true, + "include_sibling_metadata": true, + "modified_webpage_url": "{ webpage_url }", + "music_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpzald2h7x", + "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", + "resolution_assert_height_gte": 361, + "resolution_assert_ignore_titles": "{ [ ] }", + "resolution_assert_is_ignored": "{ %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, [ ] ) ) }", + "resolution_assert_print": true, + "resolution_readable": "{ width }x{ height }", + "subscription_array": [ + "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists" + ], + "subscription_indent_1": "Jazz", + "subscription_value": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", + "subscription_value_1": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", + "track_album": "{ playlist_title }", + "track_album_artist": "Lester Young", + "track_artist": "Lester Young", + "track_date": "{ upload_date_standardized }", + "track_file_name": "{ playlist_index_padded } - { %sanitize( title ) }.{ ext }", + "track_full_path": "Lester Young/{ %concat( \"[\", playlist_max_upload_year, \"] \", %sanitize( playlist_title ) ) }/{ %concat( playlist_index_padded, \" - \", %sanitize( title ), \".\", ext ) }", + "track_genre": "Jazz", + "track_genre_default": "Unset", + "track_number": "{ playlist_index }", + "track_number_padded": "{ playlist_index_padded }", + "track_original_date": "{ upload_date_standardized }", + "track_title": "{ title }", + "track_total": "{ playlist_count }", + "track_year": "{ playlist_max_upload_year }", + "url": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", + "url10": "", + "url100": "", + "url11": "", + "url12": "", + "url13": "", + "url14": "", + "url15": "", + "url16": "", + "url17": "", + "url18": "", + "url19": "", + "url2": "", + "url20": "", + "url21": "", + "url22": "", + "url23": "", + "url24": "", + "url25": "", + "url26": "", + "url27": "", + "url28": "", + "url29": "", + "url3": "", + "url30": "", + "url31": "", + "url32": "", + "url33": "", + "url34": "", + "url35": "", + "url36": "", + "url37": "", + "url38": "", + "url39": "", + "url4": "", + "url40": "", + "url41": "", + "url42": "", + "url43": "", + "url44": "", + "url45": "", + "url46": "", + "url47": "", + "url48": "", + "url49": "", + "url5": "", + "url50": "", + "url51": "", + "url52": "", + "url53": "", + "url54": "", + "url55": "", + "url56": "", + "url57": "", + "url58": "", + "url59": "", + "url6": "", + "url60": "", + "url61": "", + "url62": "", + "url63": "", + "url64": "", + "url65": "", + "url66": "", + "url67": "", + "url68": "", + "url69": "", + "url7": "", + "url70": "", + "url71": "", + "url72": "", + "url73": "", + "url74": "", + "url75": "", + "url76": "", + "url77": "", + "url78": "", + "url79": "", + "url8": "", + "url80": "", + "url81": "", + "url82": "", + "url83": "", + "url84": "", + "url85": "", + "url86": "", + "url87": "", + "url88": "", + "url89": "", + "url9": "", + "url90": "", + "url91": "", + "url92": "", + "url93": "", + "url94": "", + "url95": "", + "url96": "", + "url97": "", + "url98": "", + "url99": "", + "urls": [ + "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists" + ] + }, + "throttle_protection": { + "enable": true, + "sleep_per_download_s": { + "max": 28.4, + "min": 13.8 + }, + "sleep_per_request_s": { + "max": 0.75, + "min": 0.0 + }, + "sleep_per_subscription_s": { + "max": 26.1, + "min": 16.3 + } + } +} \ No newline at end of file diff --git a/tests/resources/expected_json/music/inspect_sub_internal.json b/tests/resources/expected_json/music/inspect_sub_internal.json new file mode 100644 index 00000000..2409b16d --- /dev/null +++ b/tests/resources/expected_json/music/inspect_sub_internal.json @@ -0,0 +1,242 @@ +{ + "audio_extract": { + "codec": "best", + "enable": true + }, + "download": [ + { + "download_reverse": true, + "include_sibling_metadata": true, + "playlist_thumbnails": [ + { + "name": "", + "uid": "avatar_uncropped" + }, + { + "name": "", + "uid": "banner_uncropped" + } + ], + "source_thumbnails": [ + { + "name": "", + "uid": "avatar_uncropped" + }, + { + "name": "", + "uid": "banner_uncropped" + } + ], + "url": [ + "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists" + ], + "variables": {}, + "webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", + "ytdl_options": {} + } + ], + "format": "ba[ext=webm]/ba", + "music_tags": { + "album": [ + "{ %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }" + ], + "albumartist": [ + "Lester Young" + ], + "albumartists": [ + "Lester Young" + ], + "artist": [ + "Lester Young" + ], + "artists": [ + "Lester Young" + ], + "date": [ + "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }" + ], + "genres": [ + "Jazz" + ], + "original_date": [ + "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }" + ], + "title": [ + "{ %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) }" + ], + "track": [ + "{ %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ) }" + ], + "tracktotal": [ + "{ %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ) }" + ], + "year": [ + "{ %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ) }" + ] + }, + "output_options": { + "download_archive_name": ".ytdl-sub-Lester Young-download-archive.json", + "file_name": "Lester Young/{ %concat( \"[\", %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ), \"] \", %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }/{ %concat( %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ), \" - \", %sanitize( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ), \".\", ext ) }", + "keep_files_date_eval": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", + "maintain_download_archive": true, + "output_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpdu1vad67", + "preserve_mtime": false, + "thumbnail_name": "Lester Young/{ %concat( \"[\", %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ), \"] \", %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }/folder.jpg" + }, + "overrides": { + "album_cover_path": "Lester Young/{ %concat( \"[\", %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ), \"] \", %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }/folder.jpg", + "album_dir": "[{ %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ) }] { %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", + "artist_dir": "Lester Young", + "avatar_uncropped_thumbnail_file_name": "", + "banner_uncropped_thumbnail_file_name": "", + "enable_resolution_assert": true, + "enable_throttle_protection": true, + "include_sibling_metadata": true, + "modified_webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", + "music_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpdu1vad67", + "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", + "resolution_assert_height_gte": 361, + "resolution_assert_ignore_titles": "{ [ ] }", + "resolution_assert_is_ignored": "{ %print_if_true( %concat( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), [ ] ) ) }", + "resolution_assert_print": true, + "resolution_readable": "{ width }x{ height }", + "subscription_array": [ + "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists" + ], + "subscription_indent_1": "Jazz", + "subscription_value": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", + "subscription_value_1": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", + "track_album": "{ %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", + "track_album_artist": "Lester Young", + "track_artist": "Lester Young", + "track_date": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", + "track_file_name": "{ %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ) } - { %sanitize( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }.{ ext }", + "track_full_path": "Lester Young/{ %concat( \"[\", %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ), \"] \", %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }/{ %concat( %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ), \" - \", %sanitize( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ), \".\", ext ) }", + "track_genre": "Jazz", + "track_genre_default": "Unset", + "track_number": "{ %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ) }", + "track_number_padded": "{ %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ) }", + "track_original_date": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", + "track_title": "{ %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) }", + "track_total": "{ %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ) }", + "track_year": "{ %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ) }", + "url": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", + "url10": "", + "url100": "", + "url11": "", + "url12": "", + "url13": "", + "url14": "", + "url15": "", + "url16": "", + "url17": "", + "url18": "", + "url19": "", + "url2": "", + "url20": "", + "url21": "", + "url22": "", + "url23": "", + "url24": "", + "url25": "", + "url26": "", + "url27": "", + "url28": "", + "url29": "", + "url3": "", + "url30": "", + "url31": "", + "url32": "", + "url33": "", + "url34": "", + "url35": "", + "url36": "", + "url37": "", + "url38": "", + "url39": "", + "url4": "", + "url40": "", + "url41": "", + "url42": "", + "url43": "", + "url44": "", + "url45": "", + "url46": "", + "url47": "", + "url48": "", + "url49": "", + "url5": "", + "url50": "", + "url51": "", + "url52": "", + "url53": "", + "url54": "", + "url55": "", + "url56": "", + "url57": "", + "url58": "", + "url59": "", + "url6": "", + "url60": "", + "url61": "", + "url62": "", + "url63": "", + "url64": "", + "url65": "", + "url66": "", + "url67": "", + "url68": "", + "url69": "", + "url7": "", + "url70": "", + "url71": "", + "url72": "", + "url73": "", + "url74": "", + "url75": "", + "url76": "", + "url77": "", + "url78": "", + "url79": "", + "url8": "", + "url80": "", + "url81": "", + "url82": "", + "url83": "", + "url84": "", + "url85": "", + "url86": "", + "url87": "", + "url88": "", + "url89": "", + "url9": "", + "url90": "", + "url91": "", + "url92": "", + "url93": "", + "url94": "", + "url95": "", + "url96": "", + "url97": "", + "url98": "", + "url99": "", + "urls": [ + "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists" + ] + }, + "throttle_protection": { + "enable": true, + "sleep_per_download_s": { + "max": 28.4, + "min": 13.8 + }, + "sleep_per_request_s": { + "max": 0.75, + "min": 0.0 + }, + "sleep_per_subscription_s": { + "max": 26.1, + "min": 16.3 + } + } +} \ No newline at end of file diff --git a/tests/resources/expected_json/music/inspect_sub_original.json b/tests/resources/expected_json/music/inspect_sub_original.json new file mode 100644 index 00000000..988e58a9 --- /dev/null +++ b/tests/resources/expected_json/music/inspect_sub_original.json @@ -0,0 +1,227 @@ +{ + "audio_extract": { + "codec": "best" + }, + "download": [ + { + "include_sibling_metadata": "{include_sibling_metadata}", + "playlist_thumbnails": [ + { + "name": "{avatar_uncropped_thumbnail_file_name}", + "uid": "avatar_uncropped" + }, + { + "name": "{banner_uncropped_thumbnail_file_name}", + "uid": "banner_uncropped" + } + ], + "source_thumbnails": [ + { + "name": "{avatar_uncropped_thumbnail_file_name}", + "uid": "avatar_uncropped" + }, + { + "name": "{banner_uncropped_thumbnail_file_name}", + "uid": "banner_uncropped" + } + ], + "url": "{ %array_at(urls, 0) }", + "webpage_url": "{modified_webpage_url}" + }, + { + "include_sibling_metadata": "{include_sibling_metadata}", + "url": "{ %array_slice(urls, 1) }", + "webpage_url": "{modified_webpage_url}" + } + ], + "format": "ba[ext=webm]/ba", + "music_tags": { + "album": "{track_album}", + "albumartist": "{track_album_artist}", + "albumartists": [ + "{track_album_artist}" + ], + "artist": "{track_artist}", + "artists": [ + "{track_artist}" + ], + "date": "{track_date}", + "genres": [ + "{track_genre}" + ], + "original_date": "{track_original_date}", + "title": "{track_title}", + "track": "{track_number}", + "tracktotal": "{track_total}", + "year": "{track_year}" + }, + "output_options": { + "file_name": "{track_full_path}", + "maintain_download_archive": true, + "output_directory": "{music_directory}", + "thumbnail_name": "{album_cover_path}" + }, + "overrides": { + "album_cover_path": "{artist_dir}/{album_dir}/folder.{thumbnail_ext}", + "album_dir": "[{track_year}] {track_album_sanitized}", + "artist_dir": "{track_artist_sanitized}", + "avatar_uncropped_thumbnail_file_name": "", + "banner_uncropped_thumbnail_file_name": "", + "enable_resolution_assert": true, + "enable_throttle_protection": true, + "include_sibling_metadata": true, + "modified_webpage_url": "{webpage_url}", + "music_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpk6coazyn", + "resolution_assert": "{\n %if(\n %and(\n enable_resolution_assert,\n %ne( height, 0 ),\n %not(resolution_assert_is_ignored)\n ),\n %assert(\n %gte( height, resolution_assert_height_gte ),\n %concat(\n \"Entry \",\n title,\n \" downloaded at a low resolution (\",\n resolution_readable,\n \"), you've probably been throttled. \",\n \"Stopping further downloads, wait a few hours and try again. \",\n \"Disable using the override variable `enable_resolution_assert: False`.\"\n )\n ),\n \"false is no-op\"\n )\n}", + "resolution_assert_height_gte": 361, + "resolution_assert_ignore_titles": "{ [] }", + "resolution_assert_is_ignored": "{\n %print_if_true(\n %concat(title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\"),\n %contains_any(title, resolution_assert_ignore_titles)\n )\n}", + "resolution_assert_print": "{\n %print(\n %if(\n enable_resolution_assert,\n \"Resolution assert is enabled, will fail on low-quality video downloads and presume throttle. Disable using the override variable `enable_resolution_assert: False`\",\n \"Resolution assert is disabled. Use at your own risk!\"\n ),\n enable_resolution_assert,\n -1\n )\n}", + "resolution_readable": "{width}x{height}", + "subscription_array": "{%from_json('''[\"https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists\"]''')}", + "subscription_indent_1": "Jazz", + "subscription_value": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", + "subscription_value_1": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", + "track_album": "{playlist_title}", + "track_album_artist": "{track_artist}", + "track_artist": "{subscription_name}", + "track_date": "{upload_date_standardized}", + "track_file_name": "{track_number_padded} - {track_title_sanitized}.{ext}", + "track_full_path": "{artist_dir}/{album_dir}/{track_file_name}", + "track_genre": "{subscription_indent_1}", + "track_genre_default": "Unset", + "track_number": "{playlist_index}", + "track_number_padded": "{playlist_index_padded}", + "track_original_date": "{track_date}", + "track_title": "{title}", + "track_total": "{playlist_count}", + "track_year": "{playlist_max_upload_year}", + "url": "{subscription_value}", + "url10": "", + "url100": "", + "url11": "", + "url12": "", + "url13": "", + "url14": "", + "url15": "", + "url16": "", + "url17": "", + "url18": "", + "url19": "", + "url2": "", + "url20": "", + "url21": "", + "url22": "", + "url23": "", + "url24": "", + "url25": "", + "url26": "", + "url27": "", + "url28": "", + "url29": "", + "url3": "", + "url30": "", + "url31": "", + "url32": "", + "url33": "", + "url34": "", + "url35": "", + "url36": "", + "url37": "", + "url38": "", + "url39": "", + "url4": "", + "url40": "", + "url41": "", + "url42": "", + "url43": "", + "url44": "", + "url45": "", + "url46": "", + "url47": "", + "url48": "", + "url49": "", + "url5": "", + "url50": "", + "url51": "", + "url52": "", + "url53": "", + "url54": "", + "url55": "", + "url56": "", + "url57": "", + "url58": "", + "url59": "", + "url6": "", + "url60": "", + "url61": "", + "url62": "", + "url63": "", + "url64": "", + "url65": "", + "url66": "", + "url67": "", + "url68": "", + "url69": "", + "url7": "", + "url70": "", + "url71": "", + "url72": "", + "url73": "", + "url74": "", + "url75": "", + "url76": "", + "url77": "", + "url78": "", + "url79": "", + "url8": "", + "url80": "", + "url81": "", + "url82": "", + "url83": "", + "url84": "", + "url85": "", + "url86": "", + "url87": "", + "url88": "", + "url89": "", + "url9": "", + "url90": "", + "url91": "", + "url92": "", + "url93": "", + "url94": "", + "url95": "", + "url96": "", + "url97": "", + "url98": "", + "url99": "", + "urls": "{subscription_array}" + }, + "preset": [ + "_music_base", + "_multi_url", + "_albums_from_playlists", + "_throttle_protection", + "YouTube Releases", + "__preset__" + ], + "throttle_protection": { + "enable": "{\n %print(\n %if(\n enable_throttle_protection,\n \"Throttle protection is enabled. Disable using the override variable `enable_throttle_protection: False`\",\n \"Throttle protection is disabled. Use at your own risk!\"\n ),\n enable_throttle_protection\n )\n}", + "sleep_per_download_s": { + "max": 28.4, + "min": 13.8 + }, + "sleep_per_request_s": { + "max": 0.75, + "min": 0.0 + }, + "sleep_per_subscription_s": { + "max": 26.1, + "min": 16.3 + } + }, + "ytdl_options": { + "break_on_existing": true + } +} \ No newline at end of file diff --git a/tests/resources/expected_json/music/inspect_sub_resolve.json b/tests/resources/expected_json/music/inspect_sub_resolve.json new file mode 100644 index 00000000..347a61ac --- /dev/null +++ b/tests/resources/expected_json/music/inspect_sub_resolve.json @@ -0,0 +1,242 @@ +{ + "audio_extract": { + "codec": "best", + "enable": true + }, + "download": [ + { + "download_reverse": true, + "include_sibling_metadata": true, + "playlist_thumbnails": [ + { + "name": "", + "uid": "avatar_uncropped" + }, + { + "name": "", + "uid": "banner_uncropped" + } + ], + "source_thumbnails": [ + { + "name": "", + "uid": "avatar_uncropped" + }, + { + "name": "", + "uid": "banner_uncropped" + } + ], + "url": [ + "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists" + ], + "variables": {}, + "webpage_url": "{ webpage_url }", + "ytdl_options": {} + } + ], + "format": "ba[ext=webm]/ba", + "music_tags": { + "album": [ + "{ playlist_title }" + ], + "albumartist": [ + "Lester Young" + ], + "albumartists": [ + "Lester Young" + ], + "artist": [ + "Lester Young" + ], + "artists": [ + "Lester Young" + ], + "date": [ + "{ upload_date_standardized }" + ], + "genres": [ + "Jazz" + ], + "original_date": [ + "{ upload_date_standardized }" + ], + "title": [ + "{ title }" + ], + "track": [ + "{ playlist_index }" + ], + "tracktotal": [ + "{ playlist_count }" + ], + "year": [ + "{ playlist_max_upload_year }" + ] + }, + "output_options": { + "download_archive_name": ".ytdl-sub-Lester Young-download-archive.json", + "file_name": "Lester Young/{ %concat( \"[\", playlist_max_upload_year, \"] \", %sanitize( playlist_title ) ) }/{ %concat( playlist_index_padded, \" - \", %sanitize( title ), \".\", ext ) }", + "keep_files_date_eval": "{ upload_date_standardized }", + "maintain_download_archive": true, + "output_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpd5oeacb3", + "preserve_mtime": false, + "thumbnail_name": "Lester Young/{ %concat( \"[\", playlist_max_upload_year, \"] \", %sanitize( playlist_title ) ) }/folder.{ thumbnail_ext }" + }, + "overrides": { + "album_cover_path": "Lester Young/{ %concat( \"[\", playlist_max_upload_year, \"] \", %sanitize( playlist_title ) ) }/folder.{ thumbnail_ext }", + "album_dir": "[{ playlist_max_upload_year }] { %sanitize( playlist_title ) }", + "artist_dir": "Lester Young", + "avatar_uncropped_thumbnail_file_name": "", + "banner_uncropped_thumbnail_file_name": "", + "enable_resolution_assert": true, + "enable_throttle_protection": true, + "include_sibling_metadata": true, + "modified_webpage_url": "{ webpage_url }", + "music_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpd5oeacb3", + "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", + "resolution_assert_height_gte": 361, + "resolution_assert_ignore_titles": "{ [ ] }", + "resolution_assert_is_ignored": "{ %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, [ ] ) ) }", + "resolution_assert_print": true, + "resolution_readable": "{ width }x{ height }", + "subscription_array": [ + "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists" + ], + "subscription_indent_1": "Jazz", + "subscription_value": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", + "subscription_value_1": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", + "track_album": "{ playlist_title }", + "track_album_artist": "Lester Young", + "track_artist": "Lester Young", + "track_date": "{ upload_date_standardized }", + "track_file_name": "{ playlist_index_padded } - { %sanitize( title ) }.{ ext }", + "track_full_path": "Lester Young/{ %concat( \"[\", playlist_max_upload_year, \"] \", %sanitize( playlist_title ) ) }/{ %concat( playlist_index_padded, \" - \", %sanitize( title ), \".\", ext ) }", + "track_genre": "Jazz", + "track_genre_default": "Unset", + "track_number": "{ playlist_index }", + "track_number_padded": "{ playlist_index_padded }", + "track_original_date": "{ upload_date_standardized }", + "track_title": "{ title }", + "track_total": "{ playlist_count }", + "track_year": "{ playlist_max_upload_year }", + "url": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", + "url10": "", + "url100": "", + "url11": "", + "url12": "", + "url13": "", + "url14": "", + "url15": "", + "url16": "", + "url17": "", + "url18": "", + "url19": "", + "url2": "", + "url20": "", + "url21": "", + "url22": "", + "url23": "", + "url24": "", + "url25": "", + "url26": "", + "url27": "", + "url28": "", + "url29": "", + "url3": "", + "url30": "", + "url31": "", + "url32": "", + "url33": "", + "url34": "", + "url35": "", + "url36": "", + "url37": "", + "url38": "", + "url39": "", + "url4": "", + "url40": "", + "url41": "", + "url42": "", + "url43": "", + "url44": "", + "url45": "", + "url46": "", + "url47": "", + "url48": "", + "url49": "", + "url5": "", + "url50": "", + "url51": "", + "url52": "", + "url53": "", + "url54": "", + "url55": "", + "url56": "", + "url57": "", + "url58": "", + "url59": "", + "url6": "", + "url60": "", + "url61": "", + "url62": "", + "url63": "", + "url64": "", + "url65": "", + "url66": "", + "url67": "", + "url68": "", + "url69": "", + "url7": "", + "url70": "", + "url71": "", + "url72": "", + "url73": "", + "url74": "", + "url75": "", + "url76": "", + "url77": "", + "url78": "", + "url79": "", + "url8": "", + "url80": "", + "url81": "", + "url82": "", + "url83": "", + "url84": "", + "url85": "", + "url86": "", + "url87": "", + "url88": "", + "url89": "", + "url9": "", + "url90": "", + "url91": "", + "url92": "", + "url93": "", + "url94": "", + "url95": "", + "url96": "", + "url97": "", + "url98": "", + "url99": "", + "urls": [ + "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists" + ] + }, + "throttle_protection": { + "enable": true, + "sleep_per_download_s": { + "max": 28.4, + "min": 13.8 + }, + "sleep_per_request_s": { + "max": 0.75, + "min": 0.0 + }, + "sleep_per_subscription_s": { + "max": 26.1, + "min": 16.3 + } + } +} \ No newline at end of file diff --git a/tests/resources/expected_json/music/inspect_variables.json b/tests/resources/expected_json/music/inspect_variables.json deleted file mode 100644 index 1fee2525..00000000 --- a/tests/resources/expected_json/music/inspect_variables.json +++ /dev/null @@ -1,482 +0,0 @@ -{ - "album_cover_path": "Lester Young/{ %concat( \"[\", playlist_max_upload_year, \"] \", %sanitize( playlist_title ) ) }/folder.{ thumbnail_ext }", - "album_cover_path_sanitized": "{ %sanitize( %concat( \"Lester Young\", \"/\", %concat( \"[\", playlist_max_upload_year, \"] \", %sanitize( playlist_title ) ), \"/folder.\", thumbnail_ext ) ) }", - "album_dir": "[{ playlist_max_upload_year }] { %sanitize( playlist_title ) }", - "album_dir_sanitized": "{ %sanitize( %concat( \"[\", playlist_max_upload_year, \"] \", %sanitize( playlist_title ) ) ) }", - "artist_dir": "Lester Young", - "artist_dir_sanitized": "Lester Young", - "avatar_uncropped_thumbnail_file_name": "", - "avatar_uncropped_thumbnail_file_name_sanitized": "", - "banner_uncropped_thumbnail_file_name": "", - "banner_uncropped_thumbnail_file_name_sanitized": "", - "channel": "{ %map_get_non_empty( entry_metadata, \"channel\", uploader ) }", - "channel_id": "{ %map_get_non_empty( entry_metadata, \"channel_id\", uploader_id ) }", - "channel_id_sanitized": "{ %sanitize( channel_id ) }", - "channel_sanitized": "{ %sanitize( channel ) }", - "chapters": "{ [ ] }", - "chapters_sanitized": "{ %sanitize( chapters ) }", - "comments": "{ [ ] }", - "comments_sanitized": "{ %sanitize( comments ) }", - "creator": "{ %map_get_non_empty( entry_metadata, \"creator\", channel ) }", - "creator_sanitized": "{ %sanitize( creator ) }", - "description": "{ %map_get_non_empty( entry_metadata, \"description\", '' ) }", - "description_sanitized": "{ %sanitize( description ) }", - "download_index": "{ %int( 1 ) }", - "download_index_padded6": "{ %pad_zero( download_index, 6 ) }", - "download_index_padded6_sanitized": "{ %sanitize( download_index_padded6 ) }", - "download_index_sanitized": "{ %sanitize( download_index ) }", - "duration": "{ %map_get_non_empty( entry_metadata, \"duration\", 0 ) }", - "duration_sanitized": "{ %sanitize( duration ) }", - "enable_resolution_assert": "{ %bool(True) }", - "enable_resolution_assert_sanitized": "true", - "enable_throttle_protection": "{ %bool(True) }", - "enable_throttle_protection_sanitized": "true", - "entry_metadata": "{ { } }", - "entry_metadata_sanitized": "{ %sanitize( entry_metadata ) }", - "epoch": "{ %map_get( entry_metadata, \"epoch\" ) }", - "epoch_date": "{ %datetime_strftime( epoch, \"%Y%m%d\" ) }", - "epoch_date_sanitized": "{ %sanitize( epoch_date ) }", - "epoch_hour": "{ %datetime_strftime( epoch, \"%H\" ) }", - "epoch_hour_sanitized": "{ %sanitize( epoch_hour ) }", - "epoch_sanitized": "{ %sanitize( epoch ) }", - "ext": "{ %throw( \"Plugin variable ext has not been created yet\" ) }", - "ext_sanitized": "{ %sanitize( ext ) }", - "extractor": "{ %map_get( entry_metadata, \"extractor\" ) }", - "extractor_key": "{ %map_get( entry_metadata, \"extractor_key\" ) }", - "extractor_key_sanitized": "{ %sanitize( extractor_key ) }", - "extractor_sanitized": "{ %sanitize( extractor ) }", - "height": "{ %map_get_non_empty( entry_metadata, \"height\", 0 ) }", - "height_sanitized": "{ %sanitize( height ) }", - "ie_key": "{ %map_get_non_empty( entry_metadata, \"ie_key\", extractor_key ) }", - "ie_key_sanitized": "{ %sanitize( ie_key ) }", - "include_sibling_metadata": "{ %bool(True) }", - "include_sibling_metadata_sanitized": "true", - "info_json_ext": "info.json", - "info_json_ext_sanitized": "info.json", - "modified_webpage_url": "{ webpage_url }", - "modified_webpage_url_sanitized": "{ %sanitize( webpage_url ) }", - "music_directory": "tv_show_directory_path", - "music_directory_sanitized": "tv_show_directory_path", - "playlist_count": "{ %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ) }", - "playlist_count_sanitized": "{ %sanitize( playlist_count ) }", - "playlist_description": "{ %map_get_non_empty( playlist_metadata, \"description\", description ) }", - "playlist_description_sanitized": "{ %sanitize( playlist_description ) }", - "playlist_index": "{ %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ) }", - "playlist_index_padded": "{ %pad_zero( playlist_index, 2 ) }", - "playlist_index_padded6": "{ %pad_zero( playlist_index, 6 ) }", - "playlist_index_padded6_sanitized": "{ %sanitize( playlist_index_padded6 ) }", - "playlist_index_padded_sanitized": "{ %sanitize( playlist_index_padded ) }", - "playlist_index_reversed": "{ %sub( playlist_count, playlist_index, -1 ) }", - "playlist_index_reversed_padded": "{ %pad_zero( playlist_index_reversed, 2 ) }", - "playlist_index_reversed_padded6": "{ %pad_zero( playlist_index_reversed, 6 ) }", - "playlist_index_reversed_padded6_sanitized": "{ %sanitize( playlist_index_reversed_padded6 ) }", - "playlist_index_reversed_padded_sanitized": "{ %sanitize( playlist_index_reversed_padded ) }", - "playlist_index_reversed_sanitized": "{ %sanitize( playlist_index_reversed ) }", - "playlist_index_sanitized": "{ %sanitize( playlist_index ) }", - "playlist_max_upload_date": "{ %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) }", - "playlist_max_upload_date_sanitized": "{ %sanitize( playlist_max_upload_date ) }", - "playlist_max_upload_year": "{ %int( %map_get( %to_date_metadata( playlist_max_upload_date ), \"year\" ) ) }", - "playlist_max_upload_year_sanitized": "{ %sanitize( playlist_max_upload_year ) }", - "playlist_max_upload_year_truncated": "{ %int( %map_get( %to_date_metadata( playlist_max_upload_date ), \"year_truncated\" ) ) }", - "playlist_max_upload_year_truncated_sanitized": "{ %sanitize( playlist_max_upload_year_truncated ) }", - "playlist_metadata": "{ %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ) }", - "playlist_metadata_sanitized": "{ %sanitize( playlist_metadata ) }", - "playlist_title": "{ %map_get_non_empty( entry_metadata, \"playlist_title\", title ) }", - "playlist_title_sanitized": "{ %sanitize( playlist_title ) }", - "playlist_uid": "{ %map_get_non_empty( playlist_metadata, \"playlist_id\", uid ) }", - "playlist_uid_sanitized": "{ %sanitize( playlist_uid ) }", - "playlist_uploader": "{ %map_get_non_empty( playlist_metadata, \"uploader\", uploader ) }", - "playlist_uploader_id": "{ %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", uploader_id ) }", - "playlist_uploader_id_sanitized": "{ %sanitize( playlist_uploader_id ) }", - "playlist_uploader_sanitized": "{ %sanitize( playlist_uploader ) }", - "playlist_uploader_url": "{ %map_get_non_empty( playlist_metadata, \"uploader_url\", webpage_url ) }", - "playlist_uploader_url_sanitized": "{ %sanitize( playlist_uploader_url ) }", - "playlist_webpage_url": "{ %map_get_non_empty( playlist_metadata, \"webpage_url\", webpage_url ) }", - "playlist_webpage_url_sanitized": "{ %sanitize( playlist_webpage_url ) }", - "release_date": "{ %map_get_non_empty( entry_metadata, \"release_date\", upload_date ) }", - "release_date_sanitized": "{ %sanitize( release_date ) }", - "release_date_standardized": "{ %string( %map_get( %to_date_metadata( release_date ), \"date_standardized\" ) ) }", - "release_date_standardized_sanitized": "{ %sanitize( release_date_standardized ) }", - "release_day": "{ %int( %map_get( %to_date_metadata( release_date ), \"day\" ) ) }", - "release_day_of_year": "{ %int( %map_get( %to_date_metadata( release_date ), \"day_of_year\" ) ) }", - "release_day_of_year_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"day_of_year_padded\" ) ) }", - "release_day_of_year_padded_sanitized": "{ %sanitize( release_day_of_year_padded ) }", - "release_day_of_year_reversed": "{ %int( %map_get( %to_date_metadata( release_date ), \"day_of_year_reversed\" ) ) }", - "release_day_of_year_reversed_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"day_of_year_reversed_padded\" ) ) }", - "release_day_of_year_reversed_padded_sanitized": "{ %sanitize( release_day_of_year_reversed_padded ) }", - "release_day_of_year_reversed_sanitized": "{ %sanitize( release_day_of_year_reversed ) }", - "release_day_of_year_sanitized": "{ %sanitize( release_day_of_year ) }", - "release_day_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"day_padded\" ) ) }", - "release_day_padded_sanitized": "{ %sanitize( release_day_padded ) }", - "release_day_reversed": "{ %int( %map_get( %to_date_metadata( release_date ), \"day_reversed\" ) ) }", - "release_day_reversed_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"day_reversed_padded\" ) ) }", - "release_day_reversed_padded_sanitized": "{ %sanitize( release_day_reversed_padded ) }", - "release_day_reversed_sanitized": "{ %sanitize( release_day_reversed ) }", - "release_day_sanitized": "{ %sanitize( release_day ) }", - "release_month": "{ %int( %map_get( %to_date_metadata( release_date ), \"month\" ) ) }", - "release_month_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"month_padded\" ) ) }", - "release_month_padded_sanitized": "{ %sanitize( release_month_padded ) }", - "release_month_reversed": "{ %int( %map_get( %to_date_metadata( release_date ), \"month_reversed\" ) ) }", - "release_month_reversed_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"month_reversed_padded\" ) ) }", - "release_month_reversed_padded_sanitized": "{ %sanitize( release_month_reversed_padded ) }", - "release_month_reversed_sanitized": "{ %sanitize( release_month_reversed ) }", - "release_month_sanitized": "{ %sanitize( release_month ) }", - "release_year": "{ %int( %map_get( %to_date_metadata( release_date ), \"year\" ) ) }", - "release_year_sanitized": "{ %sanitize( release_year ) }", - "release_year_truncated": "{ %int( %map_get( %to_date_metadata( release_date ), \"year_truncated\" ) ) }", - "release_year_truncated_reversed": "{ %int( %map_get( %to_date_metadata( release_date ), \"year_truncated_reversed\" ) ) }", - "release_year_truncated_reversed_sanitized": "{ %sanitize( release_year_truncated_reversed ) }", - "release_year_truncated_sanitized": "{ %sanitize( release_year_truncated ) }", - "requested_subtitles": "{ { } }", - "requested_subtitles_sanitized": "{ %sanitize( requested_subtitles ) }", - "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", - "resolution_assert_height_gte": "{ %int(361) }", - "resolution_assert_height_gte_sanitized": "361", - "resolution_assert_ignore_titles": "{ [ ] }", - "resolution_assert_ignore_titles_sanitized": "[]", - "resolution_assert_is_ignored": "{ %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, resolution_assert_ignore_titles ) ) }", - "resolution_assert_is_ignored_sanitized": "{ %sanitize( %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, resolution_assert_ignore_titles ) ) ) }", - "resolution_assert_print": "{ %bool(True) }", - "resolution_assert_print_sanitized": "true", - "resolution_assert_sanitized": "{ %sanitize( %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) ) }", - "resolution_readable": "{ width }x{ height }", - "resolution_readable_sanitized": "{ %sanitize( %concat( width, \"x\", height ) ) }", - "sibling_metadata": "{ %map_get_non_empty( entry_metadata, \"sibling_metadata\", [ ] ) }", - "sibling_metadata_sanitized": "{ %sanitize( sibling_metadata ) }", - "source_count": "{ %map_get_non_empty( playlist_metadata, \"playlist_count\", 1 ) }", - "source_count_sanitized": "{ %sanitize( source_count ) }", - "source_description": "{ %map_get_non_empty( source_metadata, \"description\", playlist_description ) }", - "source_description_sanitized": "{ %sanitize( source_description ) }", - "source_index": "{ %map_get_non_empty( playlist_metadata, \"playlist_index\", 1 ) }", - "source_index_padded": "{ %pad_zero( source_index, 2 ) }", - "source_index_padded_sanitized": "{ %sanitize( source_index_padded ) }", - "source_index_sanitized": "{ %sanitize( source_index ) }", - "source_metadata": "{ %map_get_non_empty( entry_metadata, \"source_metadata\", { } ) }", - "source_metadata_sanitized": "{ %sanitize( source_metadata ) }", - "source_title": "{ %map_get_non_empty( source_metadata, \"title\", playlist_title ) }", - "source_title_sanitized": "{ %sanitize( source_title ) }", - "source_uid": "{ %map_get_non_empty( source_metadata, \"id\", playlist_uid ) }", - "source_uid_sanitized": "{ %sanitize( source_uid ) }", - "source_uploader": "{ %map_get_non_empty( source_metadata, \"uploader\", playlist_uploader ) }", - "source_uploader_id": "{ %map_get_non_empty( source_metadata, \"uploader_id\", playlist_uploader_id ) }", - "source_uploader_id_sanitized": "{ %sanitize( source_uploader_id ) }", - "source_uploader_sanitized": "{ %sanitize( source_uploader ) }", - "source_uploader_url": "{ %map_get_non_empty( source_metadata, \"uploader_url\", source_webpage_url ) }", - "source_uploader_url_sanitized": "{ %sanitize( source_uploader_url ) }", - "source_webpage_url": "{ %map_get_non_empty( source_metadata, \"webpage_url\", playlist_webpage_url ) }", - "source_webpage_url_sanitized": "{ %sanitize( source_webpage_url ) }", - "sponsorblock_chapters": "{ [ ] }", - "sponsorblock_chapters_sanitized": "{ %sanitize( sponsorblock_chapters ) }", - "subscription_array": "{ [ \"https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists\" ] }", - "subscription_array_sanitized": "[\uff02https\uff1a\u29f8\u29f8www.youtube.com\u29f8channel\u29f8UCsItMF6_fP754ihIsSRLk5A\u29f8playlists\uff02]", - "subscription_has_download_archive": "{ %bool(False) }", - "subscription_has_download_archive_sanitized": "false", - "subscription_indent_1": "Jazz", - "subscription_indent_1_sanitized": "Jazz", - "subscription_name": "Lester Young", - "subscription_name_sanitized": "Lester Young", - "subscription_value": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", - "subscription_value_1": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", - "subscription_value_1_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8channel\u29f8UCsItMF6_fP754ihIsSRLk5A\u29f8playlists", - "subscription_value_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8channel\u29f8UCsItMF6_fP754ihIsSRLk5A\u29f8playlists", - "thumbnail_ext": "jpg", - "thumbnail_ext_sanitized": "jpg", - "title": "{ %map_get_non_empty( entry_metadata, \"title\", uid ) }", - "title_sanitized": "{ %sanitize( title ) }", - "title_sanitized_plex": "{ %sanitize_plex_episode( title ) }", - "title_sanitized_plex_sanitized": "{ %sanitize( title_sanitized_plex ) }", - "track_album": "{ playlist_title }", - "track_album_artist": "Lester Young", - "track_album_artist_sanitized": "Lester Young", - "track_album_sanitized": "{ %sanitize( playlist_title ) }", - "track_artist": "Lester Young", - "track_artist_sanitized": "Lester Young", - "track_date": "{ upload_date_standardized }", - "track_date_sanitized": "{ %sanitize( upload_date_standardized ) }", - "track_file_name": "{ playlist_index_padded } - { %sanitize( title ) }.{ ext }", - "track_file_name_sanitized": "{ %sanitize( %concat( playlist_index_padded, \" - \", %sanitize( title ), \".\", ext ) ) }", - "track_full_path": "{ artist_dir }/{ %concat( \"[\", playlist_max_upload_year, \"] \", %sanitize( playlist_title ) ) }/{ %concat( playlist_index_padded, \" - \", %sanitize( title ), \".\", ext ) }", - "track_full_path_sanitized": "{ %sanitize( %concat( artist_dir, \"/\", %concat( \"[\", playlist_max_upload_year, \"] \", %sanitize( playlist_title ) ), \"/\", %concat( playlist_index_padded, \" - \", %sanitize( title ), \".\", ext ) ) ) }", - "track_genre": "Jazz", - "track_genre_default": "Unset", - "track_genre_default_sanitized": "Unset", - "track_genre_sanitized": "Jazz", - "track_number": "{ playlist_index }", - "track_number_padded": "{ playlist_index_padded }", - "track_number_padded_sanitized": "{ %sanitize( playlist_index_padded ) }", - "track_number_sanitized": "{ %sanitize( playlist_index ) }", - "track_original_date": "{ upload_date_standardized }", - "track_original_date_sanitized": "{ %sanitize( upload_date_standardized ) }", - "track_title": "{ title }", - "track_title_sanitized": "{ %sanitize( title ) }", - "track_total": "{ playlist_count }", - "track_total_sanitized": "{ %sanitize( playlist_count ) }", - "track_year": "{ playlist_max_upload_year }", - "track_year_sanitized": "{ %sanitize( playlist_max_upload_year ) }", - "uid": "{ %map_get( entry_metadata, \"id\" ) }", - "uid_sanitized": "{ %sanitize( uid ) }", - "uid_sanitized_plex": "{ %sanitize_plex_episode( uid ) }", - "uid_sanitized_plex_sanitized": "{ %sanitize( uid_sanitized_plex ) }", - "upload_date": "{ %map_get_non_empty( entry_metadata, \"upload_date\", epoch_date ) }", - "upload_date_index": "{ %int( 1 ) }", - "upload_date_index_padded": "{ %pad_zero( upload_date_index, 2 ) }", - "upload_date_index_padded_sanitized": "{ %sanitize( upload_date_index_padded ) }", - "upload_date_index_reversed": "{ %sub( 100, upload_date_index ) }", - "upload_date_index_reversed_padded": "{ %pad_zero( upload_date_index_reversed, 2 ) }", - "upload_date_index_reversed_padded_sanitized": "{ %sanitize( upload_date_index_reversed_padded ) }", - "upload_date_index_reversed_sanitized": "{ %sanitize( upload_date_index_reversed ) }", - "upload_date_index_sanitized": "{ %sanitize( upload_date_index ) }", - "upload_date_sanitized": "{ %sanitize( upload_date ) }", - "upload_date_standardized": "{ %string( %map_get( %to_date_metadata( upload_date ), \"date_standardized\" ) ) }", - "upload_date_standardized_sanitized": "{ %sanitize( upload_date_standardized ) }", - "upload_day": "{ %int( %map_get( %to_date_metadata( upload_date ), \"day\" ) ) }", - "upload_day_of_year": "{ %int( %map_get( %to_date_metadata( upload_date ), \"day_of_year\" ) ) }", - "upload_day_of_year_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"day_of_year_padded\" ) ) }", - "upload_day_of_year_padded_sanitized": "{ %sanitize( upload_day_of_year_padded ) }", - "upload_day_of_year_reversed": "{ %int( %map_get( %to_date_metadata( upload_date ), \"day_of_year_reversed\" ) ) }", - "upload_day_of_year_reversed_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"day_of_year_reversed_padded\" ) ) }", - "upload_day_of_year_reversed_padded_sanitized": "{ %sanitize( upload_day_of_year_reversed_padded ) }", - "upload_day_of_year_reversed_sanitized": "{ %sanitize( upload_day_of_year_reversed ) }", - "upload_day_of_year_sanitized": "{ %sanitize( upload_day_of_year ) }", - "upload_day_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"day_padded\" ) ) }", - "upload_day_padded_sanitized": "{ %sanitize( upload_day_padded ) }", - "upload_day_reversed": "{ %int( %map_get( %to_date_metadata( upload_date ), \"day_reversed\" ) ) }", - "upload_day_reversed_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"day_reversed_padded\" ) ) }", - "upload_day_reversed_padded_sanitized": "{ %sanitize( upload_day_reversed_padded ) }", - "upload_day_reversed_sanitized": "{ %sanitize( upload_day_reversed ) }", - "upload_day_sanitized": "{ %sanitize( upload_day ) }", - "upload_month": "{ %int( %map_get( %to_date_metadata( upload_date ), \"month\" ) ) }", - "upload_month_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"month_padded\" ) ) }", - "upload_month_padded_sanitized": "{ %sanitize( upload_month_padded ) }", - "upload_month_reversed": "{ %int( %map_get( %to_date_metadata( upload_date ), \"month_reversed\" ) ) }", - "upload_month_reversed_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"month_reversed_padded\" ) ) }", - "upload_month_reversed_padded_sanitized": "{ %sanitize( upload_month_reversed_padded ) }", - "upload_month_reversed_sanitized": "{ %sanitize( upload_month_reversed ) }", - "upload_month_sanitized": "{ %sanitize( upload_month ) }", - "upload_year": "{ %int( %map_get( %to_date_metadata( upload_date ), \"year\" ) ) }", - "upload_year_sanitized": "{ %sanitize( upload_year ) }", - "upload_year_truncated": "{ %int( %map_get( %to_date_metadata( upload_date ), \"year_truncated\" ) ) }", - "upload_year_truncated_reversed": "{ %int( %map_get( %to_date_metadata( upload_date ), \"year_truncated_reversed\" ) ) }", - "upload_year_truncated_reversed_sanitized": "{ %sanitize( upload_year_truncated_reversed ) }", - "upload_year_truncated_sanitized": "{ %sanitize( upload_year_truncated ) }", - "uploader": "{ %map_get_non_empty( entry_metadata, \"uploader\", uploader_id ) }", - "uploader_id": "{ %map_get_non_empty( entry_metadata, \"uploader_id\", uid ) }", - "uploader_id_sanitized": "{ %sanitize( uploader_id ) }", - "uploader_sanitized": "{ %sanitize( uploader ) }", - "uploader_url": "{ %map_get_non_empty( entry_metadata, \"uploader_url\", webpage_url ) }", - "uploader_url_sanitized": "{ %sanitize( uploader_url ) }", - "url": "https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists", - "url10": "", - "url100": "", - "url100_sanitized": "", - "url10_sanitized": "", - "url11": "", - "url11_sanitized": "", - "url12": "", - "url12_sanitized": "", - "url13": "", - "url13_sanitized": "", - "url14": "", - "url14_sanitized": "", - "url15": "", - "url15_sanitized": "", - "url16": "", - "url16_sanitized": "", - "url17": "", - "url17_sanitized": "", - "url18": "", - "url18_sanitized": "", - "url19": "", - "url19_sanitized": "", - "url2": "", - "url20": "", - "url20_sanitized": "", - "url21": "", - "url21_sanitized": "", - "url22": "", - "url22_sanitized": "", - "url23": "", - "url23_sanitized": "", - "url24": "", - "url24_sanitized": "", - "url25": "", - "url25_sanitized": "", - "url26": "", - "url26_sanitized": "", - "url27": "", - "url27_sanitized": "", - "url28": "", - "url28_sanitized": "", - "url29": "", - "url29_sanitized": "", - "url2_sanitized": "", - "url3": "", - "url30": "", - "url30_sanitized": "", - "url31": "", - "url31_sanitized": "", - "url32": "", - "url32_sanitized": "", - "url33": "", - "url33_sanitized": "", - "url34": "", - "url34_sanitized": "", - "url35": "", - "url35_sanitized": "", - "url36": "", - "url36_sanitized": "", - "url37": "", - "url37_sanitized": "", - "url38": "", - "url38_sanitized": "", - "url39": "", - "url39_sanitized": "", - "url3_sanitized": "", - "url4": "", - "url40": "", - "url40_sanitized": "", - "url41": "", - "url41_sanitized": "", - "url42": "", - "url42_sanitized": "", - "url43": "", - "url43_sanitized": "", - "url44": "", - "url44_sanitized": "", - "url45": "", - "url45_sanitized": "", - "url46": "", - "url46_sanitized": "", - "url47": "", - "url47_sanitized": "", - "url48": "", - "url48_sanitized": "", - "url49": "", - "url49_sanitized": "", - "url4_sanitized": "", - "url5": "", - "url50": "", - "url50_sanitized": "", - "url51": "", - "url51_sanitized": "", - "url52": "", - "url52_sanitized": "", - "url53": "", - "url53_sanitized": "", - "url54": "", - "url54_sanitized": "", - "url55": "", - "url55_sanitized": "", - "url56": "", - "url56_sanitized": "", - "url57": "", - "url57_sanitized": "", - "url58": "", - "url58_sanitized": "", - "url59": "", - "url59_sanitized": "", - "url5_sanitized": "", - "url6": "", - "url60": "", - "url60_sanitized": "", - "url61": "", - "url61_sanitized": "", - "url62": "", - "url62_sanitized": "", - "url63": "", - "url63_sanitized": "", - "url64": "", - "url64_sanitized": "", - "url65": "", - "url65_sanitized": "", - "url66": "", - "url66_sanitized": "", - "url67": "", - "url67_sanitized": "", - "url68": "", - "url68_sanitized": "", - "url69": "", - "url69_sanitized": "", - "url6_sanitized": "", - "url7": "", - "url70": "", - "url70_sanitized": "", - "url71": "", - "url71_sanitized": "", - "url72": "", - "url72_sanitized": "", - "url73": "", - "url73_sanitized": "", - "url74": "", - "url74_sanitized": "", - "url75": "", - "url75_sanitized": "", - "url76": "", - "url76_sanitized": "", - "url77": "", - "url77_sanitized": "", - "url78": "", - "url78_sanitized": "", - "url79": "", - "url79_sanitized": "", - "url7_sanitized": "", - "url8": "", - "url80": "", - "url80_sanitized": "", - "url81": "", - "url81_sanitized": "", - "url82": "", - "url82_sanitized": "", - "url83": "", - "url83_sanitized": "", - "url84": "", - "url84_sanitized": "", - "url85": "", - "url85_sanitized": "", - "url86": "", - "url86_sanitized": "", - "url87": "", - "url87_sanitized": "", - "url88": "", - "url88_sanitized": "", - "url89": "", - "url89_sanitized": "", - "url8_sanitized": "", - "url9": "", - "url90": "", - "url90_sanitized": "", - "url91": "", - "url91_sanitized": "", - "url92": "", - "url92_sanitized": "", - "url93": "", - "url93_sanitized": "", - "url94": "", - "url94_sanitized": "", - "url95": "", - "url95_sanitized": "", - "url96": "", - "url96_sanitized": "", - "url97": "", - "url97_sanitized": "", - "url98": "", - "url98_sanitized": "", - "url99": "", - "url99_sanitized": "", - "url9_sanitized": "", - "url_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8channel\u29f8UCsItMF6_fP754ihIsSRLk5A\u29f8playlists", - "urls": "{ [ \"https://www.youtube.com/channel/UCsItMF6_fP754ihIsSRLk5A/playlists\" ] }", - "urls_sanitized": "[\uff02https\uff1a\u29f8\u29f8www.youtube.com\u29f8channel\u29f8UCsItMF6_fP754ihIsSRLk5A\u29f8playlists\uff02]", - "webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", - "webpage_url_sanitized": "{ %sanitize( webpage_url ) }", - "width": "{ %map_get_non_empty( entry_metadata, \"width\", 0 ) }", - "width_sanitized": "{ %sanitize( width ) }", - "ytdl_sub_entry_date_eval": "{ %string( upload_date_standardized ) }", - "ytdl_sub_entry_date_eval_sanitized": "{ %sanitize( ytdl_sub_entry_date_eval ) }", - "ytdl_sub_input_url": "{ %string( '' ) }", - "ytdl_sub_input_url_count": "{ %int( 0 ) }", - "ytdl_sub_input_url_count_sanitized": "{ %sanitize( ytdl_sub_input_url_count ) }", - "ytdl_sub_input_url_index": "{ %int( -1 ) }", - "ytdl_sub_input_url_index_sanitized": "{ %sanitize( ytdl_sub_input_url_index ) }", - "ytdl_sub_input_url_sanitized": "{ %sanitize( ytdl_sub_input_url ) }" -} \ No newline at end of file diff --git a/tests/resources/expected_json/music_video/inspect_full_overrides.json b/tests/resources/expected_json/music_video/inspect_full_overrides.json deleted file mode 100644 index 7325202e..00000000 --- a/tests/resources/expected_json/music_video/inspect_full_overrides.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "avatar_uncropped_thumbnail_file_name": "", - "banner_uncropped_thumbnail_file_name": "", - "category_url_array": "{ [ ] }", - "category_url_map": "{ [ ] }", - "enable_bilateral_scraping": "{ %bool(True) }", - "enable_resolution_assert": "{ %bool(True) }", - "enable_throttle_protection": "{ %bool(True) }", - "file_title": "{ %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "file_uid": "{ %sanitize_plex_episode( %map_get( entry_metadata, \"id\" ) ) }", - "include_sibling_metadata": "{ %bool(False) }", - "modified_webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", - "music_video_album": "Music Videos", - "music_video_album_default": "Music Videos", - "music_video_artist": "Rick Astley", - "music_video_date": "{ %elif( %contains_url_field( \"date\" ), %get_url_field( \"date\", upload_date_standardized ), %contains_url_field( \"year\" ), %concat( %get_url_field( \"date\", upload_year ), \"-01-01\" ), upload_date_standardized ) }", - "music_video_directory": "tv_show_directory_path", - "music_video_file_name": "Rick Astley/{ %sanitize( %get_url_field( \"title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "music_video_file_name_suffix": "", - "music_video_genre": "Pop", - "music_video_genre_default": "ytdl-sub", - "music_video_title": "{ %get_url_field( \"title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "music_video_year": "{ %int( %elif( %contains_url_field( \"date\" ), %slice( %get_url_field( \"date\", upload_date_standardized ), 0, 4 ), %contains_url_field( \"year\" ), %get_url_field( \"date\", upload_year ), upload_year ) ) }", - "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", - "resolution_assert_height_gte": "{ %int(361) }", - "resolution_assert_ignore_titles": "{ [ ] }", - "resolution_assert_is_ignored": "{ %print_if_true( %concat( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), resolution_assert_ignore_titles ) ) }", - "resolution_assert_print": "{ %bool(True) }", - "resolution_readable": "{ %map_get_non_empty( entry_metadata, \"width\", 0 ) }x{ %map_get_non_empty( entry_metadata, \"height\", 0 ) }", - "subscription_array": "{ [ \"https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc\" ] }", - "subscription_indent_1": "Pop", - "subscription_map": "{ { } }", - "subscription_value": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "subscription_value_1": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "url": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "url10": "", - "url100": "", - "url11": "", - "url12": "", - "url13": "", - "url14": "", - "url15": "", - "url16": "", - "url17": "", - "url18": "", - "url19": "", - "url2": "", - "url20": "", - "url21": "", - "url22": "", - "url23": "", - "url24": "", - "url25": "", - "url26": "", - "url27": "", - "url28": "", - "url29": "", - "url3": "", - "url30": "", - "url31": "", - "url32": "", - "url33": "", - "url34": "", - "url35": "", - "url36": "", - "url37": "", - "url38": "", - "url39": "", - "url4": "", - "url40": "", - "url41": "", - "url42": "", - "url43": "", - "url44": "", - "url45": "", - "url46": "", - "url47": "", - "url48": "", - "url49": "", - "url5": "", - "url50": "", - "url51": "", - "url52": "", - "url53": "", - "url54": "", - "url55": "", - "url56": "", - "url57": "", - "url58": "", - "url59": "", - "url6": "", - "url60": "", - "url61": "", - "url62": "", - "url63": "", - "url64": "", - "url65": "", - "url66": "", - "url67": "", - "url68": "", - "url69": "", - "url7": "", - "url70": "", - "url71": "", - "url72": "", - "url73": "", - "url74": "", - "url75": "", - "url76": "", - "url77": "", - "url78": "", - "url79": "", - "url8": "", - "url80": "", - "url81": "", - "url82": "", - "url83": "", - "url84": "", - "url85": "", - "url86": "", - "url87": "", - "url88": "", - "url89": "", - "url9": "", - "url90": "", - "url91": "", - "url92": "", - "url93": "", - "url94": "", - "url95": "", - "url96": "", - "url97": "", - "url98": "", - "url99": "", - "urls": "{ [ \"https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc\", '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '' ] }" -} \ No newline at end of file diff --git a/tests/resources/expected_json/music_video/inspect_full_variables.json b/tests/resources/expected_json/music_video/inspect_full_variables.json deleted file mode 100644 index d1231e9d..00000000 --- a/tests/resources/expected_json/music_video/inspect_full_variables.json +++ /dev/null @@ -1,480 +0,0 @@ -{ - "avatar_uncropped_thumbnail_file_name": "", - "avatar_uncropped_thumbnail_file_name_sanitized": "", - "banner_uncropped_thumbnail_file_name": "", - "banner_uncropped_thumbnail_file_name_sanitized": "", - "category_url_array": "{ [ ] }", - "category_url_array_sanitized": "[]", - "category_url_map": "{ [ ] }", - "category_url_map_sanitized": "[]", - "channel": "{ %map_get_non_empty( entry_metadata, \"channel\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "channel_id": "{ %map_get_non_empty( entry_metadata, \"channel_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "channel_id_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"channel_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "channel_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"channel\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "chapters": "{ [ ] }", - "chapters_sanitized": "[]", - "comments": "{ [ ] }", - "comments_sanitized": "[]", - "creator": "{ %map_get_non_empty( entry_metadata, \"creator\", %map_get_non_empty( entry_metadata, \"channel\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "creator_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"creator\", %map_get_non_empty( entry_metadata, \"channel\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ) }", - "description": "{ %map_get_non_empty( entry_metadata, \"description\", '' ) }", - "description_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"description\", '' ) ) }", - "download_index": "{ %int(1) }", - "download_index_padded6": "000001", - "download_index_padded6_sanitized": "000001", - "download_index_sanitized": "1", - "duration": "{ %map_get_non_empty( entry_metadata, \"duration\", 0 ) }", - "duration_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"duration\", 0 ) ) }", - "enable_bilateral_scraping": "{ %bool(True) }", - "enable_bilateral_scraping_sanitized": "true", - "enable_resolution_assert": "{ %bool(True) }", - "enable_resolution_assert_sanitized": "true", - "enable_throttle_protection": "{ %bool(True) }", - "enable_throttle_protection_sanitized": "true", - "entry_metadata": "{ { } }", - "entry_metadata_sanitized": "{ %sanitize( entry_metadata ) }", - "epoch": "{ %map_get( entry_metadata, \"epoch\" ) }", - "epoch_date": "{ %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) }", - "epoch_date_sanitized": "{ %sanitize( %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) }", - "epoch_hour": "{ %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%H\" ) }", - "epoch_hour_sanitized": "{ %sanitize( %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%H\" ) ) }", - "epoch_sanitized": "{ %sanitize( %map_get( entry_metadata, \"epoch\" ) ) }", - "ext": "{ %map_get( entry_metadata, \"ext\" ) }", - "ext_sanitized": "{ %sanitize( %map_get( entry_metadata, \"ext\" ) ) }", - "extractor": "{ %map_get( entry_metadata, \"extractor\" ) }", - "extractor_key": "{ %map_get( entry_metadata, \"extractor_key\" ) }", - "extractor_key_sanitized": "{ %sanitize( %map_get( entry_metadata, \"extractor_key\" ) ) }", - "extractor_sanitized": "{ %sanitize( %map_get( entry_metadata, \"extractor\" ) ) }", - "file_title": "{ %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "file_title_sanitized": "{ %sanitize( %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "file_uid": "{ %sanitize_plex_episode( %map_get( entry_metadata, \"id\" ) ) }", - "file_uid_sanitized": "{ %sanitize( %sanitize_plex_episode( %map_get( entry_metadata, \"id\" ) ) ) }", - "height": "{ %map_get_non_empty( entry_metadata, \"height\", 0 ) }", - "height_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"height\", 0 ) ) }", - "ie_key": "{ %map_get_non_empty( entry_metadata, \"ie_key\", %map_get( entry_metadata, \"extractor_key\" ) ) }", - "ie_key_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"ie_key\", %map_get( entry_metadata, \"extractor_key\" ) ) ) }", - "include_sibling_metadata": "{ %bool(False) }", - "include_sibling_metadata_sanitized": "false", - "info_json_ext": "info.json", - "info_json_ext_sanitized": "info.json", - "modified_webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", - "modified_webpage_url_sanitized": "{ %sanitize( %map_get( entry_metadata, \"webpage_url\" ) ) }", - "music_video_album": "Music Videos", - "music_video_album_default": "Music Videos", - "music_video_album_default_sanitized": "Music Videos", - "music_video_album_sanitized": "Music Videos", - "music_video_artist": "Rick Astley", - "music_video_artist_sanitized": "Rick Astley", - "music_video_date": "{ %elif( %contains_url_field( \"date\" ), %get_url_field( \"date\", upload_date_standardized ), %contains_url_field( \"year\" ), %concat( %get_url_field( \"date\", upload_year ), \"-01-01\" ), upload_date_standardized ) }", - "music_video_date_sanitized": "{ %sanitize( %elif( %contains_url_field( \"date\" ), %get_url_field( \"date\", upload_date_standardized ), %contains_url_field( \"year\" ), %concat( %get_url_field( \"date\", upload_year ), \"-01-01\" ), upload_date_standardized ) ) }", - "music_video_directory": "tv_show_directory_path", - "music_video_directory_sanitized": "tv_show_directory_path", - "music_video_file_name": "Rick Astley/{ %sanitize( %get_url_field( \"title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "music_video_file_name_sanitized": "{ %sanitize( %concat( \"Rick Astley\", \"/\", %sanitize( %get_url_field( \"title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ), '' ) ) }", - "music_video_file_name_suffix": "", - "music_video_file_name_suffix_sanitized": "", - "music_video_genre": "Pop", - "music_video_genre_default": "ytdl-sub", - "music_video_genre_default_sanitized": "ytdl-sub", - "music_video_genre_sanitized": "Pop", - "music_video_title": "{ %get_url_field( \"title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "music_video_title_sanitized": "{ %sanitize( %get_url_field( \"title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "music_video_year": "{ %int( %elif( %contains_url_field( \"date\" ), %slice( %get_url_field( \"date\", upload_date_standardized ), 0, 4 ), %contains_url_field( \"year\" ), %get_url_field( \"date\", upload_year ), upload_year ) ) }", - "music_video_year_sanitized": "{ %sanitize( %int( %elif( %contains_url_field( \"date\" ), %slice( %get_url_field( \"date\", upload_date_standardized ), 0, 4 ), %contains_url_field( \"year\" ), %get_url_field( \"date\", upload_year ), upload_year ) ) ) }", - "playlist_count": "{ %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ) }", - "playlist_count_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ) ) }", - "playlist_description": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"description\", %map_get_non_empty( entry_metadata, \"description\", '' ) ) }", - "playlist_description_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"description\", %map_get_non_empty( entry_metadata, \"description\", '' ) ) ) }", - "playlist_index": "{ %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ) }", - "playlist_index_padded": "{ %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ) }", - "playlist_index_padded6": "{ %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 6 ) }", - "playlist_index_padded6_sanitized": "{ %sanitize( %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 6 ) ) }", - "playlist_index_padded_sanitized": "{ %sanitize( %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ) ) }", - "playlist_index_reversed": "{ %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ) }", - "playlist_index_reversed_padded": "{ %pad_zero( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ), 2 ) }", - "playlist_index_reversed_padded6": "{ %pad_zero( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ), 6 ) }", - "playlist_index_reversed_padded6_sanitized": "{ %sanitize( %pad_zero( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ), 6 ) ) }", - "playlist_index_reversed_padded_sanitized": "{ %sanitize( %pad_zero( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ), 2 ) ) }", - "playlist_index_reversed_sanitized": "{ %sanitize( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ) ) }", - "playlist_index_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ) ) }", - "playlist_max_upload_date": "{ %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) }", - "playlist_max_upload_date_sanitized": "{ %sanitize( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ) }", - "playlist_max_upload_year": "{ %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ) }", - "playlist_max_upload_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ) ) }", - "playlist_max_upload_year_truncated": "{ %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year_truncated\" ) ) }", - "playlist_max_upload_year_truncated_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year_truncated\" ) ) ) }", - "playlist_metadata": "{ %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ) }", - "playlist_metadata_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ) ) }", - "playlist_title": "{ %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "playlist_title_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "playlist_uid": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_id\", %map_get( entry_metadata, \"id\" ) ) }", - "playlist_uid_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "playlist_uploader": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "playlist_uploader_id": "{ %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "playlist_uploader_id_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "playlist_uploader_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "playlist_uploader_url": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader_url\", %map_get( entry_metadata, \"webpage_url\" ) ) }", - "playlist_uploader_url_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) }", - "playlist_webpage_url": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) }", - "playlist_webpage_url_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) }", - "release_date": "{ %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) }", - "release_date_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ) }", - "release_date_standardized": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"date_standardized\" ) ) }", - "release_date_standardized_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"date_standardized\" ) ) ) }", - "release_day": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day\" ) ) }", - "release_day_of_year": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year\" ) ) }", - "release_day_of_year_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_padded\" ) ) }", - "release_day_of_year_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_padded\" ) ) ) }", - "release_day_of_year_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_reversed\" ) ) }", - "release_day_of_year_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_reversed_padded\" ) ) }", - "release_day_of_year_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_reversed_padded\" ) ) ) }", - "release_day_of_year_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_reversed\" ) ) ) }", - "release_day_of_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year\" ) ) ) }", - "release_day_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_padded\" ) ) }", - "release_day_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_padded\" ) ) ) }", - "release_day_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_reversed\" ) ) }", - "release_day_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_reversed_padded\" ) ) }", - "release_day_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_reversed_padded\" ) ) ) }", - "release_day_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_reversed\" ) ) ) }", - "release_day_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day\" ) ) ) }", - "release_month": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month\" ) ) }", - "release_month_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_padded\" ) ) }", - "release_month_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_padded\" ) ) ) }", - "release_month_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_reversed\" ) ) }", - "release_month_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_reversed_padded\" ) ) }", - "release_month_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_reversed_padded\" ) ) ) }", - "release_month_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_reversed\" ) ) ) }", - "release_month_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month\" ) ) ) }", - "release_year": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year\" ) ) }", - "release_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year\" ) ) ) }", - "release_year_truncated": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year_truncated\" ) ) }", - "release_year_truncated_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year_truncated_reversed\" ) ) }", - "release_year_truncated_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year_truncated_reversed\" ) ) ) }", - "release_year_truncated_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year_truncated\" ) ) ) }", - "requested_subtitles": "{ { } }", - "requested_subtitles_sanitized": "{}", - "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", - "resolution_assert_height_gte": "{ %int(361) }", - "resolution_assert_height_gte_sanitized": "361", - "resolution_assert_ignore_titles": "{ [ ] }", - "resolution_assert_ignore_titles_sanitized": "[]", - "resolution_assert_is_ignored": "{ %print_if_true( %concat( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), resolution_assert_ignore_titles ) ) }", - "resolution_assert_is_ignored_sanitized": "{ %sanitize( %print_if_true( %concat( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), resolution_assert_ignore_titles ) ) ) }", - "resolution_assert_print": "{ %bool(True) }", - "resolution_assert_print_sanitized": "true", - "resolution_assert_sanitized": "{ %sanitize( %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) ) }", - "resolution_readable": "{ %map_get_non_empty( entry_metadata, \"width\", 0 ) }x{ %map_get_non_empty( entry_metadata, \"height\", 0 ) }", - "resolution_readable_sanitized": "{ %sanitize( %concat( %map_get_non_empty( entry_metadata, \"width\", 0 ), \"x\", %map_get_non_empty( entry_metadata, \"height\", 0 ) ) ) }", - "sibling_metadata": "{ %map_get_non_empty( entry_metadata, \"sibling_metadata\", [ ] ) }", - "sibling_metadata_sanitized": "{ %sanitize( sibling_metadata ) }", - "source_count": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_count\", 1 ) }", - "source_count_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_count\", 1 ) ) }", - "source_description": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"description\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"description\", %map_get_non_empty( entry_metadata, \"description\", '' ) ) ) }", - "source_description_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"description\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"description\", %map_get_non_empty( entry_metadata, \"description\", '' ) ) ) ) }", - "source_index": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_index\", 1 ) }", - "source_index_padded": "{ %pad_zero( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_index\", 1 ), 2 ) }", - "source_index_padded_sanitized": "{ %sanitize( %pad_zero( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_index\", 1 ), 2 ) ) }", - "source_index_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_index\", 1 ) ) }", - "source_metadata": "{ %map_get_non_empty( entry_metadata, \"source_metadata\", { } ) }", - "source_metadata_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ) ) }", - "source_title": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"title\", %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "source_title_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"title\", %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "source_uid": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"id\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "source_uid_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"id\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "source_uploader": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "source_uploader_id": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader_id\", %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "source_uploader_id_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader_id\", %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "source_uploader_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ) }", - "source_uploader_url": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"webpage_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) ) }", - "source_uploader_url_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"webpage_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) ) ) }", - "source_webpage_url": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"webpage_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) }", - "source_webpage_url_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"webpage_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) ) }", - "sponsorblock_chapters": "{ [ ] }", - "sponsorblock_chapters_sanitized": "[]", - "subscription_array": "{ [ \"https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc\" ] }", - "subscription_array_sanitized": "[\uff02https\uff1a\u29f8\u29f8www.youtube.com\u29f8playlist\uff1flist=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc\uff02]", - "subscription_has_download_archive": "{ %bool(False) }", - "subscription_has_download_archive_sanitized": "false", - "subscription_indent_1": "Pop", - "subscription_indent_1_sanitized": "Pop", - "subscription_map": "{ { } }", - "subscription_map_sanitized": "{}", - "subscription_name": "Rick Astley", - "subscription_name_sanitized": "Rick Astley", - "subscription_value": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "subscription_value_1": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "subscription_value_1_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8playlist\uff1flist=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "subscription_value_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8playlist\uff1flist=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "thumbnail_ext": "jpg", - "thumbnail_ext_sanitized": "jpg", - "title": "{ %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) }", - "title_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "title_sanitized_plex": "{ %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "title_sanitized_plex_sanitized": "{ %sanitize( %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "uid": "{ %map_get( entry_metadata, \"id\" ) }", - "uid_sanitized": "{ %sanitize( %map_get( entry_metadata, \"id\" ) ) }", - "uid_sanitized_plex": "{ %sanitize_plex_episode( %map_get( entry_metadata, \"id\" ) ) }", - "uid_sanitized_plex_sanitized": "{ %sanitize( %sanitize_plex_episode( %map_get( entry_metadata, \"id\" ) ) ) }", - "upload_date": "{ %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) }", - "upload_date_index": "{ %int(1) }", - "upload_date_index_padded": "01", - "upload_date_index_padded_sanitized": "01", - "upload_date_index_reversed": "{ %int(99) }", - "upload_date_index_reversed_padded": "99", - "upload_date_index_reversed_padded_sanitized": "99", - "upload_date_index_reversed_sanitized": "99", - "upload_date_index_sanitized": "1", - "upload_date_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) }", - "upload_date_standardized": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", - "upload_date_standardized_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) ) }", - "upload_day": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day\" ) ) }", - "upload_day_of_year": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year\" ) ) }", - "upload_day_of_year_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_padded\" ) ) }", - "upload_day_of_year_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_padded\" ) ) ) }", - "upload_day_of_year_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_reversed\" ) ) }", - "upload_day_of_year_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_reversed_padded\" ) ) }", - "upload_day_of_year_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_reversed_padded\" ) ) ) }", - "upload_day_of_year_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_reversed\" ) ) ) }", - "upload_day_of_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year\" ) ) ) }", - "upload_day_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ) }", - "upload_day_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ) ) }", - "upload_day_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_reversed\" ) ) }", - "upload_day_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_reversed_padded\" ) ) }", - "upload_day_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_reversed_padded\" ) ) ) }", - "upload_day_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_reversed\" ) ) ) }", - "upload_day_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day\" ) ) ) }", - "upload_month": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ) }", - "upload_month_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_padded\" ) ) }", - "upload_month_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_padded\" ) ) ) }", - "upload_month_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_reversed\" ) ) }", - "upload_month_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_reversed_padded\" ) ) }", - "upload_month_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_reversed_padded\" ) ) ) }", - "upload_month_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_reversed\" ) ) ) }", - "upload_month_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ) ) }", - "upload_year": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }", - "upload_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) }", - "upload_year_truncated": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year_truncated\" ) ) }", - "upload_year_truncated_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year_truncated_reversed\" ) ) }", - "upload_year_truncated_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year_truncated_reversed\" ) ) ) }", - "upload_year_truncated_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year_truncated\" ) ) ) }", - "uploader": "{ %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "uploader_id": "{ %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) }", - "uploader_id_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "uploader_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "uploader_url": "{ %map_get_non_empty( entry_metadata, \"uploader_url\", %map_get( entry_metadata, \"webpage_url\" ) ) }", - "uploader_url_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"uploader_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) }", - "url": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "url10": "", - "url100": "", - "url100_sanitized": "", - "url10_sanitized": "", - "url11": "", - "url11_sanitized": "", - "url12": "", - "url12_sanitized": "", - "url13": "", - "url13_sanitized": "", - "url14": "", - "url14_sanitized": "", - "url15": "", - "url15_sanitized": "", - "url16": "", - "url16_sanitized": "", - "url17": "", - "url17_sanitized": "", - "url18": "", - "url18_sanitized": "", - "url19": "", - "url19_sanitized": "", - "url2": "", - "url20": "", - "url20_sanitized": "", - "url21": "", - "url21_sanitized": "", - "url22": "", - "url22_sanitized": "", - "url23": "", - "url23_sanitized": "", - "url24": "", - "url24_sanitized": "", - "url25": "", - "url25_sanitized": "", - "url26": "", - "url26_sanitized": "", - "url27": "", - "url27_sanitized": "", - "url28": "", - "url28_sanitized": "", - "url29": "", - "url29_sanitized": "", - "url2_sanitized": "", - "url3": "", - "url30": "", - "url30_sanitized": "", - "url31": "", - "url31_sanitized": "", - "url32": "", - "url32_sanitized": "", - "url33": "", - "url33_sanitized": "", - "url34": "", - "url34_sanitized": "", - "url35": "", - "url35_sanitized": "", - "url36": "", - "url36_sanitized": "", - "url37": "", - "url37_sanitized": "", - "url38": "", - "url38_sanitized": "", - "url39": "", - "url39_sanitized": "", - "url3_sanitized": "", - "url4": "", - "url40": "", - "url40_sanitized": "", - "url41": "", - "url41_sanitized": "", - "url42": "", - "url42_sanitized": "", - "url43": "", - "url43_sanitized": "", - "url44": "", - "url44_sanitized": "", - "url45": "", - "url45_sanitized": "", - "url46": "", - "url46_sanitized": "", - "url47": "", - "url47_sanitized": "", - "url48": "", - "url48_sanitized": "", - "url49": "", - "url49_sanitized": "", - "url4_sanitized": "", - "url5": "", - "url50": "", - "url50_sanitized": "", - "url51": "", - "url51_sanitized": "", - "url52": "", - "url52_sanitized": "", - "url53": "", - "url53_sanitized": "", - "url54": "", - "url54_sanitized": "", - "url55": "", - "url55_sanitized": "", - "url56": "", - "url56_sanitized": "", - "url57": "", - "url57_sanitized": "", - "url58": "", - "url58_sanitized": "", - "url59": "", - "url59_sanitized": "", - "url5_sanitized": "", - "url6": "", - "url60": "", - "url60_sanitized": "", - "url61": "", - "url61_sanitized": "", - "url62": "", - "url62_sanitized": "", - "url63": "", - "url63_sanitized": "", - "url64": "", - "url64_sanitized": "", - "url65": "", - "url65_sanitized": "", - "url66": "", - "url66_sanitized": "", - "url67": "", - "url67_sanitized": "", - "url68": "", - "url68_sanitized": "", - "url69": "", - "url69_sanitized": "", - "url6_sanitized": "", - "url7": "", - "url70": "", - "url70_sanitized": "", - "url71": "", - "url71_sanitized": "", - "url72": "", - "url72_sanitized": "", - "url73": "", - "url73_sanitized": "", - "url74": "", - "url74_sanitized": "", - "url75": "", - "url75_sanitized": "", - "url76": "", - "url76_sanitized": "", - "url77": "", - "url77_sanitized": "", - "url78": "", - "url78_sanitized": "", - "url79": "", - "url79_sanitized": "", - "url7_sanitized": "", - "url8": "", - "url80": "", - "url80_sanitized": "", - "url81": "", - "url81_sanitized": "", - "url82": "", - "url82_sanitized": "", - "url83": "", - "url83_sanitized": "", - "url84": "", - "url84_sanitized": "", - "url85": "", - "url85_sanitized": "", - "url86": "", - "url86_sanitized": "", - "url87": "", - "url87_sanitized": "", - "url88": "", - "url88_sanitized": "", - "url89": "", - "url89_sanitized": "", - "url8_sanitized": "", - "url9": "", - "url90": "", - "url90_sanitized": "", - "url91": "", - "url91_sanitized": "", - "url92": "", - "url92_sanitized": "", - "url93": "", - "url93_sanitized": "", - "url94": "", - "url94_sanitized": "", - "url95": "", - "url95_sanitized": "", - "url96": "", - "url96_sanitized": "", - "url97": "", - "url97_sanitized": "", - "url98": "", - "url98_sanitized": "", - "url99": "", - "url99_sanitized": "", - "url9_sanitized": "", - "url_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8playlist\uff1flist=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "urls": "{ [ \"https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc\", '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '' ] }", - "urls_sanitized": "[\uff02https\uff1a\u29f8\u29f8www.youtube.com\u29f8playlist\uff1flist=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02]", - "webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", - "webpage_url_sanitized": "{ %sanitize( %map_get( entry_metadata, \"webpage_url\" ) ) }", - "width": "{ %map_get_non_empty( entry_metadata, \"width\", 0 ) }", - "width_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"width\", 0 ) ) }", - "ytdl_sub_entry_date_eval": "{ %string( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) ) }", - "ytdl_sub_entry_date_eval_sanitized": "{ %sanitize( %string( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) ) ) }", - "ytdl_sub_input_url": "", - "ytdl_sub_input_url_count": "{ %int(0) }", - "ytdl_sub_input_url_count_sanitized": "0", - "ytdl_sub_input_url_index": "{ %int(-1) }", - "ytdl_sub_input_url_index_sanitized": "-1", - "ytdl_sub_input_url_sanitized": "" -} \ No newline at end of file diff --git a/tests/resources/expected_json/music_video/inspect_overrides.json b/tests/resources/expected_json/music_video/inspect_overrides.json deleted file mode 100644 index 41e0f19d..00000000 --- a/tests/resources/expected_json/music_video/inspect_overrides.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "avatar_uncropped_thumbnail_file_name": "", - "banner_uncropped_thumbnail_file_name": "", - "category_url_array": "{ [ ] }", - "category_url_map": "{ [ ] }", - "enable_bilateral_scraping": "{ %bool(True) }", - "enable_resolution_assert": "{ %bool(True) }", - "enable_throttle_protection": "{ %bool(True) }", - "file_title": "{ title_sanitized_plex }", - "file_uid": "{ uid_sanitized_plex }", - "include_sibling_metadata": "{ %bool(False) }", - "modified_webpage_url": "{ webpage_url }", - "music_video_album": "{ %get_url_field( \"category\", \"Music Videos\" ) }", - "music_video_album_default": "Music Videos", - "music_video_artist": "Rick Astley", - "music_video_date": "{ %elif( %contains_url_field( \"date\" ), %get_url_field( \"date\", upload_date_standardized ), %contains_url_field( \"year\" ), %concat( %get_url_field( \"date\", upload_year ), \"-01-01\" ), upload_date_standardized ) }", - "music_video_directory": "tv_show_directory_path", - "music_video_file_name": "Rick Astley/{ %sanitize( %get_url_field( \"title\", title ) ) }", - "music_video_file_name_suffix": "", - "music_video_genre": "Pop", - "music_video_genre_default": "ytdl-sub", - "music_video_title": "{ %get_url_field( \"title\", title ) }", - "music_video_year": "{ %int( %elif( %contains_url_field( \"date\" ), %slice( %get_url_field( \"date\", upload_date_standardized ), 0, 4 ), %contains_url_field( \"year\" ), %get_url_field( \"date\", upload_year ), upload_year ) ) }", - "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", - "resolution_assert_height_gte": "{ %int(361) }", - "resolution_assert_ignore_titles": "{ [ ] }", - "resolution_assert_is_ignored": "{ %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, resolution_assert_ignore_titles ) ) }", - "resolution_assert_print": "{ %bool(True) }", - "resolution_readable": "{ width }x{ height }", - "subscription_array": "{ [ \"https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc\" ] }", - "subscription_indent_1": "Pop", - "subscription_map": "{ { } }", - "subscription_value": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "subscription_value_1": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "url": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "url10": "", - "url100": "", - "url11": "", - "url12": "", - "url13": "", - "url14": "", - "url15": "", - "url16": "", - "url17": "", - "url18": "", - "url19": "", - "url2": "", - "url20": "", - "url21": "", - "url22": "", - "url23": "", - "url24": "", - "url25": "", - "url26": "", - "url27": "", - "url28": "", - "url29": "", - "url3": "", - "url30": "", - "url31": "", - "url32": "", - "url33": "", - "url34": "", - "url35": "", - "url36": "", - "url37": "", - "url38": "", - "url39": "", - "url4": "", - "url40": "", - "url41": "", - "url42": "", - "url43": "", - "url44": "", - "url45": "", - "url46": "", - "url47": "", - "url48": "", - "url49": "", - "url5": "", - "url50": "", - "url51": "", - "url52": "", - "url53": "", - "url54": "", - "url55": "", - "url56": "", - "url57": "", - "url58": "", - "url59": "", - "url6": "", - "url60": "", - "url61": "", - "url62": "", - "url63": "", - "url64": "", - "url65": "", - "url66": "", - "url67": "", - "url68": "", - "url69": "", - "url7": "", - "url70": "", - "url71": "", - "url72": "", - "url73": "", - "url74": "", - "url75": "", - "url76": "", - "url77": "", - "url78": "", - "url79": "", - "url8": "", - "url80": "", - "url81": "", - "url82": "", - "url83": "", - "url84": "", - "url85": "", - "url86": "", - "url87": "", - "url88": "", - "url89": "", - "url9": "", - "url90": "", - "url91": "", - "url92": "", - "url93": "", - "url94": "", - "url95": "", - "url96": "", - "url97": "", - "url98": "", - "url99": "", - "urls": "{ [ \"https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc\", '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '' ] }" -} \ No newline at end of file diff --git a/tests/resources/expected_json/music_video/inspect_sub_fill.json b/tests/resources/expected_json/music_video/inspect_sub_fill.json new file mode 100644 index 00000000..5999a01f --- /dev/null +++ b/tests/resources/expected_json/music_video/inspect_sub_fill.json @@ -0,0 +1,314 @@ +{ + "download": [ + { + "download_reverse": true, + "include_sibling_metadata": false, + "playlist_thumbnails": [ + { + "name": "", + "uid": "avatar_uncropped" + }, + { + "name": "", + "uid": "banner_uncropped" + } + ], + "source_thumbnails": [ + { + "name": "", + "uid": "avatar_uncropped" + }, + { + "name": "", + "uid": "banner_uncropped" + } + ], + "url": [ + "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc" + ], + "variables": {}, + "webpage_url": "{ modified_webpage_url }", + "ytdl_options": {} + } + ], + "format": "(bv*[ext=mp4][vcodec~='^((he|a)vc|h26[45])']+ba[ext=m4a]) / (bv[ext=mp4]*+ba[ext=m4a]/b)", + "output_options": { + "download_archive_name": ".ytdl-sub-Rick Astley-download-archive.json", + "file_name": "{ music_video_file_name }.{ ext }", + "info_json_name": "{ music_video_file_name }.{ info_json_ext }", + "keep_files_date_eval": "{ upload_date_standardized }", + "maintain_download_archive": true, + "output_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpyukbh6ta", + "preserve_mtime": false, + "thumbnail_name": "{ music_video_file_name }.jpg" + }, + "overrides": { + "%bilateral_url": "{ %if( %and( enable_bilateral_scraping, subscription_has_download_archive, %is_bilateral_url( $0 ) ), $0, '' ) }", + "%contains_url_field": "{ %not( %is_null( %get_url_field( $0, '' ) ) ) }", + "%flat_array__category_to_map_format": "{ %array_apply_fixed( %assert_then( %is_array( $1 ), $1, \"If using album categories, each category must map to an array\" ), $0, %flat_array__url_to_map_format ) }", + "%flat_array__url_keyed_map_format": "{ { %map_get( $0, \"url\" ): $0 } }", + "%flat_array__url_to_map_format": "{ %elif( %is_map( $0 ), %map_extend( $0, { \"category\": $1 } ), %is_string( $0 ), { \"url\": $0, \"category\": $1 }, %throw( \"If using album categories, each URL must be either a string or map with metadata fields\" ) ) }", + "%get_url_field": "{ %map_get( %map( %map_get( category_url_map, ytdl_sub_input_url, { } ) ), $0, $1 ) }", + "%get_url_i": "{ %map_get( %map( %array_at( category_url_array, %int( %sub( $0, 1 ) ), { } ) ), \"url\", %array_at( subscription_array, %int( %sub( $0, 1 ) ), '' ) ) }", + "%is_bilateral_url": "{ %contains( $0, \"youtube.com/playlist\" ) }", + "avatar_uncropped_thumbnail_file_name": "", + "banner_uncropped_thumbnail_file_name": "", + "category_url_array": "{ [ ] }", + "category_url_map": "{ [ ] }", + "enable_bilateral_scraping": true, + "enable_resolution_assert": true, + "enable_throttle_protection": true, + "file_title": "{ title_sanitized_plex }", + "file_uid": "{ uid_sanitized_plex }", + "include_sibling_metadata": false, + "modified_webpage_url": "{ webpage_url }", + "music_video_album": "{ %get_url_field( \"category\", \"Music Videos\" ) }", + "music_video_album_default": "Music Videos", + "music_video_artist": "Rick Astley", + "music_video_date": "{ %elif( %contains_url_field( \"date\" ), %get_url_field( \"date\", upload_date_standardized ), %contains_url_field( \"year\" ), %concat( %get_url_field( \"date\", upload_year ), \"-01-01\" ), upload_date_standardized ) }", + "music_video_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpyukbh6ta", + "music_video_file_name": "Rick Astley/{ %sanitize( %get_url_field( \"title\", title ) ) }", + "music_video_file_name_suffix": "", + "music_video_genre": "Pop", + "music_video_genre_default": "ytdl-sub", + "music_video_title": "{ %get_url_field( \"title\", title ) }", + "music_video_year": "{ %int( %elif( %contains_url_field( \"date\" ), %slice( %get_url_field( \"date\", upload_date_standardized ), 0, 4 ), %contains_url_field( \"year\" ), %get_url_field( \"date\", upload_year ), upload_year ) ) }", + "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", + "resolution_assert_height_gte": 361, + "resolution_assert_ignore_titles": "{ [ ] }", + "resolution_assert_is_ignored": "{ %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, [ ] ) ) }", + "resolution_assert_print": true, + "resolution_readable": "{ width }x{ height }", + "subscription_array": [ + "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc" + ], + "subscription_indent_1": "Pop", + "subscription_map": {}, + "subscription_value": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", + "subscription_value_1": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", + "url": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", + "url10": "", + "url100": "", + "url11": "", + "url12": "", + "url13": "", + "url14": "", + "url15": "", + "url16": "", + "url17": "", + "url18": "", + "url19": "", + "url2": "", + "url20": "", + "url21": "", + "url22": "", + "url23": "", + "url24": "", + "url25": "", + "url26": "", + "url27": "", + "url28": "", + "url29": "", + "url3": "", + "url30": "", + "url31": "", + "url32": "", + "url33": "", + "url34": "", + "url35": "", + "url36": "", + "url37": "", + "url38": "", + "url39": "", + "url4": "", + "url40": "", + "url41": "", + "url42": "", + "url43": "", + "url44": "", + "url45": "", + "url46": "", + "url47": "", + "url48": "", + "url49": "", + "url5": "", + "url50": "", + "url51": "", + "url52": "", + "url53": "", + "url54": "", + "url55": "", + "url56": "", + "url57": "", + "url58": "", + "url59": "", + "url6": "", + "url60": "", + "url61": "", + "url62": "", + "url63": "", + "url64": "", + "url65": "", + "url66": "", + "url67": "", + "url68": "", + "url69": "", + "url7": "", + "url70": "", + "url71": "", + "url72": "", + "url73": "", + "url74": "", + "url75": "", + "url76": "", + "url77": "", + "url78": "", + "url79": "", + "url8": "", + "url80": "", + "url81": "", + "url82": "", + "url83": "", + "url84": "", + "url85": "", + "url86": "", + "url87": "", + "url88": "", + "url89": "", + "url9": "", + "url90": "", + "url91": "", + "url92": "", + "url93": "", + "url94": "", + "url95": "", + "url96": "", + "url97": "", + "url98": "", + "url99": "", + "urls": [ + "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "throttle_protection": { + "enable": true, + "sleep_per_download_s": { + "max": 28.4, + "min": 13.8 + }, + "sleep_per_request_s": { + "max": 0.75, + "min": 0.0 + }, + "sleep_per_subscription_s": { + "max": 26.1, + "min": 16.3 + } + }, + "video_tags": { + "album": "{ music_video_album }", + "artist": "Rick Astley", + "genre": "Pop", + "premiered": "{ music_video_date }", + "title": "{ music_video_title }", + "year": "{ music_video_year }" + } +} \ No newline at end of file diff --git a/tests/resources/expected_json/music_video/inspect_sub_internal.json b/tests/resources/expected_json/music_video/inspect_sub_internal.json new file mode 100644 index 00000000..3cd8a4cd --- /dev/null +++ b/tests/resources/expected_json/music_video/inspect_sub_internal.json @@ -0,0 +1,314 @@ +{ + "download": [ + { + "download_reverse": true, + "include_sibling_metadata": false, + "playlist_thumbnails": [ + { + "name": "", + "uid": "avatar_uncropped" + }, + { + "name": "", + "uid": "banner_uncropped" + } + ], + "source_thumbnails": [ + { + "name": "", + "uid": "avatar_uncropped" + }, + { + "name": "", + "uid": "banner_uncropped" + } + ], + "url": [ + "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc" + ], + "variables": {}, + "webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", + "ytdl_options": {} + } + ], + "format": "(bv*[ext=mp4][vcodec~='^((he|a)vc|h26[45])']+ba[ext=m4a]) / (bv[ext=mp4]*+ba[ext=m4a]/b)", + "output_options": { + "download_archive_name": ".ytdl-sub-Rick Astley-download-archive.json", + "file_name": "{ %concat( \"Rick Astley\", \"/\", %sanitize( %get_url_field( \"title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ), '' ) }.{ %map_get( entry_metadata, \"ext\" ) }", + "info_json_name": "{ %concat( \"Rick Astley\", \"/\", %sanitize( %get_url_field( \"title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ), '' ) }.info.json", + "keep_files_date_eval": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", + "maintain_download_archive": true, + "output_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmput7fc_rs", + "preserve_mtime": false, + "thumbnail_name": "{ %concat( \"Rick Astley\", \"/\", %sanitize( %get_url_field( \"title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ), '' ) }.jpg" + }, + "overrides": { + "%bilateral_url": "{ %if( %and( enable_bilateral_scraping, subscription_has_download_archive, %is_bilateral_url( $0 ) ), $0, '' ) }", + "%contains_url_field": "{ %not( %is_null( %get_url_field( $0, '' ) ) ) }", + "%flat_array__category_to_map_format": "{ %array_apply_fixed( %assert_then( %is_array( $1 ), $1, \"If using album categories, each category must map to an array\" ), $0, %flat_array__url_to_map_format ) }", + "%flat_array__url_keyed_map_format": "{ { %map_get( $0, \"url\" ): $0 } }", + "%flat_array__url_to_map_format": "{ %elif( %is_map( $0 ), %map_extend( $0, { \"category\": $1 } ), %is_string( $0 ), { \"url\": $0, \"category\": $1 }, %throw( \"If using album categories, each URL must be either a string or map with metadata fields\" ) ) }", + "%get_url_field": "{ %map_get( %map( %map_get( category_url_map, ytdl_sub_input_url, { } ) ), $0, $1 ) }", + "%get_url_i": "{ %map_get( %map( %array_at( category_url_array, %int( %sub( $0, 1 ) ), { } ) ), \"url\", %array_at( subscription_array, %int( %sub( $0, 1 ) ), '' ) ) }", + "%is_bilateral_url": "{ %contains( $0, \"youtube.com/playlist\" ) }", + "avatar_uncropped_thumbnail_file_name": "", + "banner_uncropped_thumbnail_file_name": "", + "category_url_array": "{ [ ] }", + "category_url_map": "{ [ ] }", + "enable_bilateral_scraping": true, + "enable_resolution_assert": true, + "enable_throttle_protection": true, + "file_title": "{ %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", + "file_uid": "{ %sanitize_plex_episode( %map_get( entry_metadata, \"id\" ) ) }", + "include_sibling_metadata": false, + "modified_webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", + "music_video_album": "{ %get_url_field( \"category\", \"Music Videos\" ) }", + "music_video_album_default": "Music Videos", + "music_video_artist": "Rick Astley", + "music_video_date": "{ %elif( %contains_url_field( \"date\" ), %get_url_field( \"date\", upload_date_standardized ), %contains_url_field( \"year\" ), %concat( %get_url_field( \"date\", upload_year ), \"-01-01\" ), upload_date_standardized ) }", + "music_video_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmput7fc_rs", + "music_video_file_name": "Rick Astley/{ %sanitize( %get_url_field( \"title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", + "music_video_file_name_suffix": "", + "music_video_genre": "Pop", + "music_video_genre_default": "ytdl-sub", + "music_video_title": "{ %get_url_field( \"title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", + "music_video_year": "{ %int( %elif( %contains_url_field( \"date\" ), %slice( %get_url_field( \"date\", upload_date_standardized ), 0, 4 ), %contains_url_field( \"year\" ), %get_url_field( \"date\", upload_year ), upload_year ) ) }", + "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", + "resolution_assert_height_gte": 361, + "resolution_assert_ignore_titles": "{ [ ] }", + "resolution_assert_is_ignored": "{ %print_if_true( %concat( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), [ ] ) ) }", + "resolution_assert_print": true, + "resolution_readable": "{ width }x{ height }", + "subscription_array": [ + "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc" + ], + "subscription_indent_1": "Pop", + "subscription_map": {}, + "subscription_value": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", + "subscription_value_1": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", + "url": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", + "url10": "", + "url100": "", + "url11": "", + "url12": "", + "url13": "", + "url14": "", + "url15": "", + "url16": "", + "url17": "", + "url18": "", + "url19": "", + "url2": "", + "url20": "", + "url21": "", + "url22": "", + "url23": "", + "url24": "", + "url25": "", + "url26": "", + "url27": "", + "url28": "", + "url29": "", + "url3": "", + "url30": "", + "url31": "", + "url32": "", + "url33": "", + "url34": "", + "url35": "", + "url36": "", + "url37": "", + "url38": "", + "url39": "", + "url4": "", + "url40": "", + "url41": "", + "url42": "", + "url43": "", + "url44": "", + "url45": "", + "url46": "", + "url47": "", + "url48": "", + "url49": "", + "url5": "", + "url50": "", + "url51": "", + "url52": "", + "url53": "", + "url54": "", + "url55": "", + "url56": "", + "url57": "", + "url58": "", + "url59": "", + "url6": "", + "url60": "", + "url61": "", + "url62": "", + "url63": "", + "url64": "", + "url65": "", + "url66": "", + "url67": "", + "url68": "", + "url69": "", + "url7": "", + "url70": "", + "url71": "", + "url72": "", + "url73": "", + "url74": "", + "url75": "", + "url76": "", + "url77": "", + "url78": "", + "url79": "", + "url8": "", + "url80": "", + "url81": "", + "url82": "", + "url83": "", + "url84": "", + "url85": "", + "url86": "", + "url87": "", + "url88": "", + "url89": "", + "url9": "", + "url90": "", + "url91": "", + "url92": "", + "url93": "", + "url94": "", + "url95": "", + "url96": "", + "url97": "", + "url98": "", + "url99": "", + "urls": [ + "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "throttle_protection": { + "enable": true, + "sleep_per_download_s": { + "max": 28.4, + "min": 13.8 + }, + "sleep_per_request_s": { + "max": 0.75, + "min": 0.0 + }, + "sleep_per_subscription_s": { + "max": 26.1, + "min": 16.3 + } + }, + "video_tags": { + "album": "{ %get_url_field( \"category\", \"Music Videos\" ) }", + "artist": "Rick Astley", + "genre": "Pop", + "premiered": "{ %elif( %contains_url_field( \"date\" ), %get_url_field( \"date\", upload_date_standardized ), %contains_url_field( \"year\" ), %concat( %get_url_field( \"date\", upload_year ), \"-01-01\" ), upload_date_standardized ) }", + "title": "{ %get_url_field( \"title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", + "year": "{ %int( %elif( %contains_url_field( \"date\" ), %slice( %get_url_field( \"date\", upload_date_standardized ), 0, 4 ), %contains_url_field( \"year\" ), %get_url_field( \"date\", upload_year ), upload_year ) ) }" + } +} \ No newline at end of file diff --git a/tests/resources/expected_json/music_video/inspect_sub_original.json b/tests/resources/expected_json/music_video/inspect_sub_original.json new file mode 100644 index 00000000..cdd52c9f --- /dev/null +++ b/tests/resources/expected_json/music_video/inspect_sub_original.json @@ -0,0 +1,235 @@ +{ + "download": [ + { + "download_reverse": false, + "url": "{ %array_apply(urls, %bilateral_url) }", + "webpage_url": "{modified_webpage_url}", + "ytdl_options": { + "playlist_items": "-1:0:-1" + } + }, + { + "include_sibling_metadata": "{include_sibling_metadata}", + "playlist_thumbnails": [ + { + "name": "{avatar_uncropped_thumbnail_file_name}", + "uid": "avatar_uncropped" + }, + { + "name": "{banner_uncropped_thumbnail_file_name}", + "uid": "banner_uncropped" + } + ], + "source_thumbnails": [ + { + "name": "{avatar_uncropped_thumbnail_file_name}", + "uid": "avatar_uncropped" + }, + { + "name": "{banner_uncropped_thumbnail_file_name}", + "uid": "banner_uncropped" + } + ], + "url": "{ %array_at(urls, 0) }", + "webpage_url": "{modified_webpage_url}" + }, + { + "include_sibling_metadata": "{include_sibling_metadata}", + "url": "{ %array_slice(urls, 1) }", + "webpage_url": "{modified_webpage_url}" + } + ], + "format": "(bv*[ext=mp4][vcodec~='^((he|a)vc|h26[45])']+ba[ext=m4a]) / (bv[ext=mp4]*+ba[ext=m4a]/b)", + "output_options": { + "file_name": "{music_video_file_name}.{ext}", + "info_json_name": "{music_video_file_name}.{info_json_ext}", + "maintain_download_archive": true, + "output_directory": "{music_video_directory}", + "thumbnail_name": "{music_video_file_name}.jpg" + }, + "overrides": { + "%bilateral_url": "{ \n %if(\n %and(\n enable_bilateral_scraping,\n subscription_has_download_archive,\n %is_bilateral_url($0)\n ),\n $0,\n \"\"\n )\n}", + "%contains_url_field": "{ %not( %is_null( %get_url_field( $0, null ) ) ) }", + "%flat_array__category_to_map_format": "{ \n %array_apply_fixed(\n %assert_then(\n %is_array( $1 ),\n $1,\n \"If using album categories, each category must map to an array\"\n ),\n $0,\n %flat_array__url_to_map_format \n )\n}", + "%flat_array__url_keyed_map_format": "{ { %map_get($0, \"url\"): $0 } }", + "%flat_array__url_to_map_format": "{\n %elif(\n %is_map($0),\n %map_extend( $0, { \"category\": $1 } ),\n %is_string($0),\n { \"url\": $0, \"category\": $1 },\n %throw(\"If using album categories, each URL must be either a string or map with metadata fields\")\n )\n}", + "%get_url_field": "{ %map_get( %map( %map_get( category_url_map, ytdl_sub_input_url, {} ) ), $0, $1 ) }", + "%get_url_i": "{ \n %map_get(\n %map( %array_at( category_url_array, %int( %sub($0, 1) ), {} ) ),\n \"url\",\n %array_at(subscription_array, %int( %sub($0, 1) ), null)\n )\n}", + "%is_bilateral_url": "{ %contains( $0, \"youtube.com/playlist\" ) }", + "avatar_uncropped_thumbnail_file_name": "", + "banner_uncropped_thumbnail_file_name": "", + "category_url_array": "{ %array_flatten( %map_apply( subscription_map, %flat_array__category_to_map_format ) ) }", + "category_url_map": "{\n %array_reduce(\n %array_apply( category_url_array, %flat_array__url_keyed_map_format ),\n %map_extend\n )\n}", + "enable_bilateral_scraping": true, + "enable_resolution_assert": true, + "enable_throttle_protection": true, + "file_title": "{title_sanitized_plex}", + "file_uid": "{uid_sanitized_plex}", + "include_sibling_metadata": false, + "modified_webpage_url": "{webpage_url}", + "music_video_album": "{ %get_url_field(\"category\", music_video_album_default) }", + "music_video_album_default": "Music Videos", + "music_video_artist": "{subscription_name}", + "music_video_date": "{ \n %elif(\n %contains_url_field(\"date\"),\n %get_url_field(\"date\", upload_date_standardized),\n\n %contains_url_field(\"year\"),\n %concat( %get_url_field(\"date\", upload_year), \"-01-01\"),\n\n upload_date_standardized\n )\n}", + "music_video_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmp3bmucwsg", + "music_video_file_name": "{music_video_artist_sanitized}/{music_video_title_sanitized}{music_video_file_name_suffix}", + "music_video_file_name_suffix": "", + "music_video_genre": "{subscription_indent_1}", + "music_video_genre_default": "ytdl-sub", + "music_video_title": "{ %get_url_field(\"title\", title) }", + "music_video_year": "{\n %int(%elif(\n %contains_url_field(\"date\"),\n %slice( %get_url_field(\"date\", upload_date_standardized), 0, 4 ),\n\n %contains_url_field(\"year\"),\n %get_url_field(\"date\", upload_year),\n\n upload_year\n ))\n}", + "resolution_assert": "{\n %if(\n %and(\n enable_resolution_assert,\n %ne( height, 0 ),\n %not(resolution_assert_is_ignored)\n ),\n %assert(\n %gte( height, resolution_assert_height_gte ),\n %concat(\n \"Entry \",\n title,\n \" downloaded at a low resolution (\",\n resolution_readable,\n \"), you've probably been throttled. \",\n \"Stopping further downloads, wait a few hours and try again. \",\n \"Disable using the override variable `enable_resolution_assert: False`.\"\n )\n ),\n \"false is no-op\"\n )\n}", + "resolution_assert_height_gte": 361, + "resolution_assert_ignore_titles": "{ [] }", + "resolution_assert_is_ignored": "{\n %print_if_true(\n %concat(title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\"),\n %contains_any(title, resolution_assert_ignore_titles)\n )\n}", + "resolution_assert_print": "{\n %print(\n %if(\n enable_resolution_assert,\n \"Resolution assert is enabled, will fail on low-quality video downloads and presume throttle. Disable using the override variable `enable_resolution_assert: False`\",\n \"Resolution assert is disabled. Use at your own risk!\"\n ),\n enable_resolution_assert,\n -1\n )\n}", + "resolution_readable": "{width}x{height}", + "subscription_array": "{%from_json('''[\"https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc\"]''')}", + "subscription_indent_1": "Pop", + "subscription_map": "{ {} }", + "subscription_value": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", + "subscription_value_1": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", + "url": "{subscription_value}", + "url10": "", + "url100": "", + "url11": "", + "url12": "", + "url13": "", + "url14": "", + "url15": "", + "url16": "", + "url17": "", + "url18": "", + "url19": "", + "url2": "", + "url20": "", + "url21": "", + "url22": "", + "url23": "", + "url24": "", + "url25": "", + "url26": "", + "url27": "", + "url28": "", + "url29": "", + "url3": "", + "url30": "", + "url31": "", + "url32": "", + "url33": "", + "url34": "", + "url35": "", + "url36": "", + "url37": "", + "url38": "", + "url39": "", + "url4": "", + "url40": "", + "url41": "", + "url42": "", + "url43": "", + "url44": "", + "url45": "", + "url46": "", + "url47": "", + "url48": "", + "url49": "", + "url5": "", + "url50": "", + "url51": "", + "url52": "", + "url53": "", + "url54": "", + "url55": "", + "url56": "", + "url57": "", + "url58": "", + "url59": "", + "url6": "", + "url60": "", + "url61": "", + "url62": "", + "url63": "", + "url64": "", + "url65": "", + "url66": "", + "url67": "", + "url68": "", + "url69": "", + "url7": "", + "url70": "", + "url71": "", + "url72": "", + "url73": "", + "url74": "", + "url75": "", + "url76": "", + "url77": "", + "url78": "", + "url79": "", + "url8": "", + "url80": "", + "url81": "", + "url82": "", + "url83": "", + "url84": "", + "url85": "", + "url86": "", + "url87": "", + "url88": "", + "url89": "", + "url9": "", + "url90": "", + "url91": "", + "url92": "", + "url93": "", + "url94": "", + "url95": "", + "url96": "", + "url97": "", + "url98": "", + "url99": "", + "urls": "{ %array_apply(%range(100, 1), %get_url_i) }" + }, + "preset": [ + "_base", + "_plex_base", + "_url_bilateral_overrides", + "_multi_url_bilateral_inner", + "_multi_url", + "_multi_url_bilateral", + "_throttle_protection", + "_url_categorized", + "_plex_video_base", + "_music_video_base", + "_music_video_tags", + "Plex Music Videos", + "__preset__" + ], + "throttle_protection": { + "enable": "{\n %print(\n %if(\n enable_throttle_protection,\n \"Throttle protection is enabled. Disable using the override variable `enable_throttle_protection: False`\",\n \"Throttle protection is disabled. Use at your own risk!\"\n ),\n enable_throttle_protection\n )\n}", + "sleep_per_download_s": { + "max": 28.4, + "min": 13.8 + }, + "sleep_per_request_s": { + "max": 0.75, + "min": 0.0 + }, + "sleep_per_subscription_s": { + "max": 26.1, + "min": 16.3 + } + }, + "video_tags": { + "album": "{music_video_album}", + "artist": "{music_video_artist}", + "genre": "{music_video_genre}", + "premiered": "{music_video_date}", + "title": "{music_video_title}", + "year": "{music_video_year}" + }, + "ytdl_options": { + "break_on_existing": true + } +} \ No newline at end of file diff --git a/tests/resources/expected_json/music_video/inspect_sub_resolve.json b/tests/resources/expected_json/music_video/inspect_sub_resolve.json new file mode 100644 index 00000000..f3594e9c --- /dev/null +++ b/tests/resources/expected_json/music_video/inspect_sub_resolve.json @@ -0,0 +1,314 @@ +{ + "download": [ + { + "download_reverse": true, + "include_sibling_metadata": false, + "playlist_thumbnails": [ + { + "name": "", + "uid": "avatar_uncropped" + }, + { + "name": "", + "uid": "banner_uncropped" + } + ], + "source_thumbnails": [ + { + "name": "", + "uid": "avatar_uncropped" + }, + { + "name": "", + "uid": "banner_uncropped" + } + ], + "url": [ + "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc" + ], + "variables": {}, + "webpage_url": "{ webpage_url }", + "ytdl_options": {} + } + ], + "format": "(bv*[ext=mp4][vcodec~='^((he|a)vc|h26[45])']+ba[ext=m4a]) / (bv[ext=mp4]*+ba[ext=m4a]/b)", + "output_options": { + "download_archive_name": ".ytdl-sub-Rick Astley-download-archive.json", + "file_name": "{ %concat( \"Rick Astley\", \"/\", %sanitize( %get_url_field( \"title\", title ) ), '' ) }.{ ext }", + "info_json_name": "{ %concat( \"Rick Astley\", \"/\", %sanitize( %get_url_field( \"title\", title ) ), '' ) }.{ info_json_ext }", + "keep_files_date_eval": "{ upload_date_standardized }", + "maintain_download_archive": true, + "output_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpstvsa5ot", + "preserve_mtime": false, + "thumbnail_name": "{ %concat( \"Rick Astley\", \"/\", %sanitize( %get_url_field( \"title\", title ) ), '' ) }.jpg" + }, + "overrides": { + "%bilateral_url": "{ %if( %and( enable_bilateral_scraping, subscription_has_download_archive, %is_bilateral_url( $0 ) ), $0, '' ) }", + "%contains_url_field": "{ %not( %is_null( %get_url_field( $0, '' ) ) ) }", + "%flat_array__category_to_map_format": "{ %array_apply_fixed( %assert_then( %is_array( $1 ), $1, \"If using album categories, each category must map to an array\" ), $0, %flat_array__url_to_map_format ) }", + "%flat_array__url_keyed_map_format": "{ { %map_get( $0, \"url\" ): $0 } }", + "%flat_array__url_to_map_format": "{ %elif( %is_map( $0 ), %map_extend( $0, { \"category\": $1 } ), %is_string( $0 ), { \"url\": $0, \"category\": $1 }, %throw( \"If using album categories, each URL must be either a string or map with metadata fields\" ) ) }", + "%get_url_field": "{ %map_get( %map( %map_get( category_url_map, ytdl_sub_input_url, { } ) ), $0, $1 ) }", + "%get_url_i": "{ %map_get( %map( %array_at( category_url_array, %int( %sub( $0, 1 ) ), { } ) ), \"url\", %array_at( subscription_array, %int( %sub( $0, 1 ) ), '' ) ) }", + "%is_bilateral_url": "{ %contains( $0, \"youtube.com/playlist\" ) }", + "avatar_uncropped_thumbnail_file_name": "", + "banner_uncropped_thumbnail_file_name": "", + "category_url_array": "{ [ ] }", + "category_url_map": "{ [ ] }", + "enable_bilateral_scraping": true, + "enable_resolution_assert": true, + "enable_throttle_protection": true, + "file_title": "{ title_sanitized_plex }", + "file_uid": "{ uid_sanitized_plex }", + "include_sibling_metadata": false, + "modified_webpage_url": "{ webpage_url }", + "music_video_album": "{ %get_url_field( \"category\", \"Music Videos\" ) }", + "music_video_album_default": "Music Videos", + "music_video_artist": "Rick Astley", + "music_video_date": "{ %elif( %contains_url_field( \"date\" ), %get_url_field( \"date\", upload_date_standardized ), %contains_url_field( \"year\" ), %concat( %get_url_field( \"date\", upload_year ), \"-01-01\" ), upload_date_standardized ) }", + "music_video_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpstvsa5ot", + "music_video_file_name": "Rick Astley/{ %sanitize( %get_url_field( \"title\", title ) ) }", + "music_video_file_name_suffix": "", + "music_video_genre": "Pop", + "music_video_genre_default": "ytdl-sub", + "music_video_title": "{ %get_url_field( \"title\", title ) }", + "music_video_year": "{ %int( %elif( %contains_url_field( \"date\" ), %slice( %get_url_field( \"date\", upload_date_standardized ), 0, 4 ), %contains_url_field( \"year\" ), %get_url_field( \"date\", upload_year ), upload_year ) ) }", + "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", + "resolution_assert_height_gte": 361, + "resolution_assert_ignore_titles": "{ [ ] }", + "resolution_assert_is_ignored": "{ %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, [ ] ) ) }", + "resolution_assert_print": true, + "resolution_readable": "{ width }x{ height }", + "subscription_array": [ + "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc" + ], + "subscription_indent_1": "Pop", + "subscription_map": {}, + "subscription_value": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", + "subscription_value_1": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", + "url": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", + "url10": "", + "url100": "", + "url11": "", + "url12": "", + "url13": "", + "url14": "", + "url15": "", + "url16": "", + "url17": "", + "url18": "", + "url19": "", + "url2": "", + "url20": "", + "url21": "", + "url22": "", + "url23": "", + "url24": "", + "url25": "", + "url26": "", + "url27": "", + "url28": "", + "url29": "", + "url3": "", + "url30": "", + "url31": "", + "url32": "", + "url33": "", + "url34": "", + "url35": "", + "url36": "", + "url37": "", + "url38": "", + "url39": "", + "url4": "", + "url40": "", + "url41": "", + "url42": "", + "url43": "", + "url44": "", + "url45": "", + "url46": "", + "url47": "", + "url48": "", + "url49": "", + "url5": "", + "url50": "", + "url51": "", + "url52": "", + "url53": "", + "url54": "", + "url55": "", + "url56": "", + "url57": "", + "url58": "", + "url59": "", + "url6": "", + "url60": "", + "url61": "", + "url62": "", + "url63": "", + "url64": "", + "url65": "", + "url66": "", + "url67": "", + "url68": "", + "url69": "", + "url7": "", + "url70": "", + "url71": "", + "url72": "", + "url73": "", + "url74": "", + "url75": "", + "url76": "", + "url77": "", + "url78": "", + "url79": "", + "url8": "", + "url80": "", + "url81": "", + "url82": "", + "url83": "", + "url84": "", + "url85": "", + "url86": "", + "url87": "", + "url88": "", + "url89": "", + "url9": "", + "url90": "", + "url91": "", + "url92": "", + "url93": "", + "url94": "", + "url95": "", + "url96": "", + "url97": "", + "url98": "", + "url99": "", + "urls": [ + "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "throttle_protection": { + "enable": true, + "sleep_per_download_s": { + "max": 28.4, + "min": 13.8 + }, + "sleep_per_request_s": { + "max": 0.75, + "min": 0.0 + }, + "sleep_per_subscription_s": { + "max": 26.1, + "min": 16.3 + } + }, + "video_tags": { + "album": "{ %get_url_field( \"category\", \"Music Videos\" ) }", + "artist": "Rick Astley", + "genre": "Pop", + "premiered": "{ %elif( %contains_url_field( \"date\" ), %get_url_field( \"date\", upload_date_standardized ), %contains_url_field( \"year\" ), %concat( %get_url_field( \"date\", upload_year ), \"-01-01\" ), upload_date_standardized ) }", + "title": "{ %get_url_field( \"title\", title ) }", + "year": "{ %int( %elif( %contains_url_field( \"date\" ), %slice( %get_url_field( \"date\", upload_date_standardized ), 0, 4 ), %contains_url_field( \"year\" ), %get_url_field( \"date\", upload_year ), upload_year ) ) }" + } +} \ No newline at end of file diff --git a/tests/resources/expected_json/music_video/inspect_variables.json b/tests/resources/expected_json/music_video/inspect_variables.json deleted file mode 100644 index 7e4bc383..00000000 --- a/tests/resources/expected_json/music_video/inspect_variables.json +++ /dev/null @@ -1,480 +0,0 @@ -{ - "avatar_uncropped_thumbnail_file_name": "", - "avatar_uncropped_thumbnail_file_name_sanitized": "", - "banner_uncropped_thumbnail_file_name": "", - "banner_uncropped_thumbnail_file_name_sanitized": "", - "category_url_array": "{ [ ] }", - "category_url_array_sanitized": "[]", - "category_url_map": "{ [ ] }", - "category_url_map_sanitized": "[]", - "channel": "{ %map_get_non_empty( entry_metadata, \"channel\", uploader ) }", - "channel_id": "{ %map_get_non_empty( entry_metadata, \"channel_id\", uploader_id ) }", - "channel_id_sanitized": "{ %sanitize( channel_id ) }", - "channel_sanitized": "{ %sanitize( channel ) }", - "chapters": "{ [ ] }", - "chapters_sanitized": "{ %sanitize( chapters ) }", - "comments": "{ [ ] }", - "comments_sanitized": "{ %sanitize( comments ) }", - "creator": "{ %map_get_non_empty( entry_metadata, \"creator\", channel ) }", - "creator_sanitized": "{ %sanitize( creator ) }", - "description": "{ %map_get_non_empty( entry_metadata, \"description\", '' ) }", - "description_sanitized": "{ %sanitize( description ) }", - "download_index": "{ %int( 1 ) }", - "download_index_padded6": "{ %pad_zero( download_index, 6 ) }", - "download_index_padded6_sanitized": "{ %sanitize( download_index_padded6 ) }", - "download_index_sanitized": "{ %sanitize( download_index ) }", - "duration": "{ %map_get_non_empty( entry_metadata, \"duration\", 0 ) }", - "duration_sanitized": "{ %sanitize( duration ) }", - "enable_bilateral_scraping": "{ %bool(True) }", - "enable_bilateral_scraping_sanitized": "true", - "enable_resolution_assert": "{ %bool(True) }", - "enable_resolution_assert_sanitized": "true", - "enable_throttle_protection": "{ %bool(True) }", - "enable_throttle_protection_sanitized": "true", - "entry_metadata": "{ { } }", - "entry_metadata_sanitized": "{ %sanitize( entry_metadata ) }", - "epoch": "{ %map_get( entry_metadata, \"epoch\" ) }", - "epoch_date": "{ %datetime_strftime( epoch, \"%Y%m%d\" ) }", - "epoch_date_sanitized": "{ %sanitize( epoch_date ) }", - "epoch_hour": "{ %datetime_strftime( epoch, \"%H\" ) }", - "epoch_hour_sanitized": "{ %sanitize( epoch_hour ) }", - "epoch_sanitized": "{ %sanitize( epoch ) }", - "ext": "{ %map_get( entry_metadata, \"ext\" ) }", - "ext_sanitized": "{ %sanitize( ext ) }", - "extractor": "{ %map_get( entry_metadata, \"extractor\" ) }", - "extractor_key": "{ %map_get( entry_metadata, \"extractor_key\" ) }", - "extractor_key_sanitized": "{ %sanitize( extractor_key ) }", - "extractor_sanitized": "{ %sanitize( extractor ) }", - "file_title": "{ title_sanitized_plex }", - "file_title_sanitized": "{ %sanitize( title_sanitized_plex ) }", - "file_uid": "{ uid_sanitized_plex }", - "file_uid_sanitized": "{ %sanitize( uid_sanitized_plex ) }", - "height": "{ %map_get_non_empty( entry_metadata, \"height\", 0 ) }", - "height_sanitized": "{ %sanitize( height ) }", - "ie_key": "{ %map_get_non_empty( entry_metadata, \"ie_key\", extractor_key ) }", - "ie_key_sanitized": "{ %sanitize( ie_key ) }", - "include_sibling_metadata": "{ %bool(False) }", - "include_sibling_metadata_sanitized": "false", - "info_json_ext": "info.json", - "info_json_ext_sanitized": "info.json", - "modified_webpage_url": "{ webpage_url }", - "modified_webpage_url_sanitized": "{ %sanitize( webpage_url ) }", - "music_video_album": "{ %get_url_field( \"category\", \"Music Videos\" ) }", - "music_video_album_default": "Music Videos", - "music_video_album_default_sanitized": "Music Videos", - "music_video_album_sanitized": "{ %sanitize( %get_url_field( \"category\", \"Music Videos\" ) ) }", - "music_video_artist": "Rick Astley", - "music_video_artist_sanitized": "Rick Astley", - "music_video_date": "{ %elif( %contains_url_field( \"date\" ), %get_url_field( \"date\", upload_date_standardized ), %contains_url_field( \"year\" ), %concat( %get_url_field( \"date\", upload_year ), \"-01-01\" ), upload_date_standardized ) }", - "music_video_date_sanitized": "{ %sanitize( %elif( %contains_url_field( \"date\" ), %get_url_field( \"date\", upload_date_standardized ), %contains_url_field( \"year\" ), %concat( %get_url_field( \"date\", upload_year ), \"-01-01\" ), upload_date_standardized ) ) }", - "music_video_directory": "tv_show_directory_path", - "music_video_directory_sanitized": "tv_show_directory_path", - "music_video_file_name": "Rick Astley/{ %sanitize( %get_url_field( \"title\", title ) ) }", - "music_video_file_name_sanitized": "{ %sanitize( %concat( \"Rick Astley\", \"/\", %sanitize( %get_url_field( \"title\", title ) ), '' ) ) }", - "music_video_file_name_suffix": "", - "music_video_file_name_suffix_sanitized": "", - "music_video_genre": "Pop", - "music_video_genre_default": "ytdl-sub", - "music_video_genre_default_sanitized": "ytdl-sub", - "music_video_genre_sanitized": "Pop", - "music_video_title": "{ %get_url_field( \"title\", title ) }", - "music_video_title_sanitized": "{ %sanitize( %get_url_field( \"title\", title ) ) }", - "music_video_year": "{ %int( %elif( %contains_url_field( \"date\" ), %slice( %get_url_field( \"date\", upload_date_standardized ), 0, 4 ), %contains_url_field( \"year\" ), %get_url_field( \"date\", upload_year ), upload_year ) ) }", - "music_video_year_sanitized": "{ %sanitize( %int( %elif( %contains_url_field( \"date\" ), %slice( %get_url_field( \"date\", upload_date_standardized ), 0, 4 ), %contains_url_field( \"year\" ), %get_url_field( \"date\", upload_year ), upload_year ) ) ) }", - "playlist_count": "{ %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ) }", - "playlist_count_sanitized": "{ %sanitize( playlist_count ) }", - "playlist_description": "{ %map_get_non_empty( playlist_metadata, \"description\", description ) }", - "playlist_description_sanitized": "{ %sanitize( playlist_description ) }", - "playlist_index": "{ %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ) }", - "playlist_index_padded": "{ %pad_zero( playlist_index, 2 ) }", - "playlist_index_padded6": "{ %pad_zero( playlist_index, 6 ) }", - "playlist_index_padded6_sanitized": "{ %sanitize( playlist_index_padded6 ) }", - "playlist_index_padded_sanitized": "{ %sanitize( playlist_index_padded ) }", - "playlist_index_reversed": "{ %sub( playlist_count, playlist_index, -1 ) }", - "playlist_index_reversed_padded": "{ %pad_zero( playlist_index_reversed, 2 ) }", - "playlist_index_reversed_padded6": "{ %pad_zero( playlist_index_reversed, 6 ) }", - "playlist_index_reversed_padded6_sanitized": "{ %sanitize( playlist_index_reversed_padded6 ) }", - "playlist_index_reversed_padded_sanitized": "{ %sanitize( playlist_index_reversed_padded ) }", - "playlist_index_reversed_sanitized": "{ %sanitize( playlist_index_reversed ) }", - "playlist_index_sanitized": "{ %sanitize( playlist_index ) }", - "playlist_max_upload_date": "{ %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) }", - "playlist_max_upload_date_sanitized": "{ %sanitize( playlist_max_upload_date ) }", - "playlist_max_upload_year": "{ %int( %map_get( %to_date_metadata( playlist_max_upload_date ), \"year\" ) ) }", - "playlist_max_upload_year_sanitized": "{ %sanitize( playlist_max_upload_year ) }", - "playlist_max_upload_year_truncated": "{ %int( %map_get( %to_date_metadata( playlist_max_upload_date ), \"year_truncated\" ) ) }", - "playlist_max_upload_year_truncated_sanitized": "{ %sanitize( playlist_max_upload_year_truncated ) }", - "playlist_metadata": "{ %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ) }", - "playlist_metadata_sanitized": "{ %sanitize( playlist_metadata ) }", - "playlist_title": "{ %map_get_non_empty( entry_metadata, \"playlist_title\", title ) }", - "playlist_title_sanitized": "{ %sanitize( playlist_title ) }", - "playlist_uid": "{ %map_get_non_empty( playlist_metadata, \"playlist_id\", uid ) }", - "playlist_uid_sanitized": "{ %sanitize( playlist_uid ) }", - "playlist_uploader": "{ %map_get_non_empty( playlist_metadata, \"uploader\", uploader ) }", - "playlist_uploader_id": "{ %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", uploader_id ) }", - "playlist_uploader_id_sanitized": "{ %sanitize( playlist_uploader_id ) }", - "playlist_uploader_sanitized": "{ %sanitize( playlist_uploader ) }", - "playlist_uploader_url": "{ %map_get_non_empty( playlist_metadata, \"uploader_url\", webpage_url ) }", - "playlist_uploader_url_sanitized": "{ %sanitize( playlist_uploader_url ) }", - "playlist_webpage_url": "{ %map_get_non_empty( playlist_metadata, \"webpage_url\", webpage_url ) }", - "playlist_webpage_url_sanitized": "{ %sanitize( playlist_webpage_url ) }", - "release_date": "{ %map_get_non_empty( entry_metadata, \"release_date\", upload_date ) }", - "release_date_sanitized": "{ %sanitize( release_date ) }", - "release_date_standardized": "{ %string( %map_get( %to_date_metadata( release_date ), \"date_standardized\" ) ) }", - "release_date_standardized_sanitized": "{ %sanitize( release_date_standardized ) }", - "release_day": "{ %int( %map_get( %to_date_metadata( release_date ), \"day\" ) ) }", - "release_day_of_year": "{ %int( %map_get( %to_date_metadata( release_date ), \"day_of_year\" ) ) }", - "release_day_of_year_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"day_of_year_padded\" ) ) }", - "release_day_of_year_padded_sanitized": "{ %sanitize( release_day_of_year_padded ) }", - "release_day_of_year_reversed": "{ %int( %map_get( %to_date_metadata( release_date ), \"day_of_year_reversed\" ) ) }", - "release_day_of_year_reversed_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"day_of_year_reversed_padded\" ) ) }", - "release_day_of_year_reversed_padded_sanitized": "{ %sanitize( release_day_of_year_reversed_padded ) }", - "release_day_of_year_reversed_sanitized": "{ %sanitize( release_day_of_year_reversed ) }", - "release_day_of_year_sanitized": "{ %sanitize( release_day_of_year ) }", - "release_day_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"day_padded\" ) ) }", - "release_day_padded_sanitized": "{ %sanitize( release_day_padded ) }", - "release_day_reversed": "{ %int( %map_get( %to_date_metadata( release_date ), \"day_reversed\" ) ) }", - "release_day_reversed_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"day_reversed_padded\" ) ) }", - "release_day_reversed_padded_sanitized": "{ %sanitize( release_day_reversed_padded ) }", - "release_day_reversed_sanitized": "{ %sanitize( release_day_reversed ) }", - "release_day_sanitized": "{ %sanitize( release_day ) }", - "release_month": "{ %int( %map_get( %to_date_metadata( release_date ), \"month\" ) ) }", - "release_month_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"month_padded\" ) ) }", - "release_month_padded_sanitized": "{ %sanitize( release_month_padded ) }", - "release_month_reversed": "{ %int( %map_get( %to_date_metadata( release_date ), \"month_reversed\" ) ) }", - "release_month_reversed_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"month_reversed_padded\" ) ) }", - "release_month_reversed_padded_sanitized": "{ %sanitize( release_month_reversed_padded ) }", - "release_month_reversed_sanitized": "{ %sanitize( release_month_reversed ) }", - "release_month_sanitized": "{ %sanitize( release_month ) }", - "release_year": "{ %int( %map_get( %to_date_metadata( release_date ), \"year\" ) ) }", - "release_year_sanitized": "{ %sanitize( release_year ) }", - "release_year_truncated": "{ %int( %map_get( %to_date_metadata( release_date ), \"year_truncated\" ) ) }", - "release_year_truncated_reversed": "{ %int( %map_get( %to_date_metadata( release_date ), \"year_truncated_reversed\" ) ) }", - "release_year_truncated_reversed_sanitized": "{ %sanitize( release_year_truncated_reversed ) }", - "release_year_truncated_sanitized": "{ %sanitize( release_year_truncated ) }", - "requested_subtitles": "{ { } }", - "requested_subtitles_sanitized": "{ %sanitize( requested_subtitles ) }", - "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", - "resolution_assert_height_gte": "{ %int(361) }", - "resolution_assert_height_gte_sanitized": "361", - "resolution_assert_ignore_titles": "{ [ ] }", - "resolution_assert_ignore_titles_sanitized": "[]", - "resolution_assert_is_ignored": "{ %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, resolution_assert_ignore_titles ) ) }", - "resolution_assert_is_ignored_sanitized": "{ %sanitize( %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, resolution_assert_ignore_titles ) ) ) }", - "resolution_assert_print": "{ %bool(True) }", - "resolution_assert_print_sanitized": "true", - "resolution_assert_sanitized": "{ %sanitize( %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) ) }", - "resolution_readable": "{ width }x{ height }", - "resolution_readable_sanitized": "{ %sanitize( %concat( width, \"x\", height ) ) }", - "sibling_metadata": "{ %map_get_non_empty( entry_metadata, \"sibling_metadata\", [ ] ) }", - "sibling_metadata_sanitized": "{ %sanitize( sibling_metadata ) }", - "source_count": "{ %map_get_non_empty( playlist_metadata, \"playlist_count\", 1 ) }", - "source_count_sanitized": "{ %sanitize( source_count ) }", - "source_description": "{ %map_get_non_empty( source_metadata, \"description\", playlist_description ) }", - "source_description_sanitized": "{ %sanitize( source_description ) }", - "source_index": "{ %map_get_non_empty( playlist_metadata, \"playlist_index\", 1 ) }", - "source_index_padded": "{ %pad_zero( source_index, 2 ) }", - "source_index_padded_sanitized": "{ %sanitize( source_index_padded ) }", - "source_index_sanitized": "{ %sanitize( source_index ) }", - "source_metadata": "{ %map_get_non_empty( entry_metadata, \"source_metadata\", { } ) }", - "source_metadata_sanitized": "{ %sanitize( source_metadata ) }", - "source_title": "{ %map_get_non_empty( source_metadata, \"title\", playlist_title ) }", - "source_title_sanitized": "{ %sanitize( source_title ) }", - "source_uid": "{ %map_get_non_empty( source_metadata, \"id\", playlist_uid ) }", - "source_uid_sanitized": "{ %sanitize( source_uid ) }", - "source_uploader": "{ %map_get_non_empty( source_metadata, \"uploader\", playlist_uploader ) }", - "source_uploader_id": "{ %map_get_non_empty( source_metadata, \"uploader_id\", playlist_uploader_id ) }", - "source_uploader_id_sanitized": "{ %sanitize( source_uploader_id ) }", - "source_uploader_sanitized": "{ %sanitize( source_uploader ) }", - "source_uploader_url": "{ %map_get_non_empty( source_metadata, \"uploader_url\", source_webpage_url ) }", - "source_uploader_url_sanitized": "{ %sanitize( source_uploader_url ) }", - "source_webpage_url": "{ %map_get_non_empty( source_metadata, \"webpage_url\", playlist_webpage_url ) }", - "source_webpage_url_sanitized": "{ %sanitize( source_webpage_url ) }", - "sponsorblock_chapters": "{ [ ] }", - "sponsorblock_chapters_sanitized": "{ %sanitize( sponsorblock_chapters ) }", - "subscription_array": "{ [ \"https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc\" ] }", - "subscription_array_sanitized": "[\uff02https\uff1a\u29f8\u29f8www.youtube.com\u29f8playlist\uff1flist=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc\uff02]", - "subscription_has_download_archive": "{ %bool(False) }", - "subscription_has_download_archive_sanitized": "false", - "subscription_indent_1": "Pop", - "subscription_indent_1_sanitized": "Pop", - "subscription_map": "{ { } }", - "subscription_map_sanitized": "{}", - "subscription_name": "Rick Astley", - "subscription_name_sanitized": "Rick Astley", - "subscription_value": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "subscription_value_1": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "subscription_value_1_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8playlist\uff1flist=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "subscription_value_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8playlist\uff1flist=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "thumbnail_ext": "jpg", - "thumbnail_ext_sanitized": "jpg", - "title": "{ %map_get_non_empty( entry_metadata, \"title\", uid ) }", - "title_sanitized": "{ %sanitize( title ) }", - "title_sanitized_plex": "{ %sanitize_plex_episode( title ) }", - "title_sanitized_plex_sanitized": "{ %sanitize( title_sanitized_plex ) }", - "uid": "{ %map_get( entry_metadata, \"id\" ) }", - "uid_sanitized": "{ %sanitize( uid ) }", - "uid_sanitized_plex": "{ %sanitize_plex_episode( uid ) }", - "uid_sanitized_plex_sanitized": "{ %sanitize( uid_sanitized_plex ) }", - "upload_date": "{ %map_get_non_empty( entry_metadata, \"upload_date\", epoch_date ) }", - "upload_date_index": "{ %int( 1 ) }", - "upload_date_index_padded": "{ %pad_zero( upload_date_index, 2 ) }", - "upload_date_index_padded_sanitized": "{ %sanitize( upload_date_index_padded ) }", - "upload_date_index_reversed": "{ %sub( 100, upload_date_index ) }", - "upload_date_index_reversed_padded": "{ %pad_zero( upload_date_index_reversed, 2 ) }", - "upload_date_index_reversed_padded_sanitized": "{ %sanitize( upload_date_index_reversed_padded ) }", - "upload_date_index_reversed_sanitized": "{ %sanitize( upload_date_index_reversed ) }", - "upload_date_index_sanitized": "{ %sanitize( upload_date_index ) }", - "upload_date_sanitized": "{ %sanitize( upload_date ) }", - "upload_date_standardized": "{ %string( %map_get( %to_date_metadata( upload_date ), \"date_standardized\" ) ) }", - "upload_date_standardized_sanitized": "{ %sanitize( upload_date_standardized ) }", - "upload_day": "{ %int( %map_get( %to_date_metadata( upload_date ), \"day\" ) ) }", - "upload_day_of_year": "{ %int( %map_get( %to_date_metadata( upload_date ), \"day_of_year\" ) ) }", - "upload_day_of_year_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"day_of_year_padded\" ) ) }", - "upload_day_of_year_padded_sanitized": "{ %sanitize( upload_day_of_year_padded ) }", - "upload_day_of_year_reversed": "{ %int( %map_get( %to_date_metadata( upload_date ), \"day_of_year_reversed\" ) ) }", - "upload_day_of_year_reversed_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"day_of_year_reversed_padded\" ) ) }", - "upload_day_of_year_reversed_padded_sanitized": "{ %sanitize( upload_day_of_year_reversed_padded ) }", - "upload_day_of_year_reversed_sanitized": "{ %sanitize( upload_day_of_year_reversed ) }", - "upload_day_of_year_sanitized": "{ %sanitize( upload_day_of_year ) }", - "upload_day_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"day_padded\" ) ) }", - "upload_day_padded_sanitized": "{ %sanitize( upload_day_padded ) }", - "upload_day_reversed": "{ %int( %map_get( %to_date_metadata( upload_date ), \"day_reversed\" ) ) }", - "upload_day_reversed_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"day_reversed_padded\" ) ) }", - "upload_day_reversed_padded_sanitized": "{ %sanitize( upload_day_reversed_padded ) }", - "upload_day_reversed_sanitized": "{ %sanitize( upload_day_reversed ) }", - "upload_day_sanitized": "{ %sanitize( upload_day ) }", - "upload_month": "{ %int( %map_get( %to_date_metadata( upload_date ), \"month\" ) ) }", - "upload_month_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"month_padded\" ) ) }", - "upload_month_padded_sanitized": "{ %sanitize( upload_month_padded ) }", - "upload_month_reversed": "{ %int( %map_get( %to_date_metadata( upload_date ), \"month_reversed\" ) ) }", - "upload_month_reversed_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"month_reversed_padded\" ) ) }", - "upload_month_reversed_padded_sanitized": "{ %sanitize( upload_month_reversed_padded ) }", - "upload_month_reversed_sanitized": "{ %sanitize( upload_month_reversed ) }", - "upload_month_sanitized": "{ %sanitize( upload_month ) }", - "upload_year": "{ %int( %map_get( %to_date_metadata( upload_date ), \"year\" ) ) }", - "upload_year_sanitized": "{ %sanitize( upload_year ) }", - "upload_year_truncated": "{ %int( %map_get( %to_date_metadata( upload_date ), \"year_truncated\" ) ) }", - "upload_year_truncated_reversed": "{ %int( %map_get( %to_date_metadata( upload_date ), \"year_truncated_reversed\" ) ) }", - "upload_year_truncated_reversed_sanitized": "{ %sanitize( upload_year_truncated_reversed ) }", - "upload_year_truncated_sanitized": "{ %sanitize( upload_year_truncated ) }", - "uploader": "{ %map_get_non_empty( entry_metadata, \"uploader\", uploader_id ) }", - "uploader_id": "{ %map_get_non_empty( entry_metadata, \"uploader_id\", uid ) }", - "uploader_id_sanitized": "{ %sanitize( uploader_id ) }", - "uploader_sanitized": "{ %sanitize( uploader ) }", - "uploader_url": "{ %map_get_non_empty( entry_metadata, \"uploader_url\", webpage_url ) }", - "uploader_url_sanitized": "{ %sanitize( uploader_url ) }", - "url": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "url10": "", - "url100": "", - "url100_sanitized": "", - "url10_sanitized": "", - "url11": "", - "url11_sanitized": "", - "url12": "", - "url12_sanitized": "", - "url13": "", - "url13_sanitized": "", - "url14": "", - "url14_sanitized": "", - "url15": "", - "url15_sanitized": "", - "url16": "", - "url16_sanitized": "", - "url17": "", - "url17_sanitized": "", - "url18": "", - "url18_sanitized": "", - "url19": "", - "url19_sanitized": "", - "url2": "", - "url20": "", - "url20_sanitized": "", - "url21": "", - "url21_sanitized": "", - "url22": "", - "url22_sanitized": "", - "url23": "", - "url23_sanitized": "", - "url24": "", - "url24_sanitized": "", - "url25": "", - "url25_sanitized": "", - "url26": "", - "url26_sanitized": "", - "url27": "", - "url27_sanitized": "", - "url28": "", - "url28_sanitized": "", - "url29": "", - "url29_sanitized": "", - "url2_sanitized": "", - "url3": "", - "url30": "", - "url30_sanitized": "", - "url31": "", - "url31_sanitized": "", - "url32": "", - "url32_sanitized": "", - "url33": "", - "url33_sanitized": "", - "url34": "", - "url34_sanitized": "", - "url35": "", - "url35_sanitized": "", - "url36": "", - "url36_sanitized": "", - "url37": "", - "url37_sanitized": "", - "url38": "", - "url38_sanitized": "", - "url39": "", - "url39_sanitized": "", - "url3_sanitized": "", - "url4": "", - "url40": "", - "url40_sanitized": "", - "url41": "", - "url41_sanitized": "", - "url42": "", - "url42_sanitized": "", - "url43": "", - "url43_sanitized": "", - "url44": "", - "url44_sanitized": "", - "url45": "", - "url45_sanitized": "", - "url46": "", - "url46_sanitized": "", - "url47": "", - "url47_sanitized": "", - "url48": "", - "url48_sanitized": "", - "url49": "", - "url49_sanitized": "", - "url4_sanitized": "", - "url5": "", - "url50": "", - "url50_sanitized": "", - "url51": "", - "url51_sanitized": "", - "url52": "", - "url52_sanitized": "", - "url53": "", - "url53_sanitized": "", - "url54": "", - "url54_sanitized": "", - "url55": "", - "url55_sanitized": "", - "url56": "", - "url56_sanitized": "", - "url57": "", - "url57_sanitized": "", - "url58": "", - "url58_sanitized": "", - "url59": "", - "url59_sanitized": "", - "url5_sanitized": "", - "url6": "", - "url60": "", - "url60_sanitized": "", - "url61": "", - "url61_sanitized": "", - "url62": "", - "url62_sanitized": "", - "url63": "", - "url63_sanitized": "", - "url64": "", - "url64_sanitized": "", - "url65": "", - "url65_sanitized": "", - "url66": "", - "url66_sanitized": "", - "url67": "", - "url67_sanitized": "", - "url68": "", - "url68_sanitized": "", - "url69": "", - "url69_sanitized": "", - "url6_sanitized": "", - "url7": "", - "url70": "", - "url70_sanitized": "", - "url71": "", - "url71_sanitized": "", - "url72": "", - "url72_sanitized": "", - "url73": "", - "url73_sanitized": "", - "url74": "", - "url74_sanitized": "", - "url75": "", - "url75_sanitized": "", - "url76": "", - "url76_sanitized": "", - "url77": "", - "url77_sanitized": "", - "url78": "", - "url78_sanitized": "", - "url79": "", - "url79_sanitized": "", - "url7_sanitized": "", - "url8": "", - "url80": "", - "url80_sanitized": "", - "url81": "", - "url81_sanitized": "", - "url82": "", - "url82_sanitized": "", - "url83": "", - "url83_sanitized": "", - "url84": "", - "url84_sanitized": "", - "url85": "", - "url85_sanitized": "", - "url86": "", - "url86_sanitized": "", - "url87": "", - "url87_sanitized": "", - "url88": "", - "url88_sanitized": "", - "url89": "", - "url89_sanitized": "", - "url8_sanitized": "", - "url9": "", - "url90": "", - "url90_sanitized": "", - "url91": "", - "url91_sanitized": "", - "url92": "", - "url92_sanitized": "", - "url93": "", - "url93_sanitized": "", - "url94": "", - "url94_sanitized": "", - "url95": "", - "url95_sanitized": "", - "url96": "", - "url96_sanitized": "", - "url97": "", - "url97_sanitized": "", - "url98": "", - "url98_sanitized": "", - "url99": "", - "url99_sanitized": "", - "url9_sanitized": "", - "url_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8playlist\uff1flist=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc", - "urls": "{ [ \"https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc\", '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '' ] }", - "urls_sanitized": "[\uff02https\uff1a\u29f8\u29f8www.youtube.com\u29f8playlist\uff1flist=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02, \uff02\uff02]", - "webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", - "webpage_url_sanitized": "{ %sanitize( webpage_url ) }", - "width": "{ %map_get_non_empty( entry_metadata, \"width\", 0 ) }", - "width_sanitized": "{ %sanitize( width ) }", - "ytdl_sub_entry_date_eval": "{ %string( upload_date_standardized ) }", - "ytdl_sub_entry_date_eval_sanitized": "{ %sanitize( ytdl_sub_entry_date_eval ) }", - "ytdl_sub_input_url": "{ %string( '' ) }", - "ytdl_sub_input_url_count": "{ %int( 0 ) }", - "ytdl_sub_input_url_count_sanitized": "{ %sanitize( ytdl_sub_input_url_count ) }", - "ytdl_sub_input_url_index": "{ %int( -1 ) }", - "ytdl_sub_input_url_index_sanitized": "{ %sanitize( ytdl_sub_input_url_index ) }", - "ytdl_sub_input_url_sanitized": "{ %sanitize( ytdl_sub_input_url ) }" -} \ No newline at end of file diff --git a/tests/resources/expected_json/tv_show/inspect_full_overrides.json b/tests/resources/expected_json/tv_show/inspect_full_overrides.json deleted file mode 100644 index 4d17acd4..00000000 --- a/tests/resources/expected_json/tv_show/inspect_full_overrides.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "assert_not_collection": "{ %bool(True) }", - "avatar_uncropped_thumbnail_file_name": "poster.jpg", - "banner_uncropped_thumbnail_file_name": "fanart.jpg", - "enable_bilateral_scraping": "{ %bool(True) }", - "enable_resolution_assert": "{ %bool(True) }", - "enable_throttle_protection": "{ %bool(True) }", - "episode_content_rating": "TV-14", - "episode_date_standardized": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", - "episode_file_name": "s{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }.e{ %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ) ), 6 ) } - { %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "episode_file_path": "{ %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ) }/{ %sanitize( %concat( \"s\", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ), \".e\", %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ) ), 6 ), \" - \", %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "episode_number": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ) }{ %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) }{ upload_date_index_padded }", - "episode_number_and_padded_": "{ [ %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ), 6 ] }", - "episode_number_padded": "{ %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ) ), 6 ) }", - "episode_plot": "{ %map_get( entry_metadata, \"webpage_url\" ) }\n\n{ %map_get_non_empty( entry_metadata, \"description\", '' ) }", - "episode_title": "{ %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) } - { %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) }", - "episode_year": "{ %slice( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ), 0, 4 ) }", - "file_title": "{ %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "file_uid": "{ %sanitize_plex_episode( %map_get( entry_metadata, \"id\" ) ) }", - "include_sibling_metadata": "{ %bool(False) }", - "modified_webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", - "only_recent_date_range": "2months", - "only_recent_max_files": "{ %int(30) }", - "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", - "resolution_assert_height_gte": "{ %int(361) }", - "resolution_assert_ignore_titles": "{ [ ] }", - "resolution_assert_is_ignored": "{ %print_if_true( %concat( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), resolution_assert_ignore_titles ) ) }", - "resolution_assert_print": "{ %bool(True) }", - "resolution_readable": "{ %map_get_non_empty( entry_metadata, \"width\", 0 ) }x{ %map_get_non_empty( entry_metadata, \"height\", 0 ) }", - "s01_name": "", - "s01_url": "", - "season_directory_name": "Season { %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }", - "season_number": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }", - "season_number_padded": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }", - "season_poster_file_name": "{ %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ) }/Season{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }.jpg", - "subscription_array": "{ [ \"https://www.youtube.com/@novapbs\" ] }", - "subscription_indent_1": "Documentaries", - "subscription_indent_2": "TV-14", - "subscription_value": "https://www.youtube.com/@novapbs", - "subscription_value_1": "https://www.youtube.com/@novapbs", - "thumbnail_file_name": "{ %concat( %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ), \"/\", %sanitize( %concat( \"s\", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ), \".e\", %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ) ), 6 ), \" - \", %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ) }-thumb.jpg", - "tv_show_by_date_episode_ordering": "upload-month-day", - "tv_show_by_date_ordering_pair_validation_": "{ [ %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ), 6 ] }", - "tv_show_by_date_season_ordering": "upload-year", - "tv_show_content_rating": "TV-14", - "tv_show_content_rating_default": "TV-14", - "tv_show_date_range_type": "upload_date", - "tv_show_directory": "tv_show_directory_path", - "tv_show_fanart_file_name": "fanart.jpg", - "tv_show_genre": "Documentaries", - "tv_show_genre_default": "ytdl-sub", - "tv_show_name": "NOVA PBS", - "tv_show_poster_file_name": "poster.jpg", - "url": "https://www.youtube.com/@novapbs", - "url10": "", - "url100": "", - "url11": "", - "url12": "", - "url13": "", - "url14": "", - "url15": "", - "url16": "", - "url17": "", - "url18": "", - "url19": "", - "url2": "", - "url20": "", - "url21": "", - "url22": "", - "url23": "", - "url24": "", - "url25": "", - "url26": "", - "url27": "", - "url28": "", - "url29": "", - "url3": "", - "url30": "", - "url31": "", - "url32": "", - "url33": "", - "url34": "", - "url35": "", - "url36": "", - "url37": "", - "url38": "", - "url39": "", - "url4": "", - "url40": "", - "url41": "", - "url42": "", - "url43": "", - "url44": "", - "url45": "", - "url46": "", - "url47": "", - "url48": "", - "url49": "", - "url5": "", - "url50": "", - "url51": "", - "url52": "", - "url53": "", - "url54": "", - "url55": "", - "url56": "", - "url57": "", - "url58": "", - "url59": "", - "url6": "", - "url60": "", - "url61": "", - "url62": "", - "url63": "", - "url64": "", - "url65": "", - "url66": "", - "url67": "", - "url68": "", - "url69": "", - "url7": "", - "url70": "", - "url71": "", - "url72": "", - "url73": "", - "url74": "", - "url75": "", - "url76": "", - "url77": "", - "url78": "", - "url79": "", - "url8": "", - "url80": "", - "url81": "", - "url82": "", - "url83": "", - "url84": "", - "url85": "", - "url86": "", - "url87": "", - "url88": "", - "url89": "", - "url9": "", - "url90": "", - "url91": "", - "url92": "", - "url93": "", - "url94": "", - "url95": "", - "url96": "", - "url97": "", - "url98": "", - "url99": "", - "urls": "{ [ \"https://www.youtube.com/@novapbs\" ] }" -} \ No newline at end of file diff --git a/tests/resources/expected_json/tv_show/inspect_full_variables.json b/tests/resources/expected_json/tv_show/inspect_full_variables.json deleted file mode 100644 index 4e22fa86..00000000 --- a/tests/resources/expected_json/tv_show/inspect_full_variables.json +++ /dev/null @@ -1,520 +0,0 @@ -{ - "assert_not_collection": "{ %bool(True) }", - "assert_not_collection_sanitized": "true", - "avatar_uncropped_thumbnail_file_name": "poster.jpg", - "avatar_uncropped_thumbnail_file_name_sanitized": "poster.jpg", - "banner_uncropped_thumbnail_file_name": "fanart.jpg", - "banner_uncropped_thumbnail_file_name_sanitized": "fanart.jpg", - "channel": "{ %map_get_non_empty( entry_metadata, \"channel\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "channel_id": "{ %map_get_non_empty( entry_metadata, \"channel_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "channel_id_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"channel_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "channel_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"channel\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "chapters": "{ [ ] }", - "chapters_sanitized": "[]", - "comments": "{ [ ] }", - "comments_sanitized": "[]", - "creator": "{ %map_get_non_empty( entry_metadata, \"creator\", %map_get_non_empty( entry_metadata, \"channel\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "creator_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"creator\", %map_get_non_empty( entry_metadata, \"channel\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ) }", - "description": "{ %map_get_non_empty( entry_metadata, \"description\", '' ) }", - "description_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"description\", '' ) ) }", - "download_index": "{ %int(1) }", - "download_index_padded6": "000001", - "download_index_padded6_sanitized": "000001", - "download_index_sanitized": "1", - "duration": "{ %map_get_non_empty( entry_metadata, \"duration\", 0 ) }", - "duration_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"duration\", 0 ) ) }", - "enable_bilateral_scraping": "{ %bool(True) }", - "enable_bilateral_scraping_sanitized": "true", - "enable_resolution_assert": "{ %bool(True) }", - "enable_resolution_assert_sanitized": "true", - "enable_throttle_protection": "{ %bool(True) }", - "enable_throttle_protection_sanitized": "true", - "entry_metadata": "{ { } }", - "entry_metadata_sanitized": "{ %sanitize( entry_metadata ) }", - "episode_content_rating": "TV-14", - "episode_content_rating_sanitized": "TV-14", - "episode_date_standardized": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", - "episode_date_standardized_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) ) }", - "episode_file_name": "s{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }.e{ %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ) ), 6 ) } - { %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "episode_file_name_sanitized": "{ %sanitize( %concat( \"s\", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ), \".e\", %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ) ), 6 ), \" - \", %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "episode_file_path": "{ %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ) }/{ %sanitize( %concat( \"s\", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ), \".e\", %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ) ), 6 ), \" - \", %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "episode_file_path_sanitized": "{ %sanitize( %concat( %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ), \"/\", %sanitize( %concat( \"s\", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ), \".e\", %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ) ), 6 ), \" - \", %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ) ) }", - "episode_number": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ) }{ %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) }{ upload_date_index_padded }", - "episode_number_and_padded_": "{ [ %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ), 6 ] }", - "episode_number_and_padded__sanitized": "{ %sanitize( [ %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ), 6 ] ) }", - "episode_number_padded": "{ %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ) ), 6 ) }", - "episode_number_padded_sanitized": "{ %sanitize( %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ) ), 6 ) ) }", - "episode_number_sanitized": "{ %sanitize( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ) ) }", - "episode_plot": "{ %map_get( entry_metadata, \"webpage_url\" ) }\n\n{ %map_get_non_empty( entry_metadata, \"description\", '' ) }", - "episode_plot_sanitized": "{ %sanitize( %concat( %map_get( entry_metadata, \"webpage_url\" ), \"\n\n\", %map_get_non_empty( entry_metadata, \"description\", '' ) ) ) }", - "episode_title": "{ %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) } - { %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) }", - "episode_title_sanitized": "{ %sanitize( %concat( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ), \" - \", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "episode_year": "{ %slice( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ), 0, 4 ) }", - "episode_year_sanitized": "{ %sanitize( %slice( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ), 0, 4 ) ) }", - "epoch": "{ %map_get( entry_metadata, \"epoch\" ) }", - "epoch_date": "{ %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) }", - "epoch_date_sanitized": "{ %sanitize( %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) }", - "epoch_hour": "{ %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%H\" ) }", - "epoch_hour_sanitized": "{ %sanitize( %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%H\" ) ) }", - "epoch_sanitized": "{ %sanitize( %map_get( entry_metadata, \"epoch\" ) ) }", - "ext": "{ %throw( \"Plugin variable ext has not been created yet\" ) }", - "ext_sanitized": "{ %sanitize( ext ) }", - "extractor": "{ %map_get( entry_metadata, \"extractor\" ) }", - "extractor_key": "{ %map_get( entry_metadata, \"extractor_key\" ) }", - "extractor_key_sanitized": "{ %sanitize( %map_get( entry_metadata, \"extractor_key\" ) ) }", - "extractor_sanitized": "{ %sanitize( %map_get( entry_metadata, \"extractor\" ) ) }", - "file_title": "{ %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "file_title_sanitized": "{ %sanitize( %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "file_uid": "{ %sanitize_plex_episode( %map_get( entry_metadata, \"id\" ) ) }", - "file_uid_sanitized": "{ %sanitize( %sanitize_plex_episode( %map_get( entry_metadata, \"id\" ) ) ) }", - "height": "{ %map_get_non_empty( entry_metadata, \"height\", 0 ) }", - "height_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"height\", 0 ) ) }", - "ie_key": "{ %map_get_non_empty( entry_metadata, \"ie_key\", %map_get( entry_metadata, \"extractor_key\" ) ) }", - "ie_key_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"ie_key\", %map_get( entry_metadata, \"extractor_key\" ) ) ) }", - "include_sibling_metadata": "{ %bool(False) }", - "include_sibling_metadata_sanitized": "false", - "info_json_ext": "info.json", - "info_json_ext_sanitized": "info.json", - "modified_webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", - "modified_webpage_url_sanitized": "{ %sanitize( %map_get( entry_metadata, \"webpage_url\" ) ) }", - "only_recent_date_range": "2months", - "only_recent_date_range_sanitized": "2months", - "only_recent_max_files": "{ %int(30) }", - "only_recent_max_files_sanitized": "30", - "playlist_count": "{ %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ) }", - "playlist_count_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ) ) }", - "playlist_description": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"description\", %map_get_non_empty( entry_metadata, \"description\", '' ) ) }", - "playlist_description_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"description\", %map_get_non_empty( entry_metadata, \"description\", '' ) ) ) }", - "playlist_index": "{ %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ) }", - "playlist_index_padded": "{ %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ) }", - "playlist_index_padded6": "{ %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 6 ) }", - "playlist_index_padded6_sanitized": "{ %sanitize( %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 6 ) ) }", - "playlist_index_padded_sanitized": "{ %sanitize( %pad_zero( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), 2 ) ) }", - "playlist_index_reversed": "{ %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ) }", - "playlist_index_reversed_padded": "{ %pad_zero( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ), 2 ) }", - "playlist_index_reversed_padded6": "{ %pad_zero( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ), 6 ) }", - "playlist_index_reversed_padded6_sanitized": "{ %sanitize( %pad_zero( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ), 6 ) ) }", - "playlist_index_reversed_padded_sanitized": "{ %sanitize( %pad_zero( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ), 2 ) ) }", - "playlist_index_reversed_sanitized": "{ %sanitize( %sub( %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ), %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ), -1 ) ) }", - "playlist_index_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ) ) }", - "playlist_max_upload_date": "{ %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) }", - "playlist_max_upload_date_sanitized": "{ %sanitize( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ) }", - "playlist_max_upload_year": "{ %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ) }", - "playlist_max_upload_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year\" ) ) ) }", - "playlist_max_upload_year_truncated": "{ %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year_truncated\" ) ) }", - "playlist_max_upload_year_truncated_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) ), \"year_truncated\" ) ) ) }", - "playlist_metadata": "{ %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ) }", - "playlist_metadata_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ) ) }", - "playlist_title": "{ %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "playlist_title_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "playlist_uid": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_id\", %map_get( entry_metadata, \"id\" ) ) }", - "playlist_uid_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "playlist_uploader": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "playlist_uploader_id": "{ %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "playlist_uploader_id_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "playlist_uploader_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "playlist_uploader_url": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader_url\", %map_get( entry_metadata, \"webpage_url\" ) ) }", - "playlist_uploader_url_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) }", - "playlist_webpage_url": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) }", - "playlist_webpage_url_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) }", - "release_date": "{ %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) }", - "release_date_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ) }", - "release_date_standardized": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"date_standardized\" ) ) }", - "release_date_standardized_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"date_standardized\" ) ) ) }", - "release_day": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day\" ) ) }", - "release_day_of_year": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year\" ) ) }", - "release_day_of_year_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_padded\" ) ) }", - "release_day_of_year_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_padded\" ) ) ) }", - "release_day_of_year_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_reversed\" ) ) }", - "release_day_of_year_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_reversed_padded\" ) ) }", - "release_day_of_year_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_reversed_padded\" ) ) ) }", - "release_day_of_year_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year_reversed\" ) ) ) }", - "release_day_of_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_of_year\" ) ) ) }", - "release_day_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_padded\" ) ) }", - "release_day_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_padded\" ) ) ) }", - "release_day_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_reversed\" ) ) }", - "release_day_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_reversed_padded\" ) ) }", - "release_day_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_reversed_padded\" ) ) ) }", - "release_day_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day_reversed\" ) ) ) }", - "release_day_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"day\" ) ) ) }", - "release_month": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month\" ) ) }", - "release_month_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_padded\" ) ) }", - "release_month_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_padded\" ) ) ) }", - "release_month_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_reversed\" ) ) }", - "release_month_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_reversed_padded\" ) ) }", - "release_month_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_reversed_padded\" ) ) ) }", - "release_month_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month_reversed\" ) ) ) }", - "release_month_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"month\" ) ) ) }", - "release_year": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year\" ) ) }", - "release_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year\" ) ) ) }", - "release_year_truncated": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year_truncated\" ) ) }", - "release_year_truncated_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year_truncated_reversed\" ) ) }", - "release_year_truncated_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year_truncated_reversed\" ) ) ) }", - "release_year_truncated_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"release_date\", %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) ), \"year_truncated\" ) ) ) }", - "requested_subtitles": "{ { } }", - "requested_subtitles_sanitized": "{}", - "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", - "resolution_assert_height_gte": "{ %int(361) }", - "resolution_assert_height_gte_sanitized": "361", - "resolution_assert_ignore_titles": "{ [ ] }", - "resolution_assert_ignore_titles_sanitized": "[]", - "resolution_assert_is_ignored": "{ %print_if_true( %concat( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), resolution_assert_ignore_titles ) ) }", - "resolution_assert_is_ignored_sanitized": "{ %sanitize( %print_if_true( %concat( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), resolution_assert_ignore_titles ) ) ) }", - "resolution_assert_print": "{ %bool(True) }", - "resolution_assert_print_sanitized": "true", - "resolution_assert_sanitized": "{ %sanitize( %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) ) }", - "resolution_readable": "{ %map_get_non_empty( entry_metadata, \"width\", 0 ) }x{ %map_get_non_empty( entry_metadata, \"height\", 0 ) }", - "resolution_readable_sanitized": "{ %sanitize( %concat( %map_get_non_empty( entry_metadata, \"width\", 0 ), \"x\", %map_get_non_empty( entry_metadata, \"height\", 0 ) ) ) }", - "s01_name": "", - "s01_name_sanitized": "", - "s01_url": "", - "s01_url_sanitized": "", - "season_directory_name": "Season { %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }", - "season_directory_name_sanitized": "{ %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ) }", - "season_number": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }", - "season_number_padded": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }", - "season_number_padded_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) }", - "season_number_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) }", - "season_poster_file_name": "{ %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ) }/Season{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }.jpg", - "season_poster_file_name_sanitized": "{ %sanitize( %concat( %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ), \"/Season\", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ), \".jpg\" ) ) }", - "sibling_metadata": "{ %map_get_non_empty( entry_metadata, \"sibling_metadata\", [ ] ) }", - "sibling_metadata_sanitized": "{ %sanitize( sibling_metadata ) }", - "source_count": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_count\", 1 ) }", - "source_count_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_count\", 1 ) ) }", - "source_description": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"description\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"description\", %map_get_non_empty( entry_metadata, \"description\", '' ) ) ) }", - "source_description_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"description\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"description\", %map_get_non_empty( entry_metadata, \"description\", '' ) ) ) ) }", - "source_index": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_index\", 1 ) }", - "source_index_padded": "{ %pad_zero( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_index\", 1 ), 2 ) }", - "source_index_padded_sanitized": "{ %sanitize( %pad_zero( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_index\", 1 ), 2 ) ) }", - "source_index_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_index\", 1 ) ) }", - "source_metadata": "{ %map_get_non_empty( entry_metadata, \"source_metadata\", { } ) }", - "source_metadata_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ) ) }", - "source_title": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"title\", %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "source_title_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"title\", %map_get_non_empty( entry_metadata, \"playlist_title\", %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "source_uid": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"id\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "source_uid_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"id\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"playlist_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "source_uploader": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "source_uploader_id": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader_id\", %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "source_uploader_id_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader_id\", %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", - "source_uploader_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"uploader\", %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ) }", - "source_uploader_url": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"webpage_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) ) }", - "source_uploader_url_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"uploader_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"webpage_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) ) ) }", - "source_webpage_url": "{ %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"webpage_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) }", - "source_webpage_url_sanitized": "{ %sanitize( %map_get_non_empty( %map_get_non_empty( entry_metadata, \"source_metadata\", { } ), \"webpage_url\", %map_get_non_empty( %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ), \"webpage_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) ) }", - "sponsorblock_chapters": "{ [ ] }", - "sponsorblock_chapters_sanitized": "[]", - "subscription_array": "{ [ \"https://www.youtube.com/@novapbs\" ] }", - "subscription_array_sanitized": "[\uff02https\uff1a\u29f8\u29f8www.youtube.com\u29f8@novapbs\uff02]", - "subscription_has_download_archive": "{ %bool(False) }", - "subscription_has_download_archive_sanitized": "false", - "subscription_indent_1": "Documentaries", - "subscription_indent_1_sanitized": "Documentaries", - "subscription_indent_2": "TV-14", - "subscription_indent_2_sanitized": "TV-14", - "subscription_name": "NOVA PBS", - "subscription_name_sanitized": "NOVA PBS", - "subscription_value": "https://www.youtube.com/@novapbs", - "subscription_value_1": "https://www.youtube.com/@novapbs", - "subscription_value_1_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8@novapbs", - "subscription_value_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8@novapbs", - "thumbnail_ext": "jpg", - "thumbnail_ext_sanitized": "jpg", - "thumbnail_file_name": "{ %concat( %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ), \"/\", %sanitize( %concat( \"s\", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ), \".e\", %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ) ), 6 ), \" - \", %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ) }-thumb.jpg", - "thumbnail_file_name_sanitized": "{ %sanitize( %concat( %concat( %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ), \"/\", %sanitize( %concat( \"s\", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ), \".e\", %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ) ), 6 ), \" - \", %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ), \"-thumb.jpg\" ) ) }", - "title": "{ %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) }", - "title_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "title_sanitized_plex": "{ %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", - "title_sanitized_plex_sanitized": "{ %sanitize( %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "tv_show_by_date_episode_ordering": "upload-month-day", - "tv_show_by_date_episode_ordering_sanitized": "upload-month-day", - "tv_show_by_date_ordering_pair_validation_": "{ [ %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ), 6 ] }", - "tv_show_by_date_ordering_pair_validation__sanitized": "{ %sanitize( [ %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), upload_date_index_padded ), 6 ] ) }", - "tv_show_by_date_season_ordering": "upload-year", - "tv_show_by_date_season_ordering_sanitized": "upload-year", - "tv_show_content_rating": "TV-14", - "tv_show_content_rating_default": "TV-14", - "tv_show_content_rating_default_sanitized": "TV-14", - "tv_show_content_rating_sanitized": "TV-14", - "tv_show_date_range_type": "upload_date", - "tv_show_date_range_type_sanitized": "upload_date", - "tv_show_directory": "tv_show_directory_path", - "tv_show_directory_sanitized": "tv_show_directory_path", - "tv_show_fanart_file_name": "fanart.jpg", - "tv_show_fanart_file_name_sanitized": "fanart.jpg", - "tv_show_genre": "Documentaries", - "tv_show_genre_default": "ytdl-sub", - "tv_show_genre_default_sanitized": "ytdl-sub", - "tv_show_genre_sanitized": "Documentaries", - "tv_show_name": "NOVA PBS", - "tv_show_name_sanitized": "NOVA PBS", - "tv_show_poster_file_name": "poster.jpg", - "tv_show_poster_file_name_sanitized": "poster.jpg", - "uid": "{ %map_get( entry_metadata, \"id\" ) }", - "uid_sanitized": "{ %sanitize( %map_get( entry_metadata, \"id\" ) ) }", - "uid_sanitized_plex": "{ %sanitize_plex_episode( %map_get( entry_metadata, \"id\" ) ) }", - "uid_sanitized_plex_sanitized": "{ %sanitize( %sanitize_plex_episode( %map_get( entry_metadata, \"id\" ) ) ) }", - "upload_date": "{ %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) }", - "upload_date_index": "{ %int(1) }", - "upload_date_index_padded": "01", - "upload_date_index_padded_sanitized": "01", - "upload_date_index_reversed": "{ %int(99) }", - "upload_date_index_reversed_padded": "99", - "upload_date_index_reversed_padded_sanitized": "99", - "upload_date_index_reversed_sanitized": "99", - "upload_date_index_sanitized": "1", - "upload_date_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ) }", - "upload_date_standardized": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", - "upload_date_standardized_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) ) }", - "upload_day": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day\" ) ) }", - "upload_day_of_year": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year\" ) ) }", - "upload_day_of_year_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_padded\" ) ) }", - "upload_day_of_year_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_padded\" ) ) ) }", - "upload_day_of_year_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_reversed\" ) ) }", - "upload_day_of_year_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_reversed_padded\" ) ) }", - "upload_day_of_year_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_reversed_padded\" ) ) ) }", - "upload_day_of_year_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year_reversed\" ) ) ) }", - "upload_day_of_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_of_year\" ) ) ) }", - "upload_day_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ) }", - "upload_day_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ) ) }", - "upload_day_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_reversed\" ) ) }", - "upload_day_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_reversed_padded\" ) ) }", - "upload_day_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_reversed_padded\" ) ) ) }", - "upload_day_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_reversed\" ) ) ) }", - "upload_day_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day\" ) ) ) }", - "upload_month": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ) }", - "upload_month_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_padded\" ) ) }", - "upload_month_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_padded\" ) ) ) }", - "upload_month_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_reversed\" ) ) }", - "upload_month_reversed_padded": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_reversed_padded\" ) ) }", - "upload_month_reversed_padded_sanitized": "{ %sanitize( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_reversed_padded\" ) ) ) }", - "upload_month_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month_reversed\" ) ) ) }", - "upload_month_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ) ) }", - "upload_year": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }", - "upload_year_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) }", - "upload_year_truncated": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year_truncated\" ) ) }", - "upload_year_truncated_reversed": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year_truncated_reversed\" ) ) }", - "upload_year_truncated_reversed_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year_truncated_reversed\" ) ) ) }", - "upload_year_truncated_sanitized": "{ %sanitize( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year_truncated\" ) ) ) }", - "uploader": "{ %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "uploader_id": "{ %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) }", - "uploader_id_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) }", - "uploader_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"uploader\", %map_get_non_empty( entry_metadata, \"uploader_id\", %map_get( entry_metadata, \"id\" ) ) ) ) }", - "uploader_url": "{ %map_get_non_empty( entry_metadata, \"uploader_url\", %map_get( entry_metadata, \"webpage_url\" ) ) }", - "uploader_url_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"uploader_url\", %map_get( entry_metadata, \"webpage_url\" ) ) ) }", - "url": "https://www.youtube.com/@novapbs", - "url10": "", - "url100": "", - "url100_sanitized": "", - "url10_sanitized": "", - "url11": "", - "url11_sanitized": "", - "url12": "", - "url12_sanitized": "", - "url13": "", - "url13_sanitized": "", - "url14": "", - "url14_sanitized": "", - "url15": "", - "url15_sanitized": "", - "url16": "", - "url16_sanitized": "", - "url17": "", - "url17_sanitized": "", - "url18": "", - "url18_sanitized": "", - "url19": "", - "url19_sanitized": "", - "url2": "", - "url20": "", - "url20_sanitized": "", - "url21": "", - "url21_sanitized": "", - "url22": "", - "url22_sanitized": "", - "url23": "", - "url23_sanitized": "", - "url24": "", - "url24_sanitized": "", - "url25": "", - "url25_sanitized": "", - "url26": "", - "url26_sanitized": "", - "url27": "", - "url27_sanitized": "", - "url28": "", - "url28_sanitized": "", - "url29": "", - "url29_sanitized": "", - "url2_sanitized": "", - "url3": "", - "url30": "", - "url30_sanitized": "", - "url31": "", - "url31_sanitized": "", - "url32": "", - "url32_sanitized": "", - "url33": "", - "url33_sanitized": "", - "url34": "", - "url34_sanitized": "", - "url35": "", - "url35_sanitized": "", - "url36": "", - "url36_sanitized": "", - "url37": "", - "url37_sanitized": "", - "url38": "", - "url38_sanitized": "", - "url39": "", - "url39_sanitized": "", - "url3_sanitized": "", - "url4": "", - "url40": "", - "url40_sanitized": "", - "url41": "", - "url41_sanitized": "", - "url42": "", - "url42_sanitized": "", - "url43": "", - "url43_sanitized": "", - "url44": "", - "url44_sanitized": "", - "url45": "", - "url45_sanitized": "", - "url46": "", - "url46_sanitized": "", - "url47": "", - "url47_sanitized": "", - "url48": "", - "url48_sanitized": "", - "url49": "", - "url49_sanitized": "", - "url4_sanitized": "", - "url5": "", - "url50": "", - "url50_sanitized": "", - "url51": "", - "url51_sanitized": "", - "url52": "", - "url52_sanitized": "", - "url53": "", - "url53_sanitized": "", - "url54": "", - "url54_sanitized": "", - "url55": "", - "url55_sanitized": "", - "url56": "", - "url56_sanitized": "", - "url57": "", - "url57_sanitized": "", - "url58": "", - "url58_sanitized": "", - "url59": "", - "url59_sanitized": "", - "url5_sanitized": "", - "url6": "", - "url60": "", - "url60_sanitized": "", - "url61": "", - "url61_sanitized": "", - "url62": "", - "url62_sanitized": "", - "url63": "", - "url63_sanitized": "", - "url64": "", - "url64_sanitized": "", - "url65": "", - "url65_sanitized": "", - "url66": "", - "url66_sanitized": "", - "url67": "", - "url67_sanitized": "", - "url68": "", - "url68_sanitized": "", - "url69": "", - "url69_sanitized": "", - "url6_sanitized": "", - "url7": "", - "url70": "", - "url70_sanitized": "", - "url71": "", - "url71_sanitized": "", - "url72": "", - "url72_sanitized": "", - "url73": "", - "url73_sanitized": "", - "url74": "", - "url74_sanitized": "", - "url75": "", - "url75_sanitized": "", - "url76": "", - "url76_sanitized": "", - "url77": "", - "url77_sanitized": "", - "url78": "", - "url78_sanitized": "", - "url79": "", - "url79_sanitized": "", - "url7_sanitized": "", - "url8": "", - "url80": "", - "url80_sanitized": "", - "url81": "", - "url81_sanitized": "", - "url82": "", - "url82_sanitized": "", - "url83": "", - "url83_sanitized": "", - "url84": "", - "url84_sanitized": "", - "url85": "", - "url85_sanitized": "", - "url86": "", - "url86_sanitized": "", - "url87": "", - "url87_sanitized": "", - "url88": "", - "url88_sanitized": "", - "url89": "", - "url89_sanitized": "", - "url8_sanitized": "", - "url9": "", - "url90": "", - "url90_sanitized": "", - "url91": "", - "url91_sanitized": "", - "url92": "", - "url92_sanitized": "", - "url93": "", - "url93_sanitized": "", - "url94": "", - "url94_sanitized": "", - "url95": "", - "url95_sanitized": "", - "url96": "", - "url96_sanitized": "", - "url97": "", - "url97_sanitized": "", - "url98": "", - "url98_sanitized": "", - "url99": "", - "url99_sanitized": "", - "url9_sanitized": "", - "url_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8@novapbs", - "urls": "{ [ \"https://www.youtube.com/@novapbs\" ] }", - "urls_sanitized": "[\uff02https\uff1a\u29f8\u29f8www.youtube.com\u29f8@novapbs\uff02]", - "webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", - "webpage_url_sanitized": "{ %sanitize( %map_get( entry_metadata, \"webpage_url\" ) ) }", - "width": "{ %map_get_non_empty( entry_metadata, \"width\", 0 ) }", - "width_sanitized": "{ %sanitize( %map_get_non_empty( entry_metadata, \"width\", 0 ) ) }", - "ytdl_sub_chapters_from_comments": "{ %throw( \"Plugin variable ytdl_sub_chapters_from_comments has not been created yet\" ) }", - "ytdl_sub_chapters_from_comments_sanitized": "{ %sanitize( ytdl_sub_chapters_from_comments ) }", - "ytdl_sub_entry_date_eval": "{ %string( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) ) }", - "ytdl_sub_entry_date_eval_sanitized": "{ %sanitize( %string( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) ) ) }", - "ytdl_sub_input_url": "", - "ytdl_sub_input_url_count": "{ %int(0) }", - "ytdl_sub_input_url_count_sanitized": "0", - "ytdl_sub_input_url_index": "{ %int(-1) }", - "ytdl_sub_input_url_index_sanitized": "-1", - "ytdl_sub_input_url_sanitized": "" -} \ No newline at end of file diff --git a/tests/resources/expected_json/tv_show/inspect_overrides.json b/tests/resources/expected_json/tv_show/inspect_overrides.json deleted file mode 100644 index 93916b4d..00000000 --- a/tests/resources/expected_json/tv_show/inspect_overrides.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "assert_not_collection": "{ %bool(True) }", - "avatar_uncropped_thumbnail_file_name": "poster.jpg", - "banner_uncropped_thumbnail_file_name": "fanart.jpg", - "enable_bilateral_scraping": "{ %bool(True) }", - "enable_resolution_assert": "{ %bool(True) }", - "enable_throttle_protection": "{ %bool(True) }", - "episode_content_rating": "TV-14", - "episode_date_standardized": "{ upload_date_standardized }", - "episode_file_name": "s{ upload_year }.e{ %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ) } - { title_sanitized_plex }", - "episode_file_path": "{ %sanitize( %concat( \"Season \", upload_year ) ) }/{ %sanitize( %concat( \"s\", upload_year, \".e\", %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ), \" - \", title_sanitized_plex ) ) }", - "episode_number": "{ upload_month }{ upload_day_padded }{ upload_date_index_padded }", - "episode_number_and_padded_": "{ [ %concat( upload_month, upload_day_padded, upload_date_index_padded ), 6 ] }", - "episode_number_padded": "{ %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ) }", - "episode_plot": "{ webpage_url }\n\n{ description }", - "episode_title": "{ upload_date_standardized } - { title }", - "episode_year": "{ %slice( upload_date_standardized, 0, 4 ) }", - "file_title": "{ title_sanitized_plex }", - "file_uid": "{ uid_sanitized_plex }", - "include_sibling_metadata": "{ %bool(False) }", - "modified_webpage_url": "{ webpage_url }", - "only_recent_date_range": "2months", - "only_recent_max_files": "{ %int(30) }", - "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", - "resolution_assert_height_gte": "{ %int(361) }", - "resolution_assert_ignore_titles": "{ [ ] }", - "resolution_assert_is_ignored": "{ %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, resolution_assert_ignore_titles ) ) }", - "resolution_assert_print": "{ %bool(True) }", - "resolution_readable": "{ width }x{ height }", - "s01_name": "", - "s01_url": "", - "season_directory_name": "Season { upload_year }", - "season_number": "{ upload_year }", - "season_number_padded": "{ upload_year }", - "season_poster_file_name": "{ %sanitize( %concat( \"Season \", upload_year ) ) }/Season{ upload_year }.jpg", - "subscription_array": "{ [ \"https://www.youtube.com/@novapbs\" ] }", - "subscription_indent_1": "Documentaries", - "subscription_indent_2": "TV-14", - "subscription_value": "https://www.youtube.com/@novapbs", - "subscription_value_1": "https://www.youtube.com/@novapbs", - "thumbnail_file_name": "{ %concat( %sanitize( %concat( \"Season \", upload_year ) ), \"/\", %sanitize( %concat( \"s\", upload_year, \".e\", %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ), \" - \", title_sanitized_plex ) ) ) }-thumb.jpg", - "tv_show_by_date_episode_ordering": "upload-month-day", - "tv_show_by_date_ordering_pair_validation_": "{ [ %concat( upload_month, upload_day_padded, upload_date_index_padded ), 6 ] }", - "tv_show_by_date_season_ordering": "upload-year", - "tv_show_content_rating": "TV-14", - "tv_show_content_rating_default": "TV-14", - "tv_show_date_range_type": "upload_date", - "tv_show_directory": "tv_show_directory_path", - "tv_show_fanart_file_name": "fanart.jpg", - "tv_show_genre": "Documentaries", - "tv_show_genre_default": "ytdl-sub", - "tv_show_name": "NOVA PBS", - "tv_show_poster_file_name": "poster.jpg", - "url": "https://www.youtube.com/@novapbs", - "url10": "", - "url100": "", - "url11": "", - "url12": "", - "url13": "", - "url14": "", - "url15": "", - "url16": "", - "url17": "", - "url18": "", - "url19": "", - "url2": "", - "url20": "", - "url21": "", - "url22": "", - "url23": "", - "url24": "", - "url25": "", - "url26": "", - "url27": "", - "url28": "", - "url29": "", - "url3": "", - "url30": "", - "url31": "", - "url32": "", - "url33": "", - "url34": "", - "url35": "", - "url36": "", - "url37": "", - "url38": "", - "url39": "", - "url4": "", - "url40": "", - "url41": "", - "url42": "", - "url43": "", - "url44": "", - "url45": "", - "url46": "", - "url47": "", - "url48": "", - "url49": "", - "url5": "", - "url50": "", - "url51": "", - "url52": "", - "url53": "", - "url54": "", - "url55": "", - "url56": "", - "url57": "", - "url58": "", - "url59": "", - "url6": "", - "url60": "", - "url61": "", - "url62": "", - "url63": "", - "url64": "", - "url65": "", - "url66": "", - "url67": "", - "url68": "", - "url69": "", - "url7": "", - "url70": "", - "url71": "", - "url72": "", - "url73": "", - "url74": "", - "url75": "", - "url76": "", - "url77": "", - "url78": "", - "url79": "", - "url8": "", - "url80": "", - "url81": "", - "url82": "", - "url83": "", - "url84": "", - "url85": "", - "url86": "", - "url87": "", - "url88": "", - "url89": "", - "url9": "", - "url90": "", - "url91": "", - "url92": "", - "url93": "", - "url94": "", - "url95": "", - "url96": "", - "url97": "", - "url98": "", - "url99": "", - "urls": "{ [ \"https://www.youtube.com/@novapbs\" ] }" -} \ No newline at end of file diff --git a/tests/resources/expected_json/tv_show/inspect_sub_fill.json b/tests/resources/expected_json/tv_show/inspect_sub_fill.json new file mode 100644 index 00000000..6d1a8662 --- /dev/null +++ b/tests/resources/expected_json/tv_show/inspect_sub_fill.json @@ -0,0 +1,250 @@ +{ + "chapters": { + "allow_chapters_from_comments": false, + "embed_chapters": true, + "enable": true, + "force_key_frames": false + }, + "date_range": { + "breaks": true, + "enable": true, + "type": "upload_date" + }, + "download": [ + { + "download_reverse": true, + "include_sibling_metadata": false, + "playlist_thumbnails": [ + { + "name": "poster.jpg", + "uid": "avatar_uncropped" + }, + { + "name": "fanart.jpg", + "uid": "banner_uncropped" + } + ], + "source_thumbnails": [ + { + "name": "poster.jpg", + "uid": "avatar_uncropped" + }, + { + "name": "fanart.jpg", + "uid": "banner_uncropped" + } + ], + "url": [ + "https://www.youtube.com/@novapbs" + ], + "variables": {}, + "webpage_url": "{ modified_webpage_url }", + "ytdl_options": {} + } + ], + "file_convert": { + "convert_to": "mp4", + "convert_with": "yt-dlp", + "enable": true + }, + "format": "(bv*[ext=mp4][vcodec~='^((he|a)vc|h26[45])']+ba[ext=m4a]) / (bv[ext=mp4]*+ba[ext=m4a]/b)", + "output_options": { + "download_archive_name": ".ytdl-sub-NOVA PBS-download-archive.json", + "file_name": "{ episode_file_path }.{ ext }", + "info_json_name": "{ episode_file_path }.{ info_json_ext }", + "keep_files_date_eval": "{ episode_date_standardized }", + "maintain_download_archive": true, + "output_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpc_p6gjjw/NOVA PBS", + "preserve_mtime": false, + "thumbnail_name": "{ thumbnail_file_name }" + }, + "overrides": { + "%bilateral_url": "{ %if( %and( enable_bilateral_scraping, subscription_has_download_archive, %is_bilateral_url( $0 ) ), $0, '' ) }", + "%episode_ordering_": "{ %eq( %lower( tv_show_by_date_episode_ordering ), $0 ) }", + "%is_bilateral_url": "{ %contains( $0, \"youtube.com/playlist\" ) }", + "%ordering_pair_eq": "{ %eq( [ tv_show_by_date_season_ordering, tv_show_by_date_episode_ordering ], [ $0, $1 ] ) }", + "%season_ordering_": "{ %eq( %lower( tv_show_by_date_season_ordering ), $0 ) }", + "assert_not_collection": true, + "avatar_uncropped_thumbnail_file_name": "poster.jpg", + "banner_uncropped_thumbnail_file_name": "fanart.jpg", + "enable_bilateral_scraping": true, + "enable_resolution_assert": true, + "enable_throttle_protection": true, + "episode_content_rating": "TV-14", + "episode_date_standardized": "{ upload_date_standardized }", + "episode_file_name": "s{ upload_year }.e{ %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ) } - { title_sanitized_plex }", + "episode_file_path": "{ %sanitize( %concat( \"Season \", upload_year ) ) }/{ %sanitize( %concat( \"s\", upload_year, \".e\", %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ), \" - \", title_sanitized_plex ) ) }", + "episode_number": "{ upload_month }{ upload_day_padded }{ upload_date_index_padded }", + "episode_number_and_padded_": "{ [ %concat( upload_month, upload_day_padded, upload_date_index_padded ), 6 ] }", + "episode_number_padded": "{ %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ) }", + "episode_plot": "{ webpage_url }\n\n{ description }", + "episode_title": "{ upload_date_standardized } - { title }", + "episode_year": "{ %slice( upload_date_standardized, 0, 4 ) }", + "file_title": "{ title_sanitized_plex }", + "file_uid": "{ uid_sanitized_plex }", + "include_sibling_metadata": false, + "modified_webpage_url": "{ webpage_url }", + "only_recent_date_range": "2months", + "only_recent_max_files": 30, + "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", + "resolution_assert_height_gte": 361, + "resolution_assert_ignore_titles": "{ [ ] }", + "resolution_assert_is_ignored": "{ %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, [ ] ) ) }", + "resolution_assert_print": true, + "resolution_readable": "{ width }x{ height }", + "s01_name": "", + "s01_url": "", + "season_directory_name": "Season { upload_year }", + "season_number": "{ upload_year }", + "season_number_padded": "{ upload_year }", + "season_poster_file_name": "{ %sanitize( %concat( \"Season \", upload_year ) ) }/Season{ upload_year }.jpg", + "subscription_array": [ + "https://www.youtube.com/@novapbs" + ], + "subscription_indent_1": "Documentaries", + "subscription_indent_2": "TV-14", + "subscription_value": "https://www.youtube.com/@novapbs", + "subscription_value_1": "https://www.youtube.com/@novapbs", + "thumbnail_file_name": "{ %concat( %sanitize( %concat( \"Season \", upload_year ) ), \"/\", %sanitize( %concat( \"s\", upload_year, \".e\", %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ), \" - \", title_sanitized_plex ) ) ) }-thumb.jpg", + "tv_show_by_date_episode_ordering": "upload-month-day", + "tv_show_by_date_ordering_pair_validation_": "{ [ %concat( upload_month, upload_day_padded, upload_date_index_padded ), 6 ] }", + "tv_show_by_date_season_ordering": "upload-year", + "tv_show_content_rating": "TV-14", + "tv_show_content_rating_default": "TV-14", + "tv_show_date_range_type": "upload_date", + "tv_show_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpc_p6gjjw", + "tv_show_fanart_file_name": "fanart.jpg", + "tv_show_genre": "Documentaries", + "tv_show_genre_default": "ytdl-sub", + "tv_show_name": "NOVA PBS", + "tv_show_poster_file_name": "poster.jpg", + "url": "https://www.youtube.com/@novapbs", + "url10": "", + "url100": "", + "url11": "", + "url12": "", + "url13": "", + "url14": "", + "url15": "", + "url16": "", + "url17": "", + "url18": "", + "url19": "", + "url2": "", + "url20": "", + "url21": "", + "url22": "", + "url23": "", + "url24": "", + "url25": "", + "url26": "", + "url27": "", + "url28": "", + "url29": "", + "url3": "", + "url30": "", + "url31": "", + "url32": "", + "url33": "", + "url34": "", + "url35": "", + "url36": "", + "url37": "", + "url38": "", + "url39": "", + "url4": "", + "url40": "", + "url41": "", + "url42": "", + "url43": "", + "url44": "", + "url45": "", + "url46": "", + "url47": "", + "url48": "", + "url49": "", + "url5": "", + "url50": "", + "url51": "", + "url52": "", + "url53": "", + "url54": "", + "url55": "", + "url56": "", + "url57": "", + "url58": "", + "url59": "", + "url6": "", + "url60": "", + "url61": "", + "url62": "", + "url63": "", + "url64": "", + "url65": "", + "url66": "", + "url67": "", + "url68": "", + "url69": "", + "url7": "", + "url70": "", + "url71": "", + "url72": "", + "url73": "", + "url74": "", + "url75": "", + "url76": "", + "url77": "", + "url78": "", + "url79": "", + "url8": "", + "url80": "", + "url81": "", + "url82": "", + "url83": "", + "url84": "", + "url85": "", + "url86": "", + "url87": "", + "url88": "", + "url89": "", + "url9": "", + "url90": "", + "url91": "", + "url92": "", + "url93": "", + "url94": "", + "url95": "", + "url96": "", + "url97": "", + "url98": "", + "url99": "", + "urls": [ + "https://www.youtube.com/@novapbs" + ] + }, + "throttle_protection": { + "enable": true, + "sleep_per_download_s": { + "max": 28.4, + "min": 13.8 + }, + "sleep_per_request_s": { + "max": 0.75, + "min": 0.0 + }, + "sleep_per_subscription_s": { + "max": 26.1, + "min": 16.3 + } + }, + "video_tags": { + "contentRating": "TV-14", + "date": "{ episode_date_standardized }", + "episode_id": "{ episode_number }", + "genre": "Documentaries", + "show": "NOVA PBS", + "synopsis": "{ episode_plot }", + "title": "{ episode_title }", + "year": "{ episode_year }" + } +} \ No newline at end of file diff --git a/tests/resources/expected_json/tv_show/inspect_sub_internal.json b/tests/resources/expected_json/tv_show/inspect_sub_internal.json new file mode 100644 index 00000000..3f1c1eaf --- /dev/null +++ b/tests/resources/expected_json/tv_show/inspect_sub_internal.json @@ -0,0 +1,250 @@ +{ + "chapters": { + "allow_chapters_from_comments": false, + "embed_chapters": true, + "enable": true, + "force_key_frames": false + }, + "date_range": { + "breaks": true, + "enable": true, + "type": "upload_date" + }, + "download": [ + { + "download_reverse": true, + "include_sibling_metadata": false, + "playlist_thumbnails": [ + { + "name": "poster.jpg", + "uid": "avatar_uncropped" + }, + { + "name": "fanart.jpg", + "uid": "banner_uncropped" + } + ], + "source_thumbnails": [ + { + "name": "poster.jpg", + "uid": "avatar_uncropped" + }, + { + "name": "fanart.jpg", + "uid": "banner_uncropped" + } + ], + "url": [ + "https://www.youtube.com/@novapbs" + ], + "variables": {}, + "webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", + "ytdl_options": {} + } + ], + "file_convert": { + "convert_to": "mp4", + "convert_with": "yt-dlp", + "enable": true + }, + "format": "(bv*[ext=mp4][vcodec~='^((he|a)vc|h26[45])']+ba[ext=m4a]) / (bv[ext=mp4]*+ba[ext=m4a]/b)", + "output_options": { + "download_archive_name": ".ytdl-sub-NOVA PBS-download-archive.json", + "file_name": "{ %concat( %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ), \"/\", %sanitize( %concat( \"s\", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ), \".e\", %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), %pad_zero( upload_date_index, 2 ) ) ), 6 ), \" - \", %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ) }.{ ext }", + "info_json_name": "{ %concat( %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ), \"/\", %sanitize( %concat( \"s\", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ), \".e\", %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), %pad_zero( upload_date_index, 2 ) ) ), 6 ), \" - \", %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ) }.info.json", + "keep_files_date_eval": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", + "maintain_download_archive": true, + "output_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpps6shcpt/NOVA PBS", + "preserve_mtime": false, + "thumbnail_name": "{ %concat( %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ), \"/\", %sanitize( %concat( \"s\", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ), \".e\", %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), %pad_zero( upload_date_index, 2 ) ) ), 6 ), \" - \", %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ) }-thumb.jpg" + }, + "overrides": { + "%bilateral_url": "{ %if( %and( enable_bilateral_scraping, subscription_has_download_archive, %is_bilateral_url( $0 ) ), $0, '' ) }", + "%episode_ordering_": "{ %eq( %lower( tv_show_by_date_episode_ordering ), $0 ) }", + "%is_bilateral_url": "{ %contains( $0, \"youtube.com/playlist\" ) }", + "%ordering_pair_eq": "{ %eq( [ tv_show_by_date_season_ordering, tv_show_by_date_episode_ordering ], [ $0, $1 ] ) }", + "%season_ordering_": "{ %eq( %lower( tv_show_by_date_season_ordering ), $0 ) }", + "assert_not_collection": true, + "avatar_uncropped_thumbnail_file_name": "poster.jpg", + "banner_uncropped_thumbnail_file_name": "fanart.jpg", + "enable_bilateral_scraping": true, + "enable_resolution_assert": true, + "enable_throttle_protection": true, + "episode_content_rating": "TV-14", + "episode_date_standardized": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", + "episode_file_name": "s{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }.e{ %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), %pad_zero( upload_date_index, 2 ) ) ), 6 ) } - { %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", + "episode_file_path": "{ %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ) }/{ %sanitize( %concat( \"s\", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ), \".e\", %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), %pad_zero( upload_date_index, 2 ) ) ), 6 ), \" - \", %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) }", + "episode_number": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ) }{ %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) }{ %pad_zero( upload_date_index, 2 ) }", + "episode_number_and_padded_": "{ [ %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), %pad_zero( upload_date_index, 2 ) ), 6 ] }", + "episode_number_padded": "{ %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), %pad_zero( upload_date_index, 2 ) ) ), 6 ) }", + "episode_plot": "{ %map_get( entry_metadata, \"webpage_url\" ) }\n\n{ %map_get_non_empty( entry_metadata, \"description\", '' ) }", + "episode_title": "{ %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) } - { %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) }", + "episode_year": "{ %slice( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ), 0, 4 ) }", + "file_title": "{ %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) }", + "file_uid": "{ %sanitize_plex_episode( %map_get( entry_metadata, \"id\" ) ) }", + "include_sibling_metadata": false, + "modified_webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", + "only_recent_date_range": "2months", + "only_recent_max_files": 30, + "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", + "resolution_assert_height_gte": 361, + "resolution_assert_ignore_titles": "{ [ ] }", + "resolution_assert_is_ignored": "{ %print_if_true( %concat( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ), [ ] ) ) }", + "resolution_assert_print": true, + "resolution_readable": "{ width }x{ height }", + "s01_name": "", + "s01_url": "", + "season_directory_name": "Season { %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }", + "season_number": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }", + "season_number_padded": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }", + "season_poster_file_name": "{ %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ) }/Season{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) }.jpg", + "subscription_array": [ + "https://www.youtube.com/@novapbs" + ], + "subscription_indent_1": "Documentaries", + "subscription_indent_2": "TV-14", + "subscription_value": "https://www.youtube.com/@novapbs", + "subscription_value_1": "https://www.youtube.com/@novapbs", + "thumbnail_file_name": "{ %concat( %sanitize( %concat( \"Season \", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ) ) ), \"/\", %sanitize( %concat( \"s\", %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"year\" ) ), \".e\", %pad_zero( %int( %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), %pad_zero( upload_date_index, 2 ) ) ), 6 ), \" - \", %sanitize_plex_episode( %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) ) ) ) ) }-thumb.jpg", + "tv_show_by_date_episode_ordering": "upload-month-day", + "tv_show_by_date_ordering_pair_validation_": "{ [ %concat( %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ), %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) ), %pad_zero( upload_date_index, 2 ) ), 6 ] }", + "tv_show_by_date_season_ordering": "upload-year", + "tv_show_content_rating": "TV-14", + "tv_show_content_rating_default": "TV-14", + "tv_show_date_range_type": "upload_date", + "tv_show_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmpps6shcpt", + "tv_show_fanart_file_name": "fanart.jpg", + "tv_show_genre": "Documentaries", + "tv_show_genre_default": "ytdl-sub", + "tv_show_name": "NOVA PBS", + "tv_show_poster_file_name": "poster.jpg", + "url": "https://www.youtube.com/@novapbs", + "url10": "", + "url100": "", + "url11": "", + "url12": "", + "url13": "", + "url14": "", + "url15": "", + "url16": "", + "url17": "", + "url18": "", + "url19": "", + "url2": "", + "url20": "", + "url21": "", + "url22": "", + "url23": "", + "url24": "", + "url25": "", + "url26": "", + "url27": "", + "url28": "", + "url29": "", + "url3": "", + "url30": "", + "url31": "", + "url32": "", + "url33": "", + "url34": "", + "url35": "", + "url36": "", + "url37": "", + "url38": "", + "url39": "", + "url4": "", + "url40": "", + "url41": "", + "url42": "", + "url43": "", + "url44": "", + "url45": "", + "url46": "", + "url47": "", + "url48": "", + "url49": "", + "url5": "", + "url50": "", + "url51": "", + "url52": "", + "url53": "", + "url54": "", + "url55": "", + "url56": "", + "url57": "", + "url58": "", + "url59": "", + "url6": "", + "url60": "", + "url61": "", + "url62": "", + "url63": "", + "url64": "", + "url65": "", + "url66": "", + "url67": "", + "url68": "", + "url69": "", + "url7": "", + "url70": "", + "url71": "", + "url72": "", + "url73": "", + "url74": "", + "url75": "", + "url76": "", + "url77": "", + "url78": "", + "url79": "", + "url8": "", + "url80": "", + "url81": "", + "url82": "", + "url83": "", + "url84": "", + "url85": "", + "url86": "", + "url87": "", + "url88": "", + "url89": "", + "url9": "", + "url90": "", + "url91": "", + "url92": "", + "url93": "", + "url94": "", + "url95": "", + "url96": "", + "url97": "", + "url98": "", + "url99": "", + "urls": [ + "https://www.youtube.com/@novapbs" + ] + }, + "throttle_protection": { + "enable": true, + "sleep_per_download_s": { + "max": 28.4, + "min": 13.8 + }, + "sleep_per_request_s": { + "max": 0.75, + "min": 0.0 + }, + "sleep_per_subscription_s": { + "max": 26.1, + "min": 16.3 + } + }, + "video_tags": { + "contentRating": "TV-14", + "date": "{ %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ) }", + "episode_id": "{ %int( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"month\" ) ) }{ %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"day_padded\" ) }{ %pad_zero( upload_date_index, 2 ) }", + "genre": "Documentaries", + "show": "NOVA PBS", + "synopsis": "{ %map_get( entry_metadata, \"webpage_url\" ) }\n\n{ %map_get_non_empty( entry_metadata, \"description\", '' ) }", + "title": "{ %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) } - { %map_get_non_empty( entry_metadata, \"title\", %map_get( entry_metadata, \"id\" ) ) }", + "year": "{ %slice( %string( %map_get( %to_date_metadata( %map_get_non_empty( entry_metadata, \"upload_date\", %datetime_strftime( %map_get( entry_metadata, \"epoch\" ), \"%Y%m%d\" ) ) ), \"date_standardized\" ) ), 0, 4 ) }" + } +} \ No newline at end of file diff --git a/tests/resources/expected_json/tv_show/inspect_sub_original.json b/tests/resources/expected_json/tv_show/inspect_sub_original.json new file mode 100644 index 00000000..0a7540d3 --- /dev/null +++ b/tests/resources/expected_json/tv_show/inspect_sub_original.json @@ -0,0 +1,255 @@ +{ + "chapters": { + "embed_chapters": true + }, + "date_range": { + "type": "{tv_show_date_range_type}" + }, + "download": [ + { + "download_reverse": false, + "url": "{ %array_apply(urls, %bilateral_url) }", + "webpage_url": "{modified_webpage_url}", + "ytdl_options": { + "playlist_items": "-1:0:-1" + } + }, + { + "include_sibling_metadata": "{include_sibling_metadata}", + "playlist_thumbnails": [ + { + "name": "{avatar_uncropped_thumbnail_file_name}", + "uid": "avatar_uncropped" + }, + { + "name": "{banner_uncropped_thumbnail_file_name}", + "uid": "banner_uncropped" + } + ], + "source_thumbnails": [ + { + "name": "{avatar_uncropped_thumbnail_file_name}", + "uid": "avatar_uncropped" + }, + { + "name": "{banner_uncropped_thumbnail_file_name}", + "uid": "banner_uncropped" + } + ], + "url": "{ %array_at(urls, 0) }", + "webpage_url": "{modified_webpage_url}" + }, + { + "include_sibling_metadata": "{include_sibling_metadata}", + "url": "{ %array_slice(urls, 1) }", + "webpage_url": "{modified_webpage_url}" + } + ], + "file_convert": { + "convert_to": "mp4" + }, + "format": "(bv*[ext=mp4][vcodec~='^((he|a)vc|h26[45])']+ba[ext=m4a]) / (bv[ext=mp4]*+ba[ext=m4a]/b)", + "output_options": { + "file_name": "{episode_file_path}.{ext}", + "info_json_name": "{episode_file_path}.{info_json_ext}", + "keep_files_date_eval": "{episode_date_standardized}", + "maintain_download_archive": true, + "output_directory": "{tv_show_directory}/{tv_show_name_sanitized}", + "thumbnail_name": "{thumbnail_file_name}" + }, + "overrides": { + "%bilateral_url": "{ \n %if(\n %and(\n enable_bilateral_scraping,\n subscription_has_download_archive,\n %is_bilateral_url($0)\n ),\n $0,\n \"\"\n )\n}", + "%episode_ordering_": "{ %eq( %lower(tv_show_by_date_episode_ordering), $0 ) }", + "%is_bilateral_url": "{ %contains( $0, \"youtube.com/playlist\" ) }", + "%ordering_pair_eq": "{\n %eq([tv_show_by_date_season_ordering, tv_show_by_date_episode_ordering], [$0, $1])\n}", + "%season_ordering_": "{ %eq( %lower(tv_show_by_date_season_ordering), $0 ) }", + "assert_not_collection": "{\n %assert(\n %and(\n %not( %bool(s01_url) ),\n %not( %bool(s01_name) )\n ),\n \"Provided `s01_url` or `s01_name` variable to TV Show by Date preset when it expects `url`. Perhaps you meant to use the `TV Show Collection` preset?\"\n )\n}", + "avatar_uncropped_thumbnail_file_name": "{tv_show_poster_file_name}", + "banner_uncropped_thumbnail_file_name": "{tv_show_fanart_file_name}", + "enable_bilateral_scraping": true, + "enable_resolution_assert": true, + "enable_throttle_protection": true, + "episode_content_rating": "{tv_show_content_rating}", + "episode_date_standardized": "{\n %if(\n %contains(tv_show_by_date_season_ordering, \"release\"),\n release_date_standardized,\n upload_date_standardized\n )\n}", + "episode_file_name": "s{season_number_padded}.e{episode_number_padded} - {file_title}", + "episode_file_path": "{season_directory_name_sanitized}/{episode_file_name_sanitized}", + "episode_number": "{ %array_at(episode_number_and_padded_, 0) }", + "episode_number_and_padded_": "{\n %elif(\n %episode_ordering_( \"upload-day\" ), [ %concat(upload_day, upload_date_index_padded), 4 ],\n %episode_ordering_( \"upload-month-day\" ), [ %concat(upload_month, upload_day_padded, upload_date_index_padded), 6],\n %episode_ordering_( \"upload-month-day-reversed\" ), [ %concat(upload_day_of_year_reversed, upload_date_index_reversed_padded), 5],\n %episode_ordering_( \"release-day\" ), [ %concat(release_day, upload_date_index_padded), 4 ],\n %episode_ordering_( \"release-month-day\" ), [ %concat(release_month, release_day_padded, upload_date_index_padded), 6],\n %episode_ordering_( \"release-month-day-reversed\" ), [ %concat(release_day_of_year_reversed, upload_date_index_reversed_padded), 5],\n %episode_ordering_( \"download-index\" ), [ download_index, 6 ],\n %throw(\n 'tv_show_by_date_episode_ordering must be one of the following: \"upload-day\", \"upload-month-day\", \"upload-month-day-reversed\", \"release-day\", \"release-month-day\", \"release-month-day-reversed\", \"download-index\"'\n )\n )\n}", + "episode_number_padded": "{ %pad_zero( %int(episode_number), %int(%array_at(episode_number_and_padded_, 1))) }", + "episode_plot": "{webpage_url}\n\n{description}", + "episode_title": "{episode_date_standardized} - {title}", + "episode_year": "{%slice(episode_date_standardized, 0, 4)}", + "file_title": "{title_sanitized_plex}", + "file_uid": "{uid_sanitized_plex}", + "include_sibling_metadata": false, + "modified_webpage_url": "{webpage_url}", + "only_recent_date_range": "2months", + "only_recent_max_files": 30, + "resolution_assert": "{\n %if(\n %and(\n enable_resolution_assert,\n %ne( height, 0 ),\n %not(resolution_assert_is_ignored)\n ),\n %assert(\n %gte( height, resolution_assert_height_gte ),\n %concat(\n \"Entry \",\n title,\n \" downloaded at a low resolution (\",\n resolution_readable,\n \"), you've probably been throttled. \",\n \"Stopping further downloads, wait a few hours and try again. \",\n \"Disable using the override variable `enable_resolution_assert: False`.\"\n )\n ),\n \"false is no-op\"\n )\n}", + "resolution_assert_height_gte": 361, + "resolution_assert_ignore_titles": "{ [] }", + "resolution_assert_is_ignored": "{\n %print_if_true(\n %concat(title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\"),\n %contains_any(title, resolution_assert_ignore_titles)\n )\n}", + "resolution_assert_print": "{\n %print(\n %if(\n enable_resolution_assert,\n \"Resolution assert is enabled, will fail on low-quality video downloads and presume throttle. Disable using the override variable `enable_resolution_assert: False`\",\n \"Resolution assert is disabled. Use at your own risk!\"\n ),\n enable_resolution_assert,\n -1\n )\n}", + "resolution_readable": "{width}x{height}", + "s01_name": "", + "s01_url": "", + "season_directory_name": "Season {season_number_padded}", + "season_number": "{\n %elif(\n %season_ordering_( \"upload-year\" ), upload_year,\n %season_ordering_( \"upload-year-month\" ), %concat(upload_year, upload_month_padded),\n %season_ordering_( \"release-year\" ), release_year,\n %season_ordering_( \"release-year-month\" ), %concat(release_year, release_month_padded),\n %throw(\n 'tv_show_by_date_season_ordering must be one of the following: \"upload-year\", \"upload-year-month\", \"release-year\", \"release-year-month\"'\n )\n )\n}", + "season_number_padded": "{season_number}", + "season_poster_file_name": "{season_directory_name_sanitized}/Season{season_number_padded}.jpg", + "subscription_array": "{%from_json('''[\"https://www.youtube.com/@novapbs\"]''')}", + "subscription_indent_1": "Documentaries", + "subscription_indent_2": "{tv_show_content_rating_default}", + "subscription_value": "https://www.youtube.com/@novapbs", + "subscription_value_1": "https://www.youtube.com/@novapbs", + "thumbnail_file_name": "{episode_file_path}-thumb.jpg", + "tv_show_by_date_episode_ordering": "upload-month-day", + "tv_show_by_date_ordering_pair_validation_": "{\n %assert_then(\n %or(\n %ordering_pair_eq(\"upload-year\", \"upload-month-day\"),\n %ordering_pair_eq(\"upload-year\", \"upload-month-day-reversed\"),\n %ordering_pair_eq(\"upload-year\", \"download-index\"),\n %ordering_pair_eq(\"upload-year-month\", \"upload-day\"),\n %ordering_pair_eq(\"release-year\", \"release-month-day\"),\n %ordering_pair_eq(\"release-year\", \"release-month-day-reversed\"),\n %ordering_pair_eq(\"release-year\", \"download-index\"),\n %ordering_pair_eq(\"release-year-month\", \"release-day\")\n ),\n episode_number_and_padded_,\n \"Detected incompatibility between tv_show_by_date_season_ordering and tv_show_by_date_episode_ordering. Ensure you are not using both upload and release date, and that the year/month/day are included in the combined season and episode.\"\n )\n}", + "tv_show_by_date_season_ordering": "upload-year", + "tv_show_content_rating": "{subscription_indent_2}", + "tv_show_content_rating_default": "TV-14", + "tv_show_date_range_type": "{\n %if(\n %contains(tv_show_by_date_season_ordering, \"release\"),\n \"release_date\",\n \"upload_date\"\n )\n}", + "tv_show_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmp5yx9y73k", + "tv_show_fanart_file_name": "fanart.jpg", + "tv_show_genre": "{subscription_indent_1}", + "tv_show_genre_default": "ytdl-sub", + "tv_show_name": "{subscription_name}", + "tv_show_poster_file_name": "poster.jpg", + "url": "{subscription_value}", + "url10": "", + "url100": "", + "url11": "", + "url12": "", + "url13": "", + "url14": "", + "url15": "", + "url16": "", + "url17": "", + "url18": "", + "url19": "", + "url2": "", + "url20": "", + "url21": "", + "url22": "", + "url23": "", + "url24": "", + "url25": "", + "url26": "", + "url27": "", + "url28": "", + "url29": "", + "url3": "", + "url30": "", + "url31": "", + "url32": "", + "url33": "", + "url34": "", + "url35": "", + "url36": "", + "url37": "", + "url38": "", + "url39": "", + "url4": "", + "url40": "", + "url41": "", + "url42": "", + "url43": "", + "url44": "", + "url45": "", + "url46": "", + "url47": "", + "url48": "", + "url49": "", + "url5": "", + "url50": "", + "url51": "", + "url52": "", + "url53": "", + "url54": "", + "url55": "", + "url56": "", + "url57": "", + "url58": "", + "url59": "", + "url6": "", + "url60": "", + "url61": "", + "url62": "", + "url63": "", + "url64": "", + "url65": "", + "url66": "", + "url67": "", + "url68": "", + "url69": "", + "url7": "", + "url70": "", + "url71": "", + "url72": "", + "url73": "", + "url74": "", + "url75": "", + "url76": "", + "url77": "", + "url78": "", + "url79": "", + "url8": "", + "url80": "", + "url81": "", + "url82": "", + "url83": "", + "url84": "", + "url85": "", + "url86": "", + "url87": "", + "url88": "", + "url89": "", + "url9": "", + "url90": "", + "url91": "", + "url92": "", + "url93": "", + "url94": "", + "url95": "", + "url96": "", + "url97": "", + "url98": "", + "url99": "", + "urls": "{subscription_array}" + }, + "preset": [ + "_season_by_year", + "plex_tv_show_by_date", + "season_by_year__episode_by_month_day", + "Plex TV Show by Date", + "__preset__" + ], + "throttle_protection": { + "enable": "{\n %print(\n %if(\n enable_throttle_protection,\n \"Throttle protection is enabled. Disable using the override variable `enable_throttle_protection: False`\",\n \"Throttle protection is disabled. Use at your own risk!\"\n ),\n enable_throttle_protection\n )\n}", + "sleep_per_download_s": { + "max": 28.4, + "min": 13.8 + }, + "sleep_per_request_s": { + "max": 0.75, + "min": 0.0 + }, + "sleep_per_subscription_s": { + "max": 26.1, + "min": 16.3 + } + }, + "video_tags": { + "contentRating": "{episode_content_rating}", + "date": "{episode_date_standardized}", + "episode_id": "{episode_number}", + "genre": "{tv_show_genre}", + "show": "{tv_show_name}", + "synopsis": "{episode_plot}", + "title": "{episode_title}", + "year": "{episode_year}" + }, + "ytdl_options": { + "break_on_existing": true + } +} \ No newline at end of file diff --git a/tests/resources/expected_json/tv_show/inspect_sub_resolve.json b/tests/resources/expected_json/tv_show/inspect_sub_resolve.json new file mode 100644 index 00000000..3c2898ea --- /dev/null +++ b/tests/resources/expected_json/tv_show/inspect_sub_resolve.json @@ -0,0 +1,250 @@ +{ + "chapters": { + "allow_chapters_from_comments": false, + "embed_chapters": true, + "enable": true, + "force_key_frames": false + }, + "date_range": { + "breaks": true, + "enable": true, + "type": "upload_date" + }, + "download": [ + { + "download_reverse": true, + "include_sibling_metadata": false, + "playlist_thumbnails": [ + { + "name": "poster.jpg", + "uid": "avatar_uncropped" + }, + { + "name": "fanart.jpg", + "uid": "banner_uncropped" + } + ], + "source_thumbnails": [ + { + "name": "poster.jpg", + "uid": "avatar_uncropped" + }, + { + "name": "fanart.jpg", + "uid": "banner_uncropped" + } + ], + "url": [ + "https://www.youtube.com/@novapbs" + ], + "variables": {}, + "webpage_url": "{ webpage_url }", + "ytdl_options": {} + } + ], + "file_convert": { + "convert_to": "mp4", + "convert_with": "yt-dlp", + "enable": true + }, + "format": "(bv*[ext=mp4][vcodec~='^((he|a)vc|h26[45])']+ba[ext=m4a]) / (bv[ext=mp4]*+ba[ext=m4a]/b)", + "output_options": { + "download_archive_name": ".ytdl-sub-NOVA PBS-download-archive.json", + "file_name": "{ %concat( %sanitize( %concat( \"Season \", upload_year ) ), \"/\", %sanitize( %concat( \"s\", upload_year, \".e\", %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ), \" - \", title_sanitized_plex ) ) ) }.{ ext }", + "info_json_name": "{ %concat( %sanitize( %concat( \"Season \", upload_year ) ), \"/\", %sanitize( %concat( \"s\", upload_year, \".e\", %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ), \" - \", title_sanitized_plex ) ) ) }.{ info_json_ext }", + "keep_files_date_eval": "{ upload_date_standardized }", + "maintain_download_archive": true, + "output_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmp3j0cm_tw/NOVA PBS", + "preserve_mtime": false, + "thumbnail_name": "{ %concat( %sanitize( %concat( \"Season \", upload_year ) ), \"/\", %sanitize( %concat( \"s\", upload_year, \".e\", %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ), \" - \", title_sanitized_plex ) ) ) }-thumb.jpg" + }, + "overrides": { + "%bilateral_url": "{ %if( %and( enable_bilateral_scraping, subscription_has_download_archive, %is_bilateral_url( $0 ) ), $0, '' ) }", + "%episode_ordering_": "{ %eq( %lower( tv_show_by_date_episode_ordering ), $0 ) }", + "%is_bilateral_url": "{ %contains( $0, \"youtube.com/playlist\" ) }", + "%ordering_pair_eq": "{ %eq( [ tv_show_by_date_season_ordering, tv_show_by_date_episode_ordering ], [ $0, $1 ] ) }", + "%season_ordering_": "{ %eq( %lower( tv_show_by_date_season_ordering ), $0 ) }", + "assert_not_collection": true, + "avatar_uncropped_thumbnail_file_name": "poster.jpg", + "banner_uncropped_thumbnail_file_name": "fanart.jpg", + "enable_bilateral_scraping": true, + "enable_resolution_assert": true, + "enable_throttle_protection": true, + "episode_content_rating": "TV-14", + "episode_date_standardized": "{ upload_date_standardized }", + "episode_file_name": "s{ upload_year }.e{ %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ) } - { title_sanitized_plex }", + "episode_file_path": "{ %sanitize( %concat( \"Season \", upload_year ) ) }/{ %sanitize( %concat( \"s\", upload_year, \".e\", %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ), \" - \", title_sanitized_plex ) ) }", + "episode_number": "{ upload_month }{ upload_day_padded }{ upload_date_index_padded }", + "episode_number_and_padded_": "{ [ %concat( upload_month, upload_day_padded, upload_date_index_padded ), 6 ] }", + "episode_number_padded": "{ %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ) }", + "episode_plot": "{ webpage_url }\n\n{ description }", + "episode_title": "{ upload_date_standardized } - { title }", + "episode_year": "{ %slice( upload_date_standardized, 0, 4 ) }", + "file_title": "{ title_sanitized_plex }", + "file_uid": "{ uid_sanitized_plex }", + "include_sibling_metadata": false, + "modified_webpage_url": "{ webpage_url }", + "only_recent_date_range": "2months", + "only_recent_max_files": 30, + "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", + "resolution_assert_height_gte": 361, + "resolution_assert_ignore_titles": "{ [ ] }", + "resolution_assert_is_ignored": "{ %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, [ ] ) ) }", + "resolution_assert_print": true, + "resolution_readable": "{ width }x{ height }", + "s01_name": "", + "s01_url": "", + "season_directory_name": "Season { upload_year }", + "season_number": "{ upload_year }", + "season_number_padded": "{ upload_year }", + "season_poster_file_name": "{ %sanitize( %concat( \"Season \", upload_year ) ) }/Season{ upload_year }.jpg", + "subscription_array": [ + "https://www.youtube.com/@novapbs" + ], + "subscription_indent_1": "Documentaries", + "subscription_indent_2": "TV-14", + "subscription_value": "https://www.youtube.com/@novapbs", + "subscription_value_1": "https://www.youtube.com/@novapbs", + "thumbnail_file_name": "{ %concat( %sanitize( %concat( \"Season \", upload_year ) ), \"/\", %sanitize( %concat( \"s\", upload_year, \".e\", %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ), \" - \", title_sanitized_plex ) ) ) }-thumb.jpg", + "tv_show_by_date_episode_ordering": "upload-month-day", + "tv_show_by_date_ordering_pair_validation_": "{ [ %concat( upload_month, upload_day_padded, upload_date_index_padded ), 6 ] }", + "tv_show_by_date_season_ordering": "upload-year", + "tv_show_content_rating": "TV-14", + "tv_show_content_rating_default": "TV-14", + "tv_show_date_range_type": "upload_date", + "tv_show_directory": "/var/folders/rw/hl1xmkmj68zdl2kjx3l0dwzc0000gn/T/tmp3j0cm_tw", + "tv_show_fanart_file_name": "fanart.jpg", + "tv_show_genre": "Documentaries", + "tv_show_genre_default": "ytdl-sub", + "tv_show_name": "NOVA PBS", + "tv_show_poster_file_name": "poster.jpg", + "url": "https://www.youtube.com/@novapbs", + "url10": "", + "url100": "", + "url11": "", + "url12": "", + "url13": "", + "url14": "", + "url15": "", + "url16": "", + "url17": "", + "url18": "", + "url19": "", + "url2": "", + "url20": "", + "url21": "", + "url22": "", + "url23": "", + "url24": "", + "url25": "", + "url26": "", + "url27": "", + "url28": "", + "url29": "", + "url3": "", + "url30": "", + "url31": "", + "url32": "", + "url33": "", + "url34": "", + "url35": "", + "url36": "", + "url37": "", + "url38": "", + "url39": "", + "url4": "", + "url40": "", + "url41": "", + "url42": "", + "url43": "", + "url44": "", + "url45": "", + "url46": "", + "url47": "", + "url48": "", + "url49": "", + "url5": "", + "url50": "", + "url51": "", + "url52": "", + "url53": "", + "url54": "", + "url55": "", + "url56": "", + "url57": "", + "url58": "", + "url59": "", + "url6": "", + "url60": "", + "url61": "", + "url62": "", + "url63": "", + "url64": "", + "url65": "", + "url66": "", + "url67": "", + "url68": "", + "url69": "", + "url7": "", + "url70": "", + "url71": "", + "url72": "", + "url73": "", + "url74": "", + "url75": "", + "url76": "", + "url77": "", + "url78": "", + "url79": "", + "url8": "", + "url80": "", + "url81": "", + "url82": "", + "url83": "", + "url84": "", + "url85": "", + "url86": "", + "url87": "", + "url88": "", + "url89": "", + "url9": "", + "url90": "", + "url91": "", + "url92": "", + "url93": "", + "url94": "", + "url95": "", + "url96": "", + "url97": "", + "url98": "", + "url99": "", + "urls": [ + "https://www.youtube.com/@novapbs" + ] + }, + "throttle_protection": { + "enable": true, + "sleep_per_download_s": { + "max": 28.4, + "min": 13.8 + }, + "sleep_per_request_s": { + "max": 0.75, + "min": 0.0 + }, + "sleep_per_subscription_s": { + "max": 26.1, + "min": 16.3 + } + }, + "video_tags": { + "contentRating": "TV-14", + "date": "{ upload_date_standardized }", + "episode_id": "{ upload_month }{ upload_day_padded }{ upload_date_index_padded }", + "genre": "Documentaries", + "show": "NOVA PBS", + "synopsis": "{ webpage_url }\n\n{ description }", + "title": "{ upload_date_standardized } - { title }", + "year": "{ %slice( upload_date_standardized, 0, 4 ) }" + } +} \ No newline at end of file diff --git a/tests/resources/expected_json/tv_show/inspect_variables.json b/tests/resources/expected_json/tv_show/inspect_variables.json deleted file mode 100644 index f3159ff9..00000000 --- a/tests/resources/expected_json/tv_show/inspect_variables.json +++ /dev/null @@ -1,520 +0,0 @@ -{ - "assert_not_collection": "{ %bool(True) }", - "assert_not_collection_sanitized": "true", - "avatar_uncropped_thumbnail_file_name": "poster.jpg", - "avatar_uncropped_thumbnail_file_name_sanitized": "poster.jpg", - "banner_uncropped_thumbnail_file_name": "fanart.jpg", - "banner_uncropped_thumbnail_file_name_sanitized": "fanart.jpg", - "channel": "{ %map_get_non_empty( entry_metadata, \"channel\", uploader ) }", - "channel_id": "{ %map_get_non_empty( entry_metadata, \"channel_id\", uploader_id ) }", - "channel_id_sanitized": "{ %sanitize( channel_id ) }", - "channel_sanitized": "{ %sanitize( channel ) }", - "chapters": "{ [ ] }", - "chapters_sanitized": "{ %sanitize( chapters ) }", - "comments": "{ [ ] }", - "comments_sanitized": "{ %sanitize( comments ) }", - "creator": "{ %map_get_non_empty( entry_metadata, \"creator\", channel ) }", - "creator_sanitized": "{ %sanitize( creator ) }", - "description": "{ %map_get_non_empty( entry_metadata, \"description\", '' ) }", - "description_sanitized": "{ %sanitize( description ) }", - "download_index": "{ %int( 1 ) }", - "download_index_padded6": "{ %pad_zero( download_index, 6 ) }", - "download_index_padded6_sanitized": "{ %sanitize( download_index_padded6 ) }", - "download_index_sanitized": "{ %sanitize( download_index ) }", - "duration": "{ %map_get_non_empty( entry_metadata, \"duration\", 0 ) }", - "duration_sanitized": "{ %sanitize( duration ) }", - "enable_bilateral_scraping": "{ %bool(True) }", - "enable_bilateral_scraping_sanitized": "true", - "enable_resolution_assert": "{ %bool(True) }", - "enable_resolution_assert_sanitized": "true", - "enable_throttle_protection": "{ %bool(True) }", - "enable_throttle_protection_sanitized": "true", - "entry_metadata": "{ { } }", - "entry_metadata_sanitized": "{ %sanitize( entry_metadata ) }", - "episode_content_rating": "TV-14", - "episode_content_rating_sanitized": "TV-14", - "episode_date_standardized": "{ upload_date_standardized }", - "episode_date_standardized_sanitized": "{ %sanitize( upload_date_standardized ) }", - "episode_file_name": "s{ upload_year }.e{ %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ) } - { title_sanitized_plex }", - "episode_file_name_sanitized": "{ %sanitize( %concat( \"s\", upload_year, \".e\", %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ), \" - \", title_sanitized_plex ) ) }", - "episode_file_path": "{ %sanitize( %concat( \"Season \", upload_year ) ) }/{ %sanitize( %concat( \"s\", upload_year, \".e\", %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ), \" - \", title_sanitized_plex ) ) }", - "episode_file_path_sanitized": "{ %sanitize( %concat( %sanitize( %concat( \"Season \", upload_year ) ), \"/\", %sanitize( %concat( \"s\", upload_year, \".e\", %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ), \" - \", title_sanitized_plex ) ) ) ) }", - "episode_number": "{ upload_month }{ upload_day_padded }{ upload_date_index_padded }", - "episode_number_and_padded_": "{ [ %concat( upload_month, upload_day_padded, upload_date_index_padded ), 6 ] }", - "episode_number_and_padded__sanitized": "{ %sanitize( [ %concat( upload_month, upload_day_padded, upload_date_index_padded ), 6 ] ) }", - "episode_number_padded": "{ %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ) }", - "episode_number_padded_sanitized": "{ %sanitize( %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ) ) }", - "episode_number_sanitized": "{ %sanitize( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ) }", - "episode_plot": "{ webpage_url }\n\n{ description }", - "episode_plot_sanitized": "{ %sanitize( %concat( webpage_url, \"\n\n\", description ) ) }", - "episode_title": "{ upload_date_standardized } - { title }", - "episode_title_sanitized": "{ %sanitize( %concat( upload_date_standardized, \" - \", title ) ) }", - "episode_year": "{ %slice( upload_date_standardized, 0, 4 ) }", - "episode_year_sanitized": "{ %sanitize( %slice( upload_date_standardized, 0, 4 ) ) }", - "epoch": "{ %map_get( entry_metadata, \"epoch\" ) }", - "epoch_date": "{ %datetime_strftime( epoch, \"%Y%m%d\" ) }", - "epoch_date_sanitized": "{ %sanitize( epoch_date ) }", - "epoch_hour": "{ %datetime_strftime( epoch, \"%H\" ) }", - "epoch_hour_sanitized": "{ %sanitize( epoch_hour ) }", - "epoch_sanitized": "{ %sanitize( epoch ) }", - "ext": "{ %throw( \"Plugin variable ext has not been created yet\" ) }", - "ext_sanitized": "{ %sanitize( ext ) }", - "extractor": "{ %map_get( entry_metadata, \"extractor\" ) }", - "extractor_key": "{ %map_get( entry_metadata, \"extractor_key\" ) }", - "extractor_key_sanitized": "{ %sanitize( extractor_key ) }", - "extractor_sanitized": "{ %sanitize( extractor ) }", - "file_title": "{ title_sanitized_plex }", - "file_title_sanitized": "{ %sanitize( title_sanitized_plex ) }", - "file_uid": "{ uid_sanitized_plex }", - "file_uid_sanitized": "{ %sanitize( uid_sanitized_plex ) }", - "height": "{ %map_get_non_empty( entry_metadata, \"height\", 0 ) }", - "height_sanitized": "{ %sanitize( height ) }", - "ie_key": "{ %map_get_non_empty( entry_metadata, \"ie_key\", extractor_key ) }", - "ie_key_sanitized": "{ %sanitize( ie_key ) }", - "include_sibling_metadata": "{ %bool(False) }", - "include_sibling_metadata_sanitized": "false", - "info_json_ext": "info.json", - "info_json_ext_sanitized": "info.json", - "modified_webpage_url": "{ webpage_url }", - "modified_webpage_url_sanitized": "{ %sanitize( webpage_url ) }", - "only_recent_date_range": "2months", - "only_recent_date_range_sanitized": "2months", - "only_recent_max_files": "{ %int(30) }", - "only_recent_max_files_sanitized": "30", - "playlist_count": "{ %map_get_non_empty( entry_metadata, \"playlist_count\", 1 ) }", - "playlist_count_sanitized": "{ %sanitize( playlist_count ) }", - "playlist_description": "{ %map_get_non_empty( playlist_metadata, \"description\", description ) }", - "playlist_description_sanitized": "{ %sanitize( playlist_description ) }", - "playlist_index": "{ %map_get_non_empty( entry_metadata, \"playlist_index\", 1 ) }", - "playlist_index_padded": "{ %pad_zero( playlist_index, 2 ) }", - "playlist_index_padded6": "{ %pad_zero( playlist_index, 6 ) }", - "playlist_index_padded6_sanitized": "{ %sanitize( playlist_index_padded6 ) }", - "playlist_index_padded_sanitized": "{ %sanitize( playlist_index_padded ) }", - "playlist_index_reversed": "{ %sub( playlist_count, playlist_index, -1 ) }", - "playlist_index_reversed_padded": "{ %pad_zero( playlist_index_reversed, 2 ) }", - "playlist_index_reversed_padded6": "{ %pad_zero( playlist_index_reversed, 6 ) }", - "playlist_index_reversed_padded6_sanitized": "{ %sanitize( playlist_index_reversed_padded6 ) }", - "playlist_index_reversed_padded_sanitized": "{ %sanitize( playlist_index_reversed_padded ) }", - "playlist_index_reversed_sanitized": "{ %sanitize( playlist_index_reversed ) }", - "playlist_index_sanitized": "{ %sanitize( playlist_index ) }", - "playlist_max_upload_date": "{ %array_reduce( %if_passthrough( %extract_field_from_siblings( \"upload_date\" ), [ upload_date ] ), %max ) }", - "playlist_max_upload_date_sanitized": "{ %sanitize( playlist_max_upload_date ) }", - "playlist_max_upload_year": "{ %int( %map_get( %to_date_metadata( playlist_max_upload_date ), \"year\" ) ) }", - "playlist_max_upload_year_sanitized": "{ %sanitize( playlist_max_upload_year ) }", - "playlist_max_upload_year_truncated": "{ %int( %map_get( %to_date_metadata( playlist_max_upload_date ), \"year_truncated\" ) ) }", - "playlist_max_upload_year_truncated_sanitized": "{ %sanitize( playlist_max_upload_year_truncated ) }", - "playlist_metadata": "{ %map_get_non_empty( entry_metadata, \"playlist_metadata\", { } ) }", - "playlist_metadata_sanitized": "{ %sanitize( playlist_metadata ) }", - "playlist_title": "{ %map_get_non_empty( entry_metadata, \"playlist_title\", title ) }", - "playlist_title_sanitized": "{ %sanitize( playlist_title ) }", - "playlist_uid": "{ %map_get_non_empty( playlist_metadata, \"playlist_id\", uid ) }", - "playlist_uid_sanitized": "{ %sanitize( playlist_uid ) }", - "playlist_uploader": "{ %map_get_non_empty( playlist_metadata, \"uploader\", uploader ) }", - "playlist_uploader_id": "{ %map_get_non_empty( entry_metadata, \"playlist_uploader_id\", uploader_id ) }", - "playlist_uploader_id_sanitized": "{ %sanitize( playlist_uploader_id ) }", - "playlist_uploader_sanitized": "{ %sanitize( playlist_uploader ) }", - "playlist_uploader_url": "{ %map_get_non_empty( playlist_metadata, \"uploader_url\", webpage_url ) }", - "playlist_uploader_url_sanitized": "{ %sanitize( playlist_uploader_url ) }", - "playlist_webpage_url": "{ %map_get_non_empty( playlist_metadata, \"webpage_url\", webpage_url ) }", - "playlist_webpage_url_sanitized": "{ %sanitize( playlist_webpage_url ) }", - "release_date": "{ %map_get_non_empty( entry_metadata, \"release_date\", upload_date ) }", - "release_date_sanitized": "{ %sanitize( release_date ) }", - "release_date_standardized": "{ %string( %map_get( %to_date_metadata( release_date ), \"date_standardized\" ) ) }", - "release_date_standardized_sanitized": "{ %sanitize( release_date_standardized ) }", - "release_day": "{ %int( %map_get( %to_date_metadata( release_date ), \"day\" ) ) }", - "release_day_of_year": "{ %int( %map_get( %to_date_metadata( release_date ), \"day_of_year\" ) ) }", - "release_day_of_year_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"day_of_year_padded\" ) ) }", - "release_day_of_year_padded_sanitized": "{ %sanitize( release_day_of_year_padded ) }", - "release_day_of_year_reversed": "{ %int( %map_get( %to_date_metadata( release_date ), \"day_of_year_reversed\" ) ) }", - "release_day_of_year_reversed_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"day_of_year_reversed_padded\" ) ) }", - "release_day_of_year_reversed_padded_sanitized": "{ %sanitize( release_day_of_year_reversed_padded ) }", - "release_day_of_year_reversed_sanitized": "{ %sanitize( release_day_of_year_reversed ) }", - "release_day_of_year_sanitized": "{ %sanitize( release_day_of_year ) }", - "release_day_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"day_padded\" ) ) }", - "release_day_padded_sanitized": "{ %sanitize( release_day_padded ) }", - "release_day_reversed": "{ %int( %map_get( %to_date_metadata( release_date ), \"day_reversed\" ) ) }", - "release_day_reversed_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"day_reversed_padded\" ) ) }", - "release_day_reversed_padded_sanitized": "{ %sanitize( release_day_reversed_padded ) }", - "release_day_reversed_sanitized": "{ %sanitize( release_day_reversed ) }", - "release_day_sanitized": "{ %sanitize( release_day ) }", - "release_month": "{ %int( %map_get( %to_date_metadata( release_date ), \"month\" ) ) }", - "release_month_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"month_padded\" ) ) }", - "release_month_padded_sanitized": "{ %sanitize( release_month_padded ) }", - "release_month_reversed": "{ %int( %map_get( %to_date_metadata( release_date ), \"month_reversed\" ) ) }", - "release_month_reversed_padded": "{ %string( %map_get( %to_date_metadata( release_date ), \"month_reversed_padded\" ) ) }", - "release_month_reversed_padded_sanitized": "{ %sanitize( release_month_reversed_padded ) }", - "release_month_reversed_sanitized": "{ %sanitize( release_month_reversed ) }", - "release_month_sanitized": "{ %sanitize( release_month ) }", - "release_year": "{ %int( %map_get( %to_date_metadata( release_date ), \"year\" ) ) }", - "release_year_sanitized": "{ %sanitize( release_year ) }", - "release_year_truncated": "{ %int( %map_get( %to_date_metadata( release_date ), \"year_truncated\" ) ) }", - "release_year_truncated_reversed": "{ %int( %map_get( %to_date_metadata( release_date ), \"year_truncated_reversed\" ) ) }", - "release_year_truncated_reversed_sanitized": "{ %sanitize( release_year_truncated_reversed ) }", - "release_year_truncated_sanitized": "{ %sanitize( release_year_truncated ) }", - "requested_subtitles": "{ { } }", - "requested_subtitles_sanitized": "{ %sanitize( requested_subtitles ) }", - "resolution_assert": "{ %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) }", - "resolution_assert_height_gte": "{ %int(361) }", - "resolution_assert_height_gte_sanitized": "361", - "resolution_assert_ignore_titles": "{ [ ] }", - "resolution_assert_ignore_titles_sanitized": "[]", - "resolution_assert_is_ignored": "{ %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, resolution_assert_ignore_titles ) ) }", - "resolution_assert_is_ignored_sanitized": "{ %sanitize( %print_if_true( %concat( title, \" has a match in resolution_assert_ignore_titles, skipping resolution assert.\" ), %contains_any( title, resolution_assert_ignore_titles ) ) ) }", - "resolution_assert_print": "{ %bool(True) }", - "resolution_assert_print_sanitized": "true", - "resolution_assert_sanitized": "{ %sanitize( %if( %and( enable_resolution_assert, %ne( height, 0 ), %not( resolution_assert_is_ignored ) ), %assert( %gte( height, resolution_assert_height_gte ), %concat( \"Entry \", title, \" downloaded at a low resolution (\", resolution_readable, \"), you've probably been throttled. \", \"Stopping further downloads, wait a few hours and try again. \", \"Disable using the override variable `enable_resolution_assert: False`.\" ) ), \"false is no-op\" ) ) }", - "resolution_readable": "{ width }x{ height }", - "resolution_readable_sanitized": "{ %sanitize( %concat( width, \"x\", height ) ) }", - "s01_name": "", - "s01_name_sanitized": "", - "s01_url": "", - "s01_url_sanitized": "", - "season_directory_name": "Season { upload_year }", - "season_directory_name_sanitized": "{ %sanitize( %concat( \"Season \", upload_year ) ) }", - "season_number": "{ upload_year }", - "season_number_padded": "{ upload_year }", - "season_number_padded_sanitized": "{ %sanitize( upload_year ) }", - "season_number_sanitized": "{ %sanitize( upload_year ) }", - "season_poster_file_name": "{ %sanitize( %concat( \"Season \", upload_year ) ) }/Season{ upload_year }.jpg", - "season_poster_file_name_sanitized": "{ %sanitize( %concat( %sanitize( %concat( \"Season \", upload_year ) ), \"/Season\", upload_year, \".jpg\" ) ) }", - "sibling_metadata": "{ %map_get_non_empty( entry_metadata, \"sibling_metadata\", [ ] ) }", - "sibling_metadata_sanitized": "{ %sanitize( sibling_metadata ) }", - "source_count": "{ %map_get_non_empty( playlist_metadata, \"playlist_count\", 1 ) }", - "source_count_sanitized": "{ %sanitize( source_count ) }", - "source_description": "{ %map_get_non_empty( source_metadata, \"description\", playlist_description ) }", - "source_description_sanitized": "{ %sanitize( source_description ) }", - "source_index": "{ %map_get_non_empty( playlist_metadata, \"playlist_index\", 1 ) }", - "source_index_padded": "{ %pad_zero( source_index, 2 ) }", - "source_index_padded_sanitized": "{ %sanitize( source_index_padded ) }", - "source_index_sanitized": "{ %sanitize( source_index ) }", - "source_metadata": "{ %map_get_non_empty( entry_metadata, \"source_metadata\", { } ) }", - "source_metadata_sanitized": "{ %sanitize( source_metadata ) }", - "source_title": "{ %map_get_non_empty( source_metadata, \"title\", playlist_title ) }", - "source_title_sanitized": "{ %sanitize( source_title ) }", - "source_uid": "{ %map_get_non_empty( source_metadata, \"id\", playlist_uid ) }", - "source_uid_sanitized": "{ %sanitize( source_uid ) }", - "source_uploader": "{ %map_get_non_empty( source_metadata, \"uploader\", playlist_uploader ) }", - "source_uploader_id": "{ %map_get_non_empty( source_metadata, \"uploader_id\", playlist_uploader_id ) }", - "source_uploader_id_sanitized": "{ %sanitize( source_uploader_id ) }", - "source_uploader_sanitized": "{ %sanitize( source_uploader ) }", - "source_uploader_url": "{ %map_get_non_empty( source_metadata, \"uploader_url\", source_webpage_url ) }", - "source_uploader_url_sanitized": "{ %sanitize( source_uploader_url ) }", - "source_webpage_url": "{ %map_get_non_empty( source_metadata, \"webpage_url\", playlist_webpage_url ) }", - "source_webpage_url_sanitized": "{ %sanitize( source_webpage_url ) }", - "sponsorblock_chapters": "{ [ ] }", - "sponsorblock_chapters_sanitized": "{ %sanitize( sponsorblock_chapters ) }", - "subscription_array": "{ [ \"https://www.youtube.com/@novapbs\" ] }", - "subscription_array_sanitized": "[\uff02https\uff1a\u29f8\u29f8www.youtube.com\u29f8@novapbs\uff02]", - "subscription_has_download_archive": "{ %bool(False) }", - "subscription_has_download_archive_sanitized": "false", - "subscription_indent_1": "Documentaries", - "subscription_indent_1_sanitized": "Documentaries", - "subscription_indent_2": "TV-14", - "subscription_indent_2_sanitized": "TV-14", - "subscription_name": "NOVA PBS", - "subscription_name_sanitized": "NOVA PBS", - "subscription_value": "https://www.youtube.com/@novapbs", - "subscription_value_1": "https://www.youtube.com/@novapbs", - "subscription_value_1_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8@novapbs", - "subscription_value_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8@novapbs", - "thumbnail_ext": "jpg", - "thumbnail_ext_sanitized": "jpg", - "thumbnail_file_name": "{ %concat( %sanitize( %concat( \"Season \", upload_year ) ), \"/\", %sanitize( %concat( \"s\", upload_year, \".e\", %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ), \" - \", title_sanitized_plex ) ) ) }-thumb.jpg", - "thumbnail_file_name_sanitized": "{ %sanitize( %concat( %concat( %sanitize( %concat( \"Season \", upload_year ) ), \"/\", %sanitize( %concat( \"s\", upload_year, \".e\", %pad_zero( %int( %concat( upload_month, upload_day_padded, upload_date_index_padded ) ), 6 ), \" - \", title_sanitized_plex ) ) ), \"-thumb.jpg\" ) ) }", - "title": "{ %map_get_non_empty( entry_metadata, \"title\", uid ) }", - "title_sanitized": "{ %sanitize( title ) }", - "title_sanitized_plex": "{ %sanitize_plex_episode( title ) }", - "title_sanitized_plex_sanitized": "{ %sanitize( title_sanitized_plex ) }", - "tv_show_by_date_episode_ordering": "upload-month-day", - "tv_show_by_date_episode_ordering_sanitized": "upload-month-day", - "tv_show_by_date_ordering_pair_validation_": "{ [ %concat( upload_month, upload_day_padded, upload_date_index_padded ), 6 ] }", - "tv_show_by_date_ordering_pair_validation__sanitized": "{ %sanitize( [ %concat( upload_month, upload_day_padded, upload_date_index_padded ), 6 ] ) }", - "tv_show_by_date_season_ordering": "upload-year", - "tv_show_by_date_season_ordering_sanitized": "upload-year", - "tv_show_content_rating": "TV-14", - "tv_show_content_rating_default": "TV-14", - "tv_show_content_rating_default_sanitized": "TV-14", - "tv_show_content_rating_sanitized": "TV-14", - "tv_show_date_range_type": "upload_date", - "tv_show_date_range_type_sanitized": "upload_date", - "tv_show_directory": "tv_show_directory_path", - "tv_show_directory_sanitized": "tv_show_directory_path", - "tv_show_fanart_file_name": "fanart.jpg", - "tv_show_fanart_file_name_sanitized": "fanart.jpg", - "tv_show_genre": "Documentaries", - "tv_show_genre_default": "ytdl-sub", - "tv_show_genre_default_sanitized": "ytdl-sub", - "tv_show_genre_sanitized": "Documentaries", - "tv_show_name": "NOVA PBS", - "tv_show_name_sanitized": "NOVA PBS", - "tv_show_poster_file_name": "poster.jpg", - "tv_show_poster_file_name_sanitized": "poster.jpg", - "uid": "{ %map_get( entry_metadata, \"id\" ) }", - "uid_sanitized": "{ %sanitize( uid ) }", - "uid_sanitized_plex": "{ %sanitize_plex_episode( uid ) }", - "uid_sanitized_plex_sanitized": "{ %sanitize( uid_sanitized_plex ) }", - "upload_date": "{ %map_get_non_empty( entry_metadata, \"upload_date\", epoch_date ) }", - "upload_date_index": "{ %int( 1 ) }", - "upload_date_index_padded": "{ %pad_zero( upload_date_index, 2 ) }", - "upload_date_index_padded_sanitized": "{ %sanitize( upload_date_index_padded ) }", - "upload_date_index_reversed": "{ %sub( 100, upload_date_index ) }", - "upload_date_index_reversed_padded": "{ %pad_zero( upload_date_index_reversed, 2 ) }", - "upload_date_index_reversed_padded_sanitized": "{ %sanitize( upload_date_index_reversed_padded ) }", - "upload_date_index_reversed_sanitized": "{ %sanitize( upload_date_index_reversed ) }", - "upload_date_index_sanitized": "{ %sanitize( upload_date_index ) }", - "upload_date_sanitized": "{ %sanitize( upload_date ) }", - "upload_date_standardized": "{ %string( %map_get( %to_date_metadata( upload_date ), \"date_standardized\" ) ) }", - "upload_date_standardized_sanitized": "{ %sanitize( upload_date_standardized ) }", - "upload_day": "{ %int( %map_get( %to_date_metadata( upload_date ), \"day\" ) ) }", - "upload_day_of_year": "{ %int( %map_get( %to_date_metadata( upload_date ), \"day_of_year\" ) ) }", - "upload_day_of_year_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"day_of_year_padded\" ) ) }", - "upload_day_of_year_padded_sanitized": "{ %sanitize( upload_day_of_year_padded ) }", - "upload_day_of_year_reversed": "{ %int( %map_get( %to_date_metadata( upload_date ), \"day_of_year_reversed\" ) ) }", - "upload_day_of_year_reversed_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"day_of_year_reversed_padded\" ) ) }", - "upload_day_of_year_reversed_padded_sanitized": "{ %sanitize( upload_day_of_year_reversed_padded ) }", - "upload_day_of_year_reversed_sanitized": "{ %sanitize( upload_day_of_year_reversed ) }", - "upload_day_of_year_sanitized": "{ %sanitize( upload_day_of_year ) }", - "upload_day_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"day_padded\" ) ) }", - "upload_day_padded_sanitized": "{ %sanitize( upload_day_padded ) }", - "upload_day_reversed": "{ %int( %map_get( %to_date_metadata( upload_date ), \"day_reversed\" ) ) }", - "upload_day_reversed_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"day_reversed_padded\" ) ) }", - "upload_day_reversed_padded_sanitized": "{ %sanitize( upload_day_reversed_padded ) }", - "upload_day_reversed_sanitized": "{ %sanitize( upload_day_reversed ) }", - "upload_day_sanitized": "{ %sanitize( upload_day ) }", - "upload_month": "{ %int( %map_get( %to_date_metadata( upload_date ), \"month\" ) ) }", - "upload_month_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"month_padded\" ) ) }", - "upload_month_padded_sanitized": "{ %sanitize( upload_month_padded ) }", - "upload_month_reversed": "{ %int( %map_get( %to_date_metadata( upload_date ), \"month_reversed\" ) ) }", - "upload_month_reversed_padded": "{ %string( %map_get( %to_date_metadata( upload_date ), \"month_reversed_padded\" ) ) }", - "upload_month_reversed_padded_sanitized": "{ %sanitize( upload_month_reversed_padded ) }", - "upload_month_reversed_sanitized": "{ %sanitize( upload_month_reversed ) }", - "upload_month_sanitized": "{ %sanitize( upload_month ) }", - "upload_year": "{ %int( %map_get( %to_date_metadata( upload_date ), \"year\" ) ) }", - "upload_year_sanitized": "{ %sanitize( upload_year ) }", - "upload_year_truncated": "{ %int( %map_get( %to_date_metadata( upload_date ), \"year_truncated\" ) ) }", - "upload_year_truncated_reversed": "{ %int( %map_get( %to_date_metadata( upload_date ), \"year_truncated_reversed\" ) ) }", - "upload_year_truncated_reversed_sanitized": "{ %sanitize( upload_year_truncated_reversed ) }", - "upload_year_truncated_sanitized": "{ %sanitize( upload_year_truncated ) }", - "uploader": "{ %map_get_non_empty( entry_metadata, \"uploader\", uploader_id ) }", - "uploader_id": "{ %map_get_non_empty( entry_metadata, \"uploader_id\", uid ) }", - "uploader_id_sanitized": "{ %sanitize( uploader_id ) }", - "uploader_sanitized": "{ %sanitize( uploader ) }", - "uploader_url": "{ %map_get_non_empty( entry_metadata, \"uploader_url\", webpage_url ) }", - "uploader_url_sanitized": "{ %sanitize( uploader_url ) }", - "url": "https://www.youtube.com/@novapbs", - "url10": "", - "url100": "", - "url100_sanitized": "", - "url10_sanitized": "", - "url11": "", - "url11_sanitized": "", - "url12": "", - "url12_sanitized": "", - "url13": "", - "url13_sanitized": "", - "url14": "", - "url14_sanitized": "", - "url15": "", - "url15_sanitized": "", - "url16": "", - "url16_sanitized": "", - "url17": "", - "url17_sanitized": "", - "url18": "", - "url18_sanitized": "", - "url19": "", - "url19_sanitized": "", - "url2": "", - "url20": "", - "url20_sanitized": "", - "url21": "", - "url21_sanitized": "", - "url22": "", - "url22_sanitized": "", - "url23": "", - "url23_sanitized": "", - "url24": "", - "url24_sanitized": "", - "url25": "", - "url25_sanitized": "", - "url26": "", - "url26_sanitized": "", - "url27": "", - "url27_sanitized": "", - "url28": "", - "url28_sanitized": "", - "url29": "", - "url29_sanitized": "", - "url2_sanitized": "", - "url3": "", - "url30": "", - "url30_sanitized": "", - "url31": "", - "url31_sanitized": "", - "url32": "", - "url32_sanitized": "", - "url33": "", - "url33_sanitized": "", - "url34": "", - "url34_sanitized": "", - "url35": "", - "url35_sanitized": "", - "url36": "", - "url36_sanitized": "", - "url37": "", - "url37_sanitized": "", - "url38": "", - "url38_sanitized": "", - "url39": "", - "url39_sanitized": "", - "url3_sanitized": "", - "url4": "", - "url40": "", - "url40_sanitized": "", - "url41": "", - "url41_sanitized": "", - "url42": "", - "url42_sanitized": "", - "url43": "", - "url43_sanitized": "", - "url44": "", - "url44_sanitized": "", - "url45": "", - "url45_sanitized": "", - "url46": "", - "url46_sanitized": "", - "url47": "", - "url47_sanitized": "", - "url48": "", - "url48_sanitized": "", - "url49": "", - "url49_sanitized": "", - "url4_sanitized": "", - "url5": "", - "url50": "", - "url50_sanitized": "", - "url51": "", - "url51_sanitized": "", - "url52": "", - "url52_sanitized": "", - "url53": "", - "url53_sanitized": "", - "url54": "", - "url54_sanitized": "", - "url55": "", - "url55_sanitized": "", - "url56": "", - "url56_sanitized": "", - "url57": "", - "url57_sanitized": "", - "url58": "", - "url58_sanitized": "", - "url59": "", - "url59_sanitized": "", - "url5_sanitized": "", - "url6": "", - "url60": "", - "url60_sanitized": "", - "url61": "", - "url61_sanitized": "", - "url62": "", - "url62_sanitized": "", - "url63": "", - "url63_sanitized": "", - "url64": "", - "url64_sanitized": "", - "url65": "", - "url65_sanitized": "", - "url66": "", - "url66_sanitized": "", - "url67": "", - "url67_sanitized": "", - "url68": "", - "url68_sanitized": "", - "url69": "", - "url69_sanitized": "", - "url6_sanitized": "", - "url7": "", - "url70": "", - "url70_sanitized": "", - "url71": "", - "url71_sanitized": "", - "url72": "", - "url72_sanitized": "", - "url73": "", - "url73_sanitized": "", - "url74": "", - "url74_sanitized": "", - "url75": "", - "url75_sanitized": "", - "url76": "", - "url76_sanitized": "", - "url77": "", - "url77_sanitized": "", - "url78": "", - "url78_sanitized": "", - "url79": "", - "url79_sanitized": "", - "url7_sanitized": "", - "url8": "", - "url80": "", - "url80_sanitized": "", - "url81": "", - "url81_sanitized": "", - "url82": "", - "url82_sanitized": "", - "url83": "", - "url83_sanitized": "", - "url84": "", - "url84_sanitized": "", - "url85": "", - "url85_sanitized": "", - "url86": "", - "url86_sanitized": "", - "url87": "", - "url87_sanitized": "", - "url88": "", - "url88_sanitized": "", - "url89": "", - "url89_sanitized": "", - "url8_sanitized": "", - "url9": "", - "url90": "", - "url90_sanitized": "", - "url91": "", - "url91_sanitized": "", - "url92": "", - "url92_sanitized": "", - "url93": "", - "url93_sanitized": "", - "url94": "", - "url94_sanitized": "", - "url95": "", - "url95_sanitized": "", - "url96": "", - "url96_sanitized": "", - "url97": "", - "url97_sanitized": "", - "url98": "", - "url98_sanitized": "", - "url99": "", - "url99_sanitized": "", - "url9_sanitized": "", - "url_sanitized": "https\uff1a\u29f8\u29f8www.youtube.com\u29f8@novapbs", - "urls": "{ [ \"https://www.youtube.com/@novapbs\" ] }", - "urls_sanitized": "[\uff02https\uff1a\u29f8\u29f8www.youtube.com\u29f8@novapbs\uff02]", - "webpage_url": "{ %map_get( entry_metadata, \"webpage_url\" ) }", - "webpage_url_sanitized": "{ %sanitize( webpage_url ) }", - "width": "{ %map_get_non_empty( entry_metadata, \"width\", 0 ) }", - "width_sanitized": "{ %sanitize( width ) }", - "ytdl_sub_chapters_from_comments": "{ %throw( \"Plugin variable ytdl_sub_chapters_from_comments has not been created yet\" ) }", - "ytdl_sub_chapters_from_comments_sanitized": "{ %sanitize( ytdl_sub_chapters_from_comments ) }", - "ytdl_sub_entry_date_eval": "{ %string( upload_date_standardized ) }", - "ytdl_sub_entry_date_eval_sanitized": "{ %sanitize( ytdl_sub_entry_date_eval ) }", - "ytdl_sub_input_url": "{ %string( '' ) }", - "ytdl_sub_input_url_count": "{ %int( 0 ) }", - "ytdl_sub_input_url_count_sanitized": "{ %sanitize( ytdl_sub_input_url_count ) }", - "ytdl_sub_input_url_index": "{ %int( -1 ) }", - "ytdl_sub_input_url_index_sanitized": "{ %sanitize( ytdl_sub_input_url_index ) }", - "ytdl_sub_input_url_sanitized": "{ %sanitize( ytdl_sub_input_url ) }" -} \ No newline at end of file diff --git a/tests/unit/config/test_subscription.py b/tests/unit/config/test_subscription.py index 930708ed..719ac9f4 100644 --- a/tests/unit/config/test_subscription.py +++ b/tests/unit/config/test_subscription.py @@ -8,6 +8,7 @@ import pytest import yaml from ytdl_sub.config.config_file import ConfigFile +from ytdl_sub.config.validators.variable_validation import ResolutionLevel from ytdl_sub.entries.script.variable_definitions import VARIABLES from ytdl_sub.plugins.nfo_tags import NfoTagsOptions from ytdl_sub.subscriptions.subscription import Subscription @@ -521,69 +522,3 @@ def test_music_video_subscriptions(default_config: ConfigFile, music_video_subsc assert gnr_urls[0] == "https://www.youtube.com/playlist?list=PLOTK54q5K4INNXaHKtmXYr6J7CajWjqeJ" assert gnr.get("subscription_indent_1").native == "Rock" assert gnr_urls[1] == "https://www.youtube.com/watch?v=OldpIhHPsbs" - - -def test_default_docker_config_and_subscriptions( - docker_default_subscription_path: Path, output_directory: str -): - default_config = ConfigFile.from_file_path("docker/root/defaults/config.yaml") - default_subs = Subscription.from_file_path( - config=default_config, subscription_path=docker_default_subscription_path - ) - assert len(default_subs) == 1 - - resolved_yaml_as_json = yaml.safe_load(default_subs[0].resolved_yaml()) - - # Since this creates random values, ignore it for this test - assert "throttle_protection" in resolved_yaml_as_json - del resolved_yaml_as_json["throttle_protection"] - - assert resolved_yaml_as_json == { - "chapters": { - "allow_chapters_from_comments": False, - "embed_chapters": True, - "enable": "True", - "force_key_frames": False, - }, - "date_range": {"breaks": "True", "enable": "True", "type": "upload_date"}, - "download": [ - { - "download_reverse": "True", - "include_sibling_metadata": False, - "playlist_thumbnails": [ - {"name": "{avatar_uncropped_thumbnail_file_name}", "uid": "avatar_uncropped"}, - {"name": "{banner_uncropped_thumbnail_file_name}", "uid": "banner_uncropped"}, - ], - "source_thumbnails": [ - {"name": "{avatar_uncropped_thumbnail_file_name}", "uid": "avatar_uncropped"}, - {"name": "{banner_uncropped_thumbnail_file_name}", "uid": "banner_uncropped"}, - ], - "url": "https://www.youtube.com/@novapbs", - "variables": {}, - "webpage_url": "{modified_webpage_url}", - "ytdl_options": {}, - } - ], - "file_convert": {"convert_to": "mp4", "convert_with": "yt-dlp", "enable": "True"}, - "format": "(bv*[ext=mp4][vcodec~='^((he|a)vc|h26[45])']+ba[ext=m4a]) / (bv[ext=mp4]*+ba[ext=m4a]/b)", - "output_options": { - "download_archive_name": ".ytdl-sub-NOVA PBS-download-archive.json", - "file_name": "{episode_file_path}.{ext}", - "info_json_name": "{episode_file_path}.{info_json_ext}", - "keep_files_date_eval": "{episode_date_standardized}", - "maintain_download_archive": True, - "output_directory": f"{output_directory}/NOVA PBS", - "preserve_mtime": False, - "thumbnail_name": "{thumbnail_file_name}", - }, - "video_tags": { - "contentRating": "{episode_content_rating}", - "date": "{episode_date_standardized}", - "episode_id": "{episode_number}", - "genre": "{tv_show_genre}", - "show": "{tv_show_name}", - "synopsis": "{episode_plot}", - "title": "{episode_title}", - "year": "{episode_year}", - }, - } diff --git a/tests/unit/config/test_subscription_partial_resolve.py b/tests/unit/config/test_subscription_partial_resolve.py deleted file mode 100644 index 0a901fec..00000000 --- a/tests/unit/config/test_subscription_partial_resolve.py +++ /dev/null @@ -1,118 +0,0 @@ -from pathlib import Path - -from resources import expected_json - -from ytdl_sub.config.config_file import ConfigFile -from ytdl_sub.entries.script.variable_definitions import VARIABLES -from ytdl_sub.subscriptions.subscription import Subscription -from ytdl_sub.utils.script import ScriptUtils - - -def _ensure_partial_resolve( - sub: Subscription, preset_type: str, should_fully_resolve: bool -) -> None: - unresolvable = sub.plugins.get_all_variables( - additional_options=[sub.downloader_options, sub.output_options] - ) - unresolvable.add("entry_metadata") - unresolvable.add("sibling_metadata") - - if not should_fully_resolve: - unresolvable.update(VARIABLES.scripts().keys()) - - script = sub.overrides.script.add( - { - f"{preset_type}_directory": "tv_show_directory_path", - f"{preset_type}_directory_sanitized": "tv_show_directory_path", - } - ) - partial_script = script.resolve_partial(unresolvable=unresolvable) - - # Assert only overrides - out = { - name: ScriptUtils.to_native_script(partial_script._variables[name]) - for name in sub.overrides.keys - if not name.startswith("%") - } - - expected_out_filename = f"{preset_type}/inspect_overrides.json" - if should_fully_resolve: - expected_out_filename = f"{preset_type}/inspect_full_overrides.json" - - assert out == expected_json(out, expected_out_filename) - - # Assert all variables - out = { - name: ScriptUtils.to_native_script(partial_script._variables[name]) - for name in partial_script.variable_names - } - - expected_out_filename = f"{preset_type}/inspect_variables.json" - if should_fully_resolve: - expected_out_filename = f"{preset_type}/inspect_full_variables.json" - - assert out == expected_json(out, expected_out_filename) - - -def test_partial_resolve_tv_show(config_file: ConfigFile, tv_show_subscriptions_path: Path): - _ensure_partial_resolve( - sub=Subscription.from_file_path( - config=config_file, subscription_path=tv_show_subscriptions_path - )[0], - preset_type="tv_show", - should_fully_resolve=True, - ) - - -def test_partial_resolve_tv_show_full(config_file: ConfigFile, tv_show_subscriptions_path: Path): - _ensure_partial_resolve( - sub=Subscription.from_file_path( - config=config_file, subscription_path=tv_show_subscriptions_path - )[0], - preset_type="tv_show", - should_fully_resolve=False, - ) - - -def test_partial_resolve_music(default_config: ConfigFile, music_subscriptions_path: Path): - _ensure_partial_resolve( - sub=Subscription.from_file_path( - config=default_config, subscription_path=music_subscriptions_path - )[0], - preset_type="music", - should_fully_resolve=True, - ) - - -def test_partial_resolve_music_full(default_config: ConfigFile, music_subscriptions_path: Path): - _ensure_partial_resolve( - sub=Subscription.from_file_path( - config=default_config, subscription_path=music_subscriptions_path - )[0], - preset_type="music", - should_fully_resolve=False, - ) - - -def test_partial_resolve_music_video( - default_config: ConfigFile, music_video_subscription_path: Path -): - _ensure_partial_resolve( - sub=Subscription.from_file_path( - config=default_config, subscription_path=music_video_subscription_path - )[0], - preset_type="music_video", - should_fully_resolve=False, - ) - - -def test_partial_resolve_music_video_full( - default_config: ConfigFile, music_video_subscription_path: Path -): - _ensure_partial_resolve( - sub=Subscription.from_file_path( - config=default_config, subscription_path=music_video_subscription_path - )[0], - preset_type="music_video", - should_fully_resolve=True, - ) diff --git a/tests/unit/config/test_subscription_resolution.py b/tests/unit/config/test_subscription_resolution.py new file mode 100644 index 00000000..bfa04d16 --- /dev/null +++ b/tests/unit/config/test_subscription_resolution.py @@ -0,0 +1,92 @@ +from pathlib import Path + +import pytest +import yaml +from resources import expected_json + +from ytdl_sub.config.config_file import ConfigFile +from ytdl_sub.config.validators.variable_validation import ResolutionLevel +from ytdl_sub.subscriptions.subscription import Subscription +from ytdl_sub.utils.file_path import FilePathTruncater + + +def _ensure_resolved_yaml( + sub: Subscription, output_directory: str, preset_type: str, resolution_level: int +) -> None: + output_yaml = sub.resolved_yaml(resolution_level=resolution_level) + out = yaml.safe_load(output_yaml) + + expected_out_filename = ( + f"{preset_type}/inspect_sub_{ResolutionLevel.name_of(resolution_level)}.json" + ) + expected_out = expected_json(out, expected_out_filename) + + if resolution_level > ResolutionLevel.ORIGINAL: + output_path = Path(output_directory) + if "tv_show_directory" in expected_out["overrides"]: + output_path = output_path / sub.name + + expected_out["output_options"]["output_directory"] = FilePathTruncater.to_native_filepath( + str(output_path) + ) + + if "tv_show_directory" in expected_out["overrides"]: + expected_out["overrides"]["tv_show_directory"] = output_directory + if "music_directory" in expected_out["overrides"]: + expected_out["overrides"]["music_directory"] = output_directory + if "music_video_directory" in expected_out["overrides"]: + expected_out["overrides"]["music_video_directory"] = output_directory + + assert out == expected_out + + +@pytest.mark.parametrize("resolution_level", ResolutionLevel.all()) +class TestResolution: + + def test_resolution_tv_show( + self, + resolution_level: int, + default_config: ConfigFile, + tv_show_subscriptions_path: Path, + output_directory: str, + ): + _ensure_resolved_yaml( + sub=Subscription.from_file_path( + config=default_config, subscription_path=tv_show_subscriptions_path + )[0], + output_directory=output_directory, + preset_type="tv_show", + resolution_level=resolution_level, + ) + + def test_resolution_music( + self, + resolution_level: int, + default_config: ConfigFile, + music_subscriptions_path: Path, + output_directory: str, + ): + _ensure_resolved_yaml( + sub=Subscription.from_file_path( + config=default_config, subscription_path=music_subscriptions_path + )[0], + output_directory=output_directory, + preset_type="music", + resolution_level=resolution_level, + ) + + def test_resolution_music_video( + self, + resolution_level: int, + default_config: ConfigFile, + music_video_subscription_path: Path, + output_directory: str, + ): + _ensure_resolved_yaml( + sub=Subscription.from_file_path( + config=default_config, subscription_path=music_video_subscription_path + )[0], + output_directory=output_directory, + preset_type="music_video", + resolution_level=resolution_level, + ) diff --git a/tests/unit/prebuilt_presets/test_tv_show_by_date.py b/tests/unit/prebuilt_presets/test_tv_show_by_date.py index 115a2a61..2b21e050 100644 --- a/tests/unit/prebuilt_presets/test_tv_show_by_date.py +++ b/tests/unit/prebuilt_presets/test_tv_show_by_date.py @@ -1,6 +1,7 @@ import re import pytest +import yaml from ytdl_sub.script.utils.exceptions import UserThrownRuntimeError from ytdl_sub.subscriptions.subscription import Subscription @@ -25,57 +26,67 @@ class TestTvShowByDatePreset: }, ) - def test_backward_compatibility_single(self, default_config): - a = Subscription.from_dict( - config=default_config, - preset_name="a", - preset_dict={ - "preset": "Jellyfin TV Show by Date", - "overrides": {"tv_show_directory": "abc", "url": "test_1"}, - }, - ) - - b = Subscription.from_dict( - config=default_config, - preset_name="a", - preset_dict={ - "preset": "Jellyfin TV Show by Date", - "overrides": {"tv_show_directory": "abc", "subscription_value": "test_1"}, - }, - ) - - assert a.resolved_yaml() == b.resolved_yaml() - - def test_backward_compatibility_multi(self, default_config): - a = Subscription.from_dict( - config=default_config, - preset_name="a", - preset_dict={ - "preset": "Jellyfin TV Show by Date", - "overrides": {"tv_show_directory": "abc", "url": "test_1", "url2": "test_2"}, - }, - ) - - b = Subscription.from_dict( - config=default_config, - preset_name="a", - preset_dict={ - "preset": "Jellyfin TV Show by Date", - "overrides": { - "tv_show_directory": "abc", - "subscription_array": ["test_1", "test_2"], + def test_backward_compatibility_single_download(self, default_config): + a = yaml.safe_load( + Subscription.from_dict( + config=default_config, + preset_name="a", + preset_dict={ + "preset": "Jellyfin TV Show by Date", + "overrides": {"tv_show_directory": "abc", "url": "test_1"}, }, - }, + ).resolved_yaml() ) - c = Subscription.from_dict( - config=default_config, - preset_name="a", - preset_dict={ - "preset": "Jellyfin TV Show by Date", - "overrides": {"tv_show_directory": "abc", "urls": ["test_1", "test_2"]}, - }, + b = yaml.safe_load( + Subscription.from_dict( + config=default_config, + preset_name="a", + preset_dict={ + "preset": "Jellyfin TV Show by Date", + "overrides": {"tv_show_directory": "abc", "subscription_value": "test_1"}, + }, + ).resolved_yaml() ) - assert a.resolved_yaml() == b.resolved_yaml() - assert a.resolved_yaml() == c.resolved_yaml() + assert a["download"] == b["download"] + + def test_backward_compatibility_multi_download(self, default_config): + a = yaml.safe_load( + Subscription.from_dict( + config=default_config, + preset_name="a", + preset_dict={ + "preset": "Jellyfin TV Show by Date", + "overrides": {"tv_show_directory": "abc", "url": "test_1", "url2": "test_2"}, + }, + ).resolved_yaml() + ) + + b = yaml.safe_load( + Subscription.from_dict( + config=default_config, + preset_name="a", + preset_dict={ + "preset": "Jellyfin TV Show by Date", + "overrides": { + "tv_show_directory": "abc", + "subscription_array": ["test_1", "test_2"], + }, + }, + ).resolved_yaml() + ) + + c = yaml.safe_load( + Subscription.from_dict( + config=default_config, + preset_name="a", + preset_dict={ + "preset": "Jellyfin TV Show by Date", + "overrides": {"tv_show_directory": "abc", "urls": ["test_1", "test_2"]}, + }, + ).resolved_yaml() + ) + + assert a["download"] == b["download"] + assert a["download"] == c["download"] diff --git a/tests/unit/script/functions/test_conditional_functions.py b/tests/unit/script/functions/test_conditional_functions.py index eff73214..d2078a80 100644 --- a/tests/unit/script/functions/test_conditional_functions.py +++ b/tests/unit/script/functions/test_conditional_functions.py @@ -3,6 +3,9 @@ import re import pytest from unit.script.conftest import single_variable_output +from ytdl_sub.script.script import Script +from ytdl_sub.script.types.syntax_tree import SyntaxTree +from ytdl_sub.script.types.variable import Variable from ytdl_sub.script.utils.exceptions import FunctionRuntimeException @@ -135,3 +138,29 @@ class TestConditionalFunction: ): output = single_variable_output(function_str) assert output == expected_output + + def test_if_partial_resolve(self): + assert ( + Script( + { + "aa": "a", + "bb": "unresolvable!", + "cc": "{%if( true, aa, bb )}", + } + ) + .resolve_partial(unresolvable={"bb"}) + .get("cc") + .native + == "a" + ) + + def test_if_partial_resolve_unresolved(self): + assert Script( + { + "aa": "a", + "bb": "unresolvable!", + "cc": "{%if( false, aa, bb )}", + } + ).resolve_partial(unresolvable={"bb"}).definition_of("cc") == SyntaxTree( + ast=[Variable("bb")] + ) diff --git a/tests/unit/script/types/test_array.py b/tests/unit/script/types/test_array.py index f816b1bd..312ec325 100644 --- a/tests/unit/script/types/test_array.py +++ b/tests/unit/script/types/test_array.py @@ -10,6 +10,8 @@ from ytdl_sub.script.script_output import ScriptOutput from ytdl_sub.script.types.array import Array from ytdl_sub.script.types.resolvable import Float from ytdl_sub.script.types.resolvable import String +from ytdl_sub.script.types.syntax_tree import SyntaxTree +from ytdl_sub.script.types.variable import Variable from ytdl_sub.script.utils.exceptions import InvalidSyntaxException @@ -117,3 +119,29 @@ class TestArray: ).resolve() == ScriptOutput( {"aa": String("a"), "bb": String("b"), "cc": String('return ["a", "b"]')} ) + + def test_partial_resolve(self): + assert ( + Script( + { + "aa": "a", + "bb": "unresolvable!", + "cc": "{%array_at( [aa, bb], 0 )}", + } + ) + .resolve_partial(unresolvable={"bb"}) + .get("cc") + .native + == "a" + ) + + def test_partial_resolve_unresolved(self): + assert Script( + { + "aa": "a", + "bb": "unresolvable!", + "cc": "{%array_at( [aa, bb], 1 )}", + } + ).resolve_partial(unresolvable={"bb"}).definition_of("cc") == SyntaxTree( + ast=[Variable("bb")] + ) diff --git a/tests/unit/script/types/test_custom_function.py b/tests/unit/script/types/test_custom_function.py index 61096cc3..17919cc0 100644 --- a/tests/unit/script/types/test_custom_function.py +++ b/tests/unit/script/types/test_custom_function.py @@ -5,7 +5,9 @@ import pytest from ytdl_sub.script.parser import CUSTOM_FUNCTION_ARGUMENTS_ONLY_ARGS from ytdl_sub.script.script import Script from ytdl_sub.script.script_output import ScriptOutput +from ytdl_sub.script.types.function import CustomFunction from ytdl_sub.script.types.resolvable import Integer +from ytdl_sub.script.types.syntax_tree import SyntaxTree from ytdl_sub.script.utils.exceptions import CycleDetected from ytdl_sub.script.utils.exceptions import FunctionDoesNotExist from ytdl_sub.script.utils.exceptions import InvalidCustomFunctionArgumentName @@ -251,3 +253,30 @@ class TestCustomFunction: "output": "{%mul(%func1(1), 1)}", } ) + + def test_partial_resolve_custom_functions_any_order_via_init(self): + assert ( + Script( + { + "%custom_cubed": "{%mul(%custom_square($0),$0)}", + "%custom_square": "{%mul($0, $0)}", + "output": "{%custom_cubed(3)}", + } + ) + .resolve_partial() + .get("output") + .native + == 27 + ) + + def test_partial_resolve_unresolved(self): + assert Script( + { + "aa": "nope", + "%custom_cubed": "{%mul(%custom_square($0),$0)}", + "%custom_square": "{%mul($0, aa)}", + "output": "{%custom_cubed(3)}", + } + ).resolve_partial(unresolvable={"aa"}).definition_of("output") == SyntaxTree( + ast=[CustomFunction(name="custom_cubed", args=[Integer(3)])] + ) diff --git a/tests/unit/script/types/test_lambda_function.py b/tests/unit/script/types/test_lambda_function.py index cd054811..0474a1d3 100644 --- a/tests/unit/script/types/test_lambda_function.py +++ b/tests/unit/script/types/test_lambda_function.py @@ -177,3 +177,20 @@ class TestLambdaFunctionIncompatibleNumArguments: match=re.escape("Cycle detected within these variables: two -> %times_two -> two"), ): Script({"%times_two": "{%mul($0, two)}", "two": "{%times_two(2)}"}) + + def test_partial_resolve_nested_lambda_custom_functions_within_custom_functions(self): + assert ( + Script( + { + "%nest4": "{%mul($0, 2)}", + "%nest3": "{%array_at(%array_apply([$0], %nest4), 0)}", + "%nest2": "{%array_at(%array_apply([$0], %nest3), 0)}", + "%nest1": "{%array_at(%array_apply([$0], %nest2), 0)}", + "output": "{%array_at(%array_apply([2], %nest1), 0)}", + } + ) + .resolve_partial() + .get("output") + .native + == 4 + )