not use watchdog. as wip
This commit is contained in:
parent
bfb69347c2
commit
65d8af8fc9
@ -122,11 +122,13 @@ class FileManager(FileSystemEventHandler):
|
||||
|
||||
@property
|
||||
def media_names(self):
|
||||
return self.image_dir_filenames
|
||||
# return self.image_dir_filenames
|
||||
return self._media_names(self.root_directory)
|
||||
|
||||
@property
|
||||
def output_media_names(self):
|
||||
return self.output_dir_filenames
|
||||
return self._media_names(self.output_dir)
|
||||
# return self.output_dir_filenames
|
||||
|
||||
@staticmethod
|
||||
def _media_names(directory: Path):
|
||||
|
@ -109,10 +109,10 @@ def medias(tab):
|
||||
response = make_response(jsonify(thumb.media_names), 200)
|
||||
else:
|
||||
response = make_response(jsonify(thumb.output_media_names), 200)
|
||||
response.last_modified = thumb.modified_time[tab]
|
||||
# response.last_modified = thumb.modified_time[tab]
|
||||
# response.cache_control.no_cache = True
|
||||
# response.cache_control.max_age = 0
|
||||
response.make_conditional(request)
|
||||
# response.make_conditional(request)
|
||||
return response
|
||||
|
||||
|
||||
@ -374,7 +374,7 @@ def main(args):
|
||||
app.config["THUMBNAIL_MEDIA_ROOT"] = args.input
|
||||
app.config["THUMBNAIL_MEDIA_THUMBNAIL_ROOT"] = os.path.join(args.output_dir, 'lama_cleaner_thumbnails')
|
||||
thumb.output_dir = Path(args.output_dir)
|
||||
thumb.start()
|
||||
# thumb.start()
|
||||
# try:
|
||||
# while True:
|
||||
# time.sleep(1)
|
||||
|
Loading…
Reference in New Issue
Block a user