mirror of
https://gitgud.io/Melon__Bread/auto-ttv-grabber.git
synced 2024-11-28 10:18:21 -05:00
Now actually read the config file. 😅
This commit is contained in:
parent
d3a222e27b
commit
5772f1be4b
14
main.py
14
main.py
@ -25,22 +25,16 @@ def load_config() -> None:
|
|||||||
print("Reading config file...")
|
print("Reading config file...")
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read("config.ini")
|
config.read("config.ini")
|
||||||
if (
|
if config.has_option("settings", "streamlink_location"):
|
||||||
config.has_option("settings", "streamlink_location")
|
|
||||||
and not config["settings"]["streamlink_location"].strip()
|
|
||||||
):
|
|
||||||
streamlink_location = config["settings"]["streamlink_location"]
|
streamlink_location = config["settings"]["streamlink_location"]
|
||||||
print(f"Streamlink location: {streamlink_location}")
|
print(f"Streamlink location: {streamlink_location}")
|
||||||
if (
|
if config.has_option("settings", "download_location"):
|
||||||
config.has_option("settings", "download_location")
|
|
||||||
and not config["settings"]["download_location"].strip()
|
|
||||||
):
|
|
||||||
download_location = config["settings"]["download_location"]
|
download_location = config["settings"]["download_location"]
|
||||||
print(f"Download location: {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"])
|
skip_ads = bool(config["settings"]["skip_ads"])
|
||||||
print(f"Skip ads: {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"])
|
log = bool(config["settings"]["log"])
|
||||||
print(f"Logs: {log}")
|
print(f"Logs: {log}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user