v1.0.2: Zero Count loads all Files

This commit is contained in:
Daryl Tucker
2024-08-28 15:49:59 -07:00
parent 0f26c4eb7c
commit 9380b45b6b
3 changed files with 5 additions and 4 deletions
+1
View File
@@ -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
+3 -3
View File
@@ -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)
+1 -1
View File
@@ -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]