Ensure nonetype list args become empty lists

Prevents a potential bug like in #23
This commit is contained in:
Joshua M. Boniface 2022-07-24 12:27:11 -04:00
parent 0100731b54
commit 53290d7344

View file

@ -120,11 +120,15 @@ def load_config():
config["remote_args"] = config_remote.get(
"args", ["-i", "/var/lib/jellyfin/.ssh/id_rsa"]
)
if config["remote_args"] is None:
config["remote_args"] = []
config["persist_time"] = config_remote.get("persist", 300)
# Parse the keys from the commands group
config["ssh_command"] = config_commands.get("ssh", "/usr/bin/ssh")
config["pre_commands"] = config_commands.get("pre", [])
if config["pre_commands"] is None:
config["pre_commands"] = []
config["ffmpeg_command"] = config_commands.get(
"ffmpeg", "/usr/lib/jellyfin-ffmpeg/ffmpeg"
)