diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 9f6eb7ad8..4758535da 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -734,7 +734,10 @@ class StoredFile { } } else { - + global $CC_CONFIG; + $stor = $CC_CONFIG["storageDir"]; + $audio_stor = $stor . DIRECTORY_SEPARATOR . $fileName; + $r = @copy($audio_file, $audio_stor); } } diff --git a/python_apps/media-monitor/MediaMonitor.py b/python_apps/media-monitor/MediaMonitor.py index dae8549d9..20fe59214 100644 --- a/python_apps/media-monitor/MediaMonitor.py +++ b/python_apps/media-monitor/MediaMonitor.py @@ -29,7 +29,6 @@ MODE_CREATE = "create" MODE_MODIFY = "modify" global storage_directory -global plupload_directory # configure logging try: @@ -297,13 +296,13 @@ class MediaMonitor(ProcessEvent): #shutil.move(event.pathname, filepath) os.rename(event.pathname, filepath) - try: + #try: #set the owner of the imported file. - pypo_uid = getpwnam('pypo')[2] - os.chown(filepath, pypo_uid, -1) - except Exception, e: - self.logger.debug("Cannot change owner of file.") - self.logger.debug("Error: %s:", e) + #pypo_uid = getpwnam('pypo')[2] + #os.chown(filepath, pypo_uid, -1) + #except Exception, e: + #self.logger.debug("Cannot change owner of file.") + #self.logger.debug("Error: %s:", e) self.update_airtime(filepath, MODE_CREATE) @@ -380,10 +379,6 @@ if __name__ == '__main__': logger.info("Added watch to %s", storage_directory) logger.info("wdd result %s", wdd[storage_directory]) - wdd = wm.add_watch(plupload_directory, mask, rec=False, auto_add=True) - logger.info("Added watch to %s", plupload_directory) - logger.info("wdd result %s", wdd[plupload_directory]) - notifier = AirtimeNotifier(wm, mm, read_freq=int(config["check_filesystem_events"]), timeout=1) notifier.coalesce_events() notifier.loop(callback=mm.check_rabbit_MQ)