mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
fix attr issue
This commit is contained in:
parent
014d6c859c
commit
2cd489ea62
2 changed files with 9 additions and 9 deletions
|
@ -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:
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue