Skip to content

Config API

Auto-generated reference for the Config object that models the unshackle configuration file. For a human-friendly walkthrough of every config key, see the Configuration Reference.

Config

Config(**kwargs)

validate_output_templates

validate_output_templates()

Validate output template configurations and warn about potential issues.

get_folder_template

get_folder_template(kind)

Find the folder template for the given title kind.

kind: one of "movies", "series", "songs", "albums". Falls back to the legacy single-string folder template, then "".

get_template_separator

get_template_separator(template_type='movies')

Get the filename separator for the given template type.

Analyzes the active template to determine whether it uses dots or spaces between variables. Falls back to dot separator (scene-style) by default.

Parameters:

Name Type Description Default
template_type str

One of "movies", "series", or "songs".

'movies'

restore_bool_languages

restore_bool_languages(data)

Put back the language tags no and yes, which YAML reads as booleans.

resolve_decryption

resolve_decryption(decryption_map, default, service)

Pick the decryption backend for a service (case-insensitive), falling back to default.

resolve_cdm_name

resolve_cdm_name(cdm, service, override=None)

Find a service's top-level CDM entry (case-insensitive), with default fallback.

cdm_entry_names_device

cdm_entry_names_device(entry, profile=None)

Whether a per-service cdm entry names a device when no quality is known.

An entry that selects only by quality, or by a different profile, names none.

duplicate_key_lines

duplicate_key_lines(root)

Return (first line, repeat line), counted from 1, for each repeated scalar key in a PyYAML or ruamel node tree.

Keys compare as written, so two spellings that load as the same key (yes and true, 1 and 0x1) are not found.

duplicate_key_message

duplicate_key_message(name, pairs, line=0)

Say where a file repeats a key: each (first, repeat) pair, or line when no pair is known.

load_yaml

load_yaml(path)

yaml.safe_load a file, and warn with the lines of each duplicate key, which PyYAML takes silently.

get_config_path

get_config_path()

Get Path to Config from any one of the possible locations.

Returns None if no config file could be found.