diff --git a/python_apps/media-monitor2/media/monitor/organizer.py b/python_apps/media-monitor2/media/monitor/organizer.py index e70160359..bcea8ba8c 100644 --- a/python_apps/media-monitor2/media/monitor/organizer.py +++ b/python_apps/media-monitor2/media/monitor/organizer.py @@ -18,8 +18,10 @@ class Organizer(ReportHandler,Loggable): self.target_path = target_path super(Organizer, self).__init__(signal=self.channel) def handle(self, sender, event): - """Intercept events where a new file has been added to the organize - directory and place it in the correct path (starting with self.target_path)""" + """ + Intercept events where a new file has been added to the organize + directory and place it in the correct path (starting with self.target_path) + """ try: new_path = mmp.organized_path(event.path, self.target_path, event.metadata.extract()) mmp.magic_move(event.path, new_path) diff --git a/python_apps/media-monitor2/media/monitor/pure.py b/python_apps/media-monitor2/media/monitor/pure.py index f89d2d38a..e96096dde 100644 --- a/python_apps/media-monitor2/media/monitor/pure.py +++ b/python_apps/media-monitor2/media/monitor/pure.py @@ -305,11 +305,13 @@ def last_modified(path): else: 0 def import_organize(store): + # TODO : get rid of this later """returns a tuple of organize and imported directory from an airtime store directory""" store = os.path.normpath(store) return os.path.join(store,'organize'), os.path.join(store,'imported') def expand_storage(store): + # TODO : document store = os.path.normpath(store) return { 'organize' : os.path.join(store, 'organize'), @@ -330,6 +332,7 @@ def create_dir(path): if not os.path.exists: raise FailedToCreateDir(path) def sub_path(directory,f): + # TODO : document normalized = normpath(directory) common = os.path.commonprefix([ directory, normpath(f) ]) return common == normalized