From 5772f1be4b94b460e77be5fcfa0d43b5d61b7adc Mon Sep 17 00:00:00 2001 From: Melon Bread Date: Wed, 10 Apr 2024 16:49:00 -0400 Subject: [PATCH] =?UTF-8?q?Now=20actually=20read=20the=20config=20file.=20?= =?UTF-8?q?=F0=9F=98=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/main.py b/main.py index 3819cd4..a5f250b 100755 --- a/main.py +++ b/main.py @@ -25,22 +25,16 @@ def load_config() -> None: print("Reading config file...") config = configparser.ConfigParser() config.read("config.ini") - if ( - config.has_option("settings", "streamlink_location") - and not config["settings"]["streamlink_location"].strip() - ): + if config.has_option("settings", "streamlink_location"): streamlink_location = config["settings"]["streamlink_location"] print(f"Streamlink location: {streamlink_location}") - if ( - config.has_option("settings", "download_location") - and not config["settings"]["download_location"].strip() - ): + if config.has_option("settings", "download_location"): download_location = config["settings"]["download_location"] print(f"Download location: {download_location}") - if config.has_option("settings", "skip_ads") and not config["settings"]["skip_ads"]: + if config.has_option("settings", "skip_ads"): skip_ads = bool(config["settings"]["skip_ads"]) print(f"Skip ads: {skip_ads}") - if config.has_option("settings", "log") and not config["settings"]["log"]: + if config.has_option("settings", "log"): log = bool(config["settings"]["log"]) print(f"Logs: {log}")