From 6533d346aabeb3bd7fc417d058cec746c91fdc19 Mon Sep 17 00:00:00 2001 From: palitu Date: Thu, 19 Nov 2015 21:02:40 +0800 Subject: [PATCH] Update lycheesyncer.py Remove any medium photos that have been created. --- lycheesyncer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lycheesyncer.py b/lycheesyncer.py index 934cedc..8fbfd34 100644 --- a/lycheesyncer.py +++ b/lycheesyncer.py @@ -181,12 +181,14 @@ def deleteFiles(self, filelist): for url in filelist: if self.isAPhoto(url): thumbpath = os.path.join(self.conf["lycheepath"], "uploads", "thumb", url) + mediumpath = os.path.join(self.conf["lycheepath"], "uploads", "medium", url) filesplit = os.path.splitext(url) thumb2path = ''.join([filesplit[0], "@2x", filesplit[1]]).lower() thumb2path = os.path.join(self.conf["lycheepath"], "uploads", "thumb", thumb2path) bigpath = os.path.join(self.conf["lycheepath"], "uploads", "big", url) remove_file(thumbpath) remove_file(thumb2path) + remove_file(mediumpath) remove_file(bigpath) def rotatephoto(self, photo, rotation):