mirror of
https://github.com/jarulsamy/Plex-Bot.git
synced 2024-08-19 15:01:55 +02:00
allow lyrics section in yml file to be missing
This commit is contained in:
parent
6521e7e26c
commit
bcbce98d91
@ -56,7 +56,7 @@ def load_config(filename: str) -> Dict[str, str]:
|
||||
config["plex"]["log_level"] = levels[config["plex"]["log_level"].upper()]
|
||||
config["discord"]["log_level"] = levels[config["discord"]["log_level"].upper()]
|
||||
|
||||
if config["lyrics"]["token"].lower() == "none":
|
||||
config["lyrics"]["token"] = None
|
||||
if config["lyrics"] and config["lyrics"]["token"].lower() == "none":
|
||||
config["lyrics"] = None
|
||||
|
||||
return config
|
||||
|
@ -20,8 +20,11 @@ BASE_URL = config["plex"]["base_url"]
|
||||
PLEX_TOKEN = config["plex"]["token"]
|
||||
LIBRARY_NAME = config["plex"]["library_name"]
|
||||
|
||||
LYRICS_TOKEN = config["lyrics"]["token"]
|
||||
|
||||
if config["lyrics"]:
|
||||
LYRICS_TOKEN = config["lyrics"]["token"]
|
||||
else:
|
||||
LYRICS_TOKEN = None
|
||||
|
||||
# Set appropiate log level
|
||||
root_log = logging.getLogger()
|
||||
plex_log = logging.getLogger("Plex")
|
||||
|
Loading…
Reference in New Issue
Block a user