diff --git a/scripts/planktoscope/imager.py b/scripts/planktoscope/imager.py index 361654a..3d0cb6e 100644 --- a/scripts/planktoscope/imager.py +++ b/scripts/planktoscope/imager.py @@ -8,6 +8,9 @@ from loguru import logger # Library to get date and time for folder name and filename import datetime +# Subprocess is used to update the gallery folder +import subprocess # nosec + # Library to be able to sleep for a given duration import time @@ -678,6 +681,11 @@ class ImagerProcess(multiprocessing.Process): f'{{"status":"Image {self.__img_done + 1}/{self.__img_goal} has been imaged to {filename}"}}', ) + # Update the gallery with the new image + subprocess.Popen( + "thumbsup --config /home/pi/PlanktonScope/scripts/thumbsup/config.json".split() + ) # nosec + # Increment the counter self.__img_done += 1