From a44a7d71f2785fc8150f9c2106c67d25a10301a4 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 5 Jul 2011 18:48:00 -0400 Subject: [PATCH] CC-1799 : Live Studio Playout from media library (pytagsfs) -dont send delete event if file was deleted from "organize" dir. --- .../airtimefilemonitor/airtimeprocessevent.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py b/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py index 7de2b840c..a09c96142 100644 --- a/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py +++ b/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py @@ -311,15 +311,13 @@ class AirtimeProcessEvent(ProcessEvent): def process_IN_DELETE(self, event): self.logger.info("process_IN_DELETE: %s", event) - if self.is_parent_directory(event.pathname, self.config.organize_directory): - #we don't care if a file was deleted from the organize directory. - pass - elif not event.dir: - self.handle_removed_file(event.pathname) + self.handle_removed_file(event.pathname) def handle_removed_file(self, pathname): self.logger.info("Deleting %s", pathname) - self.file_events.append({'filepath': pathname, 'mode': self.config.MODE_DELETE}) + if not self.is_parent_directory(event.pathname, self.config.organize_directory): + #we don't care if a file was deleted from the organize directory. + self.file_events.append({'filepath': pathname, 'mode': self.config.MODE_DELETE}) def process_default(self, event):