mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2025-03-03 06:47:30 +00:00
[101] fix resume
This commit is contained in:
parent
c116601cec
commit
f38f73791f
3 changed files with 14 additions and 11 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.19.0-develop100
|
||||
1.19.0-develop101
|
||||
|
|
|
@ -1073,7 +1073,11 @@ class MetadataFile(DataFile):
|
|||
else:
|
||||
test_override.append(v)
|
||||
test = util.parse("Config", "test", dynamic, parent=map_name, methods=methods, default=False, datatype="bool") if "test" in methods else False
|
||||
sync = util.parse("Config", "sync", dynamic, parent=map_name, methods=methods, default=False, datatype="bool") if "sync" in methods else False
|
||||
sync = False
|
||||
if "sync" in self.temp_vars:
|
||||
sync = util.parse("Config", "sync", self.temp_vars["sync"], parent="template_variables", datatype="bool")
|
||||
elif "sync" in methods:
|
||||
sync = util.parse("Config", "sync", dynamic, parent=map_name, methods=methods, default=False, datatype="bool")
|
||||
if "<<library_type>>" in title_format:
|
||||
title_format = title_format.replace("<<library_type>>", library.type.lower())
|
||||
if "<<library_typeU>>" in title_format:
|
||||
|
|
|
@ -593,7 +593,7 @@ def run_libraries(config):
|
|||
continue
|
||||
logger.info("")
|
||||
logger.separator(f"Running {images_name} Images File\n{images.path}")
|
||||
if not run_args["tests"] and not resume and not run_args["collections-only"]:
|
||||
if not run_args["tests"] and not run_args["resume"] and not run_args["collections-only"]:
|
||||
try:
|
||||
images.update_metadata()
|
||||
except Failed as e:
|
||||
|
@ -610,20 +610,20 @@ def run_libraries(config):
|
|||
continue
|
||||
logger.info("")
|
||||
logger.separator(f"Running {metadata_name} Metadata File\n{metadata.path}")
|
||||
if not run_args["tests"] and not resume and not run_args["collections-only"]:
|
||||
if not run_args["tests"] and not run_args["resume"] and not run_args["collections-only"]:
|
||||
try:
|
||||
metadata.update_metadata()
|
||||
except Failed as e:
|
||||
library.notify(e)
|
||||
logger.error(e)
|
||||
collections_to_run = metadata.get_collections(config.requested_collections)
|
||||
if resume and resume not in collections_to_run:
|
||||
if run_args["resume"] and run_args["resume"] not in collections_to_run:
|
||||
logger.info("")
|
||||
logger.warning(f"Collection: {resume} not in Metadata File: {metadata.path}")
|
||||
logger.warning(f"Collection: {run_args['resume']} not in Metadata File: {metadata.path}")
|
||||
continue
|
||||
if collections_to_run:
|
||||
logger.info("")
|
||||
logger.separator(f"{'Test ' if run_args['test'] else ''}Collections")
|
||||
logger.separator(f"{'Test ' if run_args['tests'] else ''}Collections")
|
||||
logger.remove_library_handler(library.mapping_name)
|
||||
run_collection(config, library, metadata, collections_to_run)
|
||||
logger.re_add_library_handler(library.mapping_name)
|
||||
|
@ -640,7 +640,6 @@ def run_libraries(config):
|
|||
return library_status
|
||||
|
||||
def run_collection(config, library, metadata, requested_collections):
|
||||
global resume
|
||||
logger.info("")
|
||||
for mapping_name, collection_attrs in requested_collections.items():
|
||||
collection_start = datetime.now()
|
||||
|
@ -659,10 +658,10 @@ def run_collection(config, library, metadata, requested_collections):
|
|||
if no_template_test:
|
||||
continue
|
||||
|
||||
if resume and resume != mapping_name:
|
||||
if run_args["resume"] and run_args["resume"] != mapping_name:
|
||||
continue
|
||||
elif resume == mapping_name:
|
||||
resume = None
|
||||
elif run_args["resume"] == mapping_name:
|
||||
run_args["resume"] = None
|
||||
logger.info("")
|
||||
logger.separator(f"Resuming Collections")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue