cc-4105: removed useless comments
This commit is contained in:
parent
860d504621
commit
06209ca224
|
@ -456,8 +456,8 @@ class ApiController extends Zend_Controller_Action
|
||||||
// path already exist
|
// path already exist
|
||||||
if ($file->getFileExistsFlag()) {
|
if ($file->getFileExistsFlag()) {
|
||||||
// file marked as exists
|
// file marked as exists
|
||||||
$this->view->error = "File already exists in Airtime.";
|
# TODO : jsonify all the error messages mang
|
||||||
return;
|
return "File already exists in Airtime.";
|
||||||
} else {
|
} else {
|
||||||
// file marked as not exists
|
// file marked as not exists
|
||||||
$file->setFileExistsFlag(true);
|
$file->setFileExistsFlag(true);
|
||||||
|
@ -471,8 +471,7 @@ class ApiController extends Zend_Controller_Action
|
||||||
|
|
||||||
//File is not in database anymore.
|
//File is not in database anymore.
|
||||||
if (is_null($file)) {
|
if (is_null($file)) {
|
||||||
$this->view->error = "File does not exist in Airtime.";
|
return "File does not exist in Airtime.";
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
//Updating a metadata change.
|
//Updating a metadata change.
|
||||||
else {
|
else {
|
||||||
|
@ -484,8 +483,7 @@ class ApiController extends Zend_Controller_Action
|
||||||
$file = Application_Model_StoredFile::RecallByMd5($md5);
|
$file = Application_Model_StoredFile::RecallByMd5($md5);
|
||||||
|
|
||||||
if (is_null($file)) {
|
if (is_null($file)) {
|
||||||
$this->view->error = "File doesn't exist in Airtime.";
|
return "File doesn't exist in Airtime.";
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$filepath = $md['MDATA_KEY_FILEPATH'];
|
$filepath = $md['MDATA_KEY_FILEPATH'];
|
||||||
|
@ -499,8 +497,7 @@ class ApiController extends Zend_Controller_Action
|
||||||
$file = Application_Model_StoredFile::RecallByFilepath($filepath);
|
$file = Application_Model_StoredFile::RecallByFilepath($filepath);
|
||||||
|
|
||||||
if (is_null($file)) {
|
if (is_null($file)) {
|
||||||
$this->view->error = "File doesn't exist in Airtime.";
|
return "File doesn't exist in Airtime.";
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$file->deleteByMediaMonitor();
|
$file->deleteByMediaMonitor();
|
||||||
|
|
|
@ -403,19 +403,6 @@ class AirtimeApiClient():
|
||||||
req = urllib2.Request(url, data)
|
req = urllib2.Request(url, data)
|
||||||
response = self.get_response_from_server(req)
|
response = self.get_response_from_server(req)
|
||||||
response = json.loads(response)
|
response = json.loads(response)
|
||||||
# TODO : this request returns a more detailed response of what
|
|
||||||
# happened through a json array. Hence we should handle errors
|
|
||||||
# differently
|
|
||||||
# we would like to move all of this to the controller since we are
|
|
||||||
# not doing anything here
|
|
||||||
#if("error" not in response and is_record):
|
|
||||||
#url = "http://%s:%s/%s/%s" % (self.config["base_url"], str(self.config["base_port"]), self.config["api_base"], self.config["upload_recorded"]) url = url.replace("%%fileid%%", str(response[u'id']))
|
|
||||||
#url = url.replace("%%showinstanceid%%", str(md_list['MDATA_KEY_TRACKNUMBER']))
|
|
||||||
#url = url.replace("%%api_key%%", self.config["api_key"])
|
|
||||||
|
|
||||||
#response = self.get_response_from_server(url)
|
|
||||||
#response = json.loads(response)
|
|
||||||
#logger.info("associate recorded %s", response)
|
|
||||||
return response
|
return response
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
logger.error('Exception: %s', e)
|
logger.error('Exception: %s', e)
|
||||||
|
|
Loading…
Reference in New Issue