From 320bdfaa92efd960bb98f88b90be5a4fd0966b11 Mon Sep 17 00:00:00 2001 From: efrick Date: Wed, 16 Oct 2024 11:52:39 -0400 Subject: [PATCH] Impiment set_conf. This function updates the config file being used by the script. --- get_artist_art.py | 1 + prog_conf.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/get_artist_art.py b/get_artist_art.py index b2d9e81..e05907a 100755 --- a/get_artist_art.py +++ b/get_artist_art.py @@ -15,6 +15,7 @@ option_set.add_argument('--version', '-v', action='version', version=jls_extract cmd_options = option_set.parse_args() config = gaa_conf().conf +config = gaa_conf.set_conf(config, "./config_wrong.ini") music_path = config['music']['dir'] ftv_api_key = config['fanart_tv']['api_key'] diff --git a/prog_conf.py b/prog_conf.py index a6a650b..731ab10 100644 --- a/prog_conf.py +++ b/prog_conf.py @@ -14,3 +14,6 @@ class gaa_conf: def get(): return gaa_conf + def set_conf(self, conf_path): + self.read(conf_path) + return self