fix: mai2 photos cant be merged
This commit is contained in:
parent
8a6250bebd
commit
f4dff9b4c1
@ -386,11 +386,11 @@ class Mai2Frontend(FE_Base):
|
||||
self.logger.info(f"Photo Path Exist.")
|
||||
max_idx = 0
|
||||
p = ImageFile.Parser()
|
||||
for _, _, files in walk("out_folder"):
|
||||
for _, _, files in walk(f"{out_folder}"):
|
||||
if not files:
|
||||
break
|
||||
|
||||
matcher = re.match("^(\d+)_(\d+)$", files[0])
|
||||
matcher = re.match(r"^(\d+)_(\d+)\.bin$", files[0])
|
||||
if not matcher:
|
||||
break
|
||||
|
||||
@ -405,7 +405,7 @@ class Mai2Frontend(FE_Base):
|
||||
return Response(status_code=500)
|
||||
|
||||
for i in range(max_idx + 1):
|
||||
with open(f"{out_folder}/{i}_{max_idx}", "rb") as f:
|
||||
with open(f"{out_folder}/{i}_{max_idx}.bin", "rb") as f:
|
||||
p.feed(f.read())
|
||||
try:
|
||||
im = p.close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user