diff --git a/README.mkd b/README.mkd index 7c9d5ed..e6b68d3 100644 --- a/README.mkd +++ b/README.mkd @@ -21,6 +21,7 @@ The primary goal of these nodes is to provide a way to access files generated by 1. count * The number of files to return * If fewer than `count` files are found, we re-use existing files to fill the count + * A count of 0 will return all files 1. error * No Error - Does not error if `count` is not met * Load Count - Error if `count` is not met diff --git a/loadfiles/loadfiles.py b/loadfiles/loadfiles.py index 2ca5527..05369ba 100644 --- a/loadfiles/loadfiles.py +++ b/loadfiles/loadfiles.py @@ -23,7 +23,7 @@ GENERIC_INPUT_TYPES = { "sort": (["Name", "Date Created", "Date Modified", "Size"],), "direction": (["Acending", "Decending"],), "splice": (['Tail', 'Head'],), - "count": ("INT", {"default": 1, "min": 1},), + "count": ("INT", {"default": 1, "min": 0},), "error": (["No Error", "Load Count"],), } } @@ -75,12 +75,12 @@ def countCheck(files, count, error): def spliceFiles(files, count, splice): files_txt = '' - if files: + if files and count: if splice == "Head": files = files[:count] else: files = files[-count:] - files_txt = '\n'.join(files) + files_txt = '\n'.join(files) return (files, files_txt) diff --git a/pyproject.toml b/pyproject.toml index 3ca0081..b6e81b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-loadfiles" description = "The primary goal of these nodes is to provide a way to access files generated by ComfyUI workflows, local to the machine running ComfyUI. These nodes should always return an updated list of files when triggered." -version = "1.0.1" +version = "1.0.2" license = {file = "LICENSE"} [project.urls]