diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 2a8a3ad75..342d5c69f 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -543,15 +543,15 @@ class ApiController extends Zend_Controller_Action public function reloadMetadataGroupAction() { $request = $this->getRequest(); - //extract all file metadata params from the request. - //The value is a json encoded hash that has all the information related to this action - //The key does not have any meaning as of yet but it could potentially correspond - //to some unique id. + // extract all file metadata params from the request. + // The value is a json encoded hash that has all the information related to this action + // The key does not have any meaning as of yet but it could potentially correspond + // to some unique id. $responses = array(); foreach ($request->getParams() as $k => $raw_json) { $info_json = json_decode($raw_json, $assoc=true); $mode = $info_json['mode']; - unset($info_json['mode']); + unset( $info_json['mode'] ); // TODO : uncomment the following line to actually do something // array_push($responses, $this->dispatchMetaDataAction($info_json, $info_json['mode'])); // Like wise, remove the following line when done diff --git a/python_apps/api_clients/api_client.py b/python_apps/api_clients/api_client.py index 3e53f2d32..1cc1e26cc 100644 --- a/python_apps/api_clients/api_client.py +++ b/python_apps/api_clients/api_client.py @@ -365,7 +365,6 @@ class AirTimeApiClient(): def send_media_monitor_requests(self, action_list, is_record=False): logger = self.logger - response = None try: url = self.construct_url('reload_metadata_group') # We are assuming that action_list is a list of dictionaries such @@ -402,11 +401,11 @@ class AirTimeApiClient(): response = self.get_response_from_server(url) response = json.loads(response) logger.info("associate recorded %s", response) + return response except Exception, e: - response = None logger.error('Exception: %s', e) logger.error("traceback: %s", traceback.format_exc()) - return response + raise #returns a list of all db files for a given directory in JSON format: #{"files":["path/to/file1", "path/to/file2"]}