diff --git a/VERSION b/VERSION index 7d01a8df..69bcdfaf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.16.1-develop8 +1.16.1-develop9 diff --git a/plex_meta_manager.py b/plex_meta_manager.py index 97777c2b..a835d418 100644 --- a/plex_meta_manager.py +++ b/plex_meta_manager.py @@ -743,7 +743,7 @@ def library_operations(config, library): logger.info("") logger.info(f"Metadata Backup Path: {library.metadata_backup['path']}") logger.info("") - meta = {} + meta = None if os.path.exists(library.metadata_backup["path"]): try: meta, _, _ = yaml.util.load_yaml_guess_indent(open(library.metadata_backup["path"])) @@ -755,6 +755,8 @@ def library_operations(config, library): i += 1 os.rename(library.metadata_backup["path"], f"{filename}{i}{file_extension}") logger.error(f"Backup failed to load saving copy to {filename}{i}{file_extension}") + if not meta: + meta = {} if "metadata" not in meta: meta["metadata"] = {} items = library.get_all(load=True)