CC-3749: Media Monitor should not load files pypo cannot read

-fixed
This commit is contained in:
Martin Konecny 2012-05-04 13:37:43 -04:00
parent 08217d59fc
commit fa373a683e
3 changed files with 14 additions and 37 deletions

View file

@ -151,14 +151,14 @@ class AirtimeProcessEvent(ProcessEvent):
self.logger.error('Exception: %s', e)
self.logger.error("traceback: %s", traceback.format_exc())
self.mmc.set_needed_file_permissions(pathname, dir)
self.mmc.is_readable(pathname, dir)
is_recorded = self.mmc.is_parent_directory(pathname, self.config.recorded_directory)
self.file_events.append({'mode': self.config.MODE_CREATE, 'filepath': pathname, 'is_recorded_show': is_recorded})
else:
#event is because of a created directory
if self.mmc.is_parent_directory(pathname, self.config.storage_directory):
self.mmc.set_needed_file_permissions(pathname, dir)
self.mmc.is_readable(pathname, dir)
def process_IN_MODIFY(self, event):
# if IN_MODIFY is followed by IN_CREATE, it's not true modify event
@ -237,7 +237,7 @@ class AirtimeProcessEvent(ProcessEvent):
if event.pathname in filename:
self.handle_mount_change()
#if stuff dropped in stor via a UI move must change file permissions.
self.mmc.set_needed_file_permissions(event.pathname, event.dir)
self.mmc.is_readable(event.pathname, event.dir)
if not event.dir:
if self.mmc.is_audio_file(event.name):
if event.cookie in self.temp_files: