From 4c8dbb44e8d91f604ac822c1fe03174d972e6426 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Fri, 18 Mar 2016 10:47:25 +0200 Subject: [PATCH] delete the thumb file when deleting one single movie --- motioneye/mediafiles.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/motioneye/mediafiles.py b/motioneye/mediafiles.py index c47a6d8..bafc62d 100644 --- a/motioneye/mediafiles.py +++ b/motioneye/mediafiles.py @@ -708,6 +708,13 @@ def del_media_content(camera_config, path, media_type): try: # remove the file itself os.remove(full_path) + + # remove the thumb file + try: + os.remove(full_path + '.thumb') + + except: + pass # remove the parent directories if empty or contains only thumb files dir_path = os.path.dirname(full_path) -- 2.39.5