From 0c0f21d814f9d1cf971ab05f5acd352a145d4500 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 22 Apr 2022 15:09:41 +0100 Subject: [PATCH] Preferred podcast formats can be loaded from config --- epicyon.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/epicyon.py b/epicyon.py index 16f584f7a..81bc08951 100644 --- a/epicyon.py +++ b/epicyon.py @@ -1142,9 +1142,16 @@ if args.domain: domain = args.domain set_config_param(base_dir, 'domain', domain) +# comma separated list of preferred audio formats. eg. "opus", "mp3" preferred_podcast_formats = None if args.podcast_formats: - podcast_formats = args.podcast_formats.split(',') + podcast_formats_str = args.podcast_formats +else: + podcast_formats_str = \ + get_config_param(base_dir, 'preferred_podcast_formats') +if podcast_formats_str: + podcast_formats = podcast_formats_str.split(',') + preferred_podcast_formats = [] for pod_format in podcast_formats: pod_format = pod_format.lower().strip() if '/' not in pod_format: