          if self._previewcache["modified"] is None:
              retval = image_files
          else:
              retval = [fname for fname in image_files
                        if os.path.getmtime(fname) > self._previewcache["modified"]]
          if not retval:
              logger.debug("No new images in output folder")
          else:
              self._previewcache["modified"] = max([os.path.getmtime(img) for img in retval])
              logger.debug("Number new images: %s, Last Modified: %s",
 
</s> remove             self._previewcache["modified"] = max([os.path.getmtime(img) for img in retval])
 </s> add             self._previewcache["modified"] = max(os.path.getmtime(img) for img in retval) </s> remove         if dropped_files:
            logger.debug("Removing dropped files: %s", dropped_files)
            show_files = [fname for fname in show_files if fname not in dropped_files]

        self._previewcache["filenames"] = (self._previewcache["filenames"] +
                                           show_files)[-num_images:]
        cache = self._previewcache["images"]
 </s> add         self._previewcache["filenames"] = (cast(List[str], self._previewcache["filenames"]) +
                                           filenames)[-num_images:]
        cache = cast(Optional[np.ndarray], self._previewcache["images"]) </s> remove     def _load_images_to_cache(self, image_files, frame_dims, thumbnail_size):
 </s> add     def _load_images_to_cache(self,
                              image_files: List[str],
                              frame_dims: Tuple[int, int],
                              thumbnail_size: int) -> bool: </s> remove         image_files = self._get_images(self._pathoutput)
 </s> add         assert self._pathoutput is not None
        image_path = self._get_newest_folder() if self._batch_mode else self._pathoutput
        image_files = self._get_images(image_path) </s> remove             retval = tk.Frame()
            retval.option_add("*foreground", "black")
 </s> add             frame = tk.Frame()
            frame.option_add("*foreground", "black")
            retval: Optional[tk.Frame] = frame
                      if os.path.getmtime(fname) > cast(float, self._previewcache["modified"])]
          if self._previewcache["modified"] is None:
              retval = image_files
          else:
              retval = [fname for fname in image_files
                      if os.path.getmtime(fname) > cast(float, self._previewcache["modified"])]
          if not retval:
              logger.debug("No new images in output folder")
          else:
              self._previewcache["modified"] = max([os.path.getmtime(img) for img in retval])
              logger.debug("Number new images: %s, Last Modified: %s",
keep keep keep keep replace keep keep keep keep keep
 Bugfix: Preview for extract in batch mode 
lib/gui/utils.py