Prepare sane config defaults

This commit is contained in:
hygienic-books 2022-03-23 13:11:09 +01:00
parent 834563bae1
commit a47faa90b9
2 changed files with 11 additions and 3 deletions

View File

@ -8,9 +8,13 @@ do_seasons = yes
[maus] [maus]
watch_dir = /var/lib/kodi-nfo-feeder/watch watch_dir = /var/lib/kodi-nfo-feeder/watch
output_dir = /var/lib/kodi-nfo-feeder/output output_dir = /var/lib/kodi-nfo-feeder/output
title_regex_search = (\w)-(\s) title_regex_search =
title_regex_replace = \1 -\2 title_regex_replace =
do_seasons = yes do_seasons = yes
run_cmd =
kodi_jsonrpc_address = http://localhost:8080/jsonrpc
kodi_jsonrpc_username =
kodi_jsonrpc_password =
[otto] [otto]
watch_dir = /var/lib/kodi-nfo-feeder/test/watch watch_dir = /var/lib/kodi-nfo-feeder/test/watch

View File

@ -41,7 +41,11 @@ class CONST(object):
{"key": "output_dir", "is_mandatory": True}, {"key": "output_dir", "is_mandatory": True},
{"key": "title_regex_search", "is_mandatory": False}, {"key": "title_regex_search", "is_mandatory": False},
{"key": "title_regex_replace", "is_mandatory": False}, {"key": "title_regex_replace", "is_mandatory": False},
{"key": "do_seasons", "is_mandatory": False} {"key": "do_seasons", "is_mandatory": False},
{"key": "run_cmd", "is_mandatory": False},
{"key": "kodi_jsonrpc_address", "is_mandatory": False},
{"key": "kodi_jsonrpc_username", "is_mandatory": False},
{"key": "kodi_jsonrpc_password", "is_mandatory": False}
] ]
CFG_MANDATORY = [section_cfg["key"] for section_cfg in CFG_KNOWN_SECTION if section_cfg["is_mandatory"]] CFG_MANDATORY = [section_cfg["key"] for section_cfg in CFG_KNOWN_SECTION if section_cfg["is_mandatory"]]