diff --git a/lama_cleaner/file_manager/file_manager.py b/lama_cleaner/file_manager/file_manager.py index 9e4cfb4..961016c 100644 --- a/lama_cleaner/file_manager/file_manager.py +++ b/lama_cleaner/file_manager/file_manager.py @@ -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): diff --git a/lama_cleaner/server.py b/lama_cleaner/server.py index 45f2136..4eae2d3 100644 --- a/lama_cleaner/server.py +++ b/lama_cleaner/server.py @@ -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)