diff --git a/modules/config.py b/modules/config.py index e8e8477f..6596be07 100644 --- a/modules/config.py +++ b/modules/config.py @@ -40,12 +40,12 @@ class Config: logger.info(f"Using {self.config_path} as config") self.default_dir = default_dir - self.test_mode = attrs["test"] + self.test_mode = attrs["test"] if "test" in attrs else False self.run_start_time = attrs["time"] self.run_hour = datetime.strptime(attrs["time"], "%H:%M").hour - self.requested_collections = util.get_list(attrs["collections"]) - self.requested_libraries = util.get_list(attrs["libraries"]) - self.resume_from = attrs["resume"] + self.requested_collections = util.get_list(attrs["collections"]) if "collections" in attrs else None + self.requested_libraries = util.get_list(attrs["libraries"]) if "libraries" in attrs else None + self.resume_from = attrs["resume"] if "resume" in attrs else None yaml.YAML().allow_duplicate_keys = True try: diff --git a/plex_meta_manager.py b/plex_meta_manager.py index 091bb8eb..baefcec5 100644 --- a/plex_meta_manager.py +++ b/plex_meta_manager.py @@ -116,11 +116,11 @@ def start(attrs): logger.info(util.centered("|_| |_|\\___/_/\\_\\ |_| |_|\\___|\\__\\__,_| |_| |_|\\__,_|_| |_|\\__,_|\\__, |\\___|_| ")) logger.info(util.centered(" |___/ ")) logger.info(util.centered(" Version: 1.12.2-develop1004 ")) - if "time" in attrs: start_type = f"{attrs['time']} " - elif "test" in attrs: start_type = "Test " - elif "collections" in attrs: start_type = "Collections " - elif "libraries" in attrs: start_type = "Libraries " - else: start_type = "" + if "time" in attrs and attrs["time"]: start_type = f"{attrs['time']} " + elif "test" in attrs and attrs["test"]: start_type = "Test " + elif "collections" in attrs and attrs["collections"]: start_type = "Collections " + elif "libraries" in attrs and attrs["libraries"]: start_type = "Libraries " + else: start_type = "" start_time = datetime.now() if "time" not in attrs: attrs["time"] = start_time.strftime("%H:%M")