parent
9e01e389ea
commit
8e2019a935
2
VERSION
2
VERSION
|
@ -1,2 +1,2 @@
|
||||||
PRODUCT_ID=Airtime
|
PRODUCT_ID=Airtime
|
||||||
PRODUCT_RELEASE=1.8.1
|
PRODUCT_RELEASE=1.9.0-devel
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* /etc/airtime/recorder.cfg
|
* /etc/airtime/recorder.cfg
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('AIRTIME_VERSION', '1.8.1');
|
define('AIRTIME_VERSION', '1.9.0-devel');
|
||||||
define('AIRTIME_COPYRIGHT_DATE', '2010-2011');
|
define('AIRTIME_COPYRIGHT_DATE', '2010-2011');
|
||||||
define('AIRTIME_REST_VERSION', '1.1');
|
define('AIRTIME_REST_VERSION', '1.1');
|
||||||
|
|
||||||
|
@ -78,6 +78,7 @@ class Config {
|
||||||
$CC_CONFIG['dsn']['username'] = $values['database']['dbuser'];
|
$CC_CONFIG['dsn']['username'] = $values['database']['dbuser'];
|
||||||
$CC_CONFIG['dsn']['password'] = $values['database']['dbpass'];
|
$CC_CONFIG['dsn']['password'] = $values['database']['dbpass'];
|
||||||
$CC_CONFIG['dsn']['hostspec'] = $values['database']['host'];
|
$CC_CONFIG['dsn']['hostspec'] = $values['database']['host'];
|
||||||
|
$CC_CONFIG['dsn']['phptype'] = 'pgsql';
|
||||||
$CC_CONFIG['dsn']['database'] = $values['database']['dbname'];
|
$CC_CONFIG['dsn']['database'] = $values['database']['dbname'];
|
||||||
|
|
||||||
$CC_CONFIG['apiKey'] = array($values['general']['api_key']);
|
$CC_CONFIG['apiKey'] = array($values['general']['api_key']);
|
||||||
|
|
|
@ -163,7 +163,7 @@ class ApiController extends Zend_Controller_Action
|
||||||
$this->_helper->viewRenderer->setNoRender(true);
|
$this->_helper->viewRenderer->setNoRender(true);
|
||||||
|
|
||||||
$api_key = $this->_getParam('api_key');
|
$api_key = $this->_getParam('api_key');
|
||||||
|
|
||||||
if(!in_array($api_key, $CC_CONFIG["apiKey"]))
|
if(!in_array($api_key, $CC_CONFIG["apiKey"]))
|
||||||
{
|
{
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
|
|
|
@ -1513,8 +1513,7 @@ class StoredFile {
|
||||||
public function getFileUrl()
|
public function getFileUrl()
|
||||||
{
|
{
|
||||||
global $CC_CONFIG;
|
global $CC_CONFIG;
|
||||||
return "http://$CC_CONFIG[baseUrl]:$CC_CONFIG[basePort]/".$this->gunid.".".$this->getFileExtension();
|
return "http://$CC_CONFIG[baseUrl]:$CC_CONFIG[basePort]/api/get-media/file/".$this->gunid.".".$this->getFileExtension();
|
||||||
//return $CC_CONFIG["base_url"]..$this->gunid.".".$this->getFileExtension();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -222,11 +222,12 @@ class AirTimeApiClient(ApiClientInterface):
|
||||||
try:
|
try:
|
||||||
#src = "http://%s:%s/%s/%s" % \
|
#src = "http://%s:%s/%s/%s" % \
|
||||||
#(self.config["base_url"], str(self.config["base_port"]), self.config["api_base"], self.config["get_media_url"])
|
#(self.config["base_url"], str(self.config["base_port"]), self.config["api_base"], self.config["get_media_url"])
|
||||||
src = uri
|
src = uri + "/api_key/%%api_key%%"
|
||||||
logger.info("try to download from %s to %s", src, dst)
|
logger.info("try to download from %s to %s", src, dst)
|
||||||
src = src.replace("%%api_key%%", self.config["api_key"])
|
src = src.replace("%%api_key%%", self.config["api_key"])
|
||||||
# check if file exists already before downloading again
|
# check if file exists already before downloading again
|
||||||
filename, headers = urllib.urlretrieve(src, dst)
|
filename, headers = urllib.urlretrieve(src, dst)
|
||||||
|
logger.info(headers)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
logger.error("%s", e)
|
logger.error("%s", e)
|
||||||
|
|
||||||
|
|
|
@ -96,10 +96,10 @@ try:
|
||||||
|
|
||||||
if platform.architecture()[0] == '64bit':
|
if platform.architecture()[0] == '64bit':
|
||||||
print "Installing 64-bit liquidsoap binary"
|
print "Installing 64-bit liquidsoap binary"
|
||||||
shutil.copy("%s/../liquidsoap/liquidsoap64"%current_script_dir, "%s/../liquidsoap/liquidsoap"%current_script_dir)
|
shutil.copy("%s/../liquidsoap/liquidsoap-amd64"%current_script_dir, "%s/../liquidsoap/liquidsoap"%current_script_dir)
|
||||||
elif platform.architecture()[0] == '32bit':
|
elif platform.architecture()[0] == '32bit':
|
||||||
print "Installing 32-bit liquidsoap binary"
|
print "Installing 32-bit liquidsoap binary"
|
||||||
shutil.copy("%s/../liquidsoap/liquidsoap32"%current_script_dir, "%s/../liquidsoap/liquidsoap"%current_script_dir)
|
shutil.copy("%s/../liquidsoap/liquidsoap-i386"%current_script_dir, "%s/../liquidsoap/liquidsoap"%current_script_dir)
|
||||||
else:
|
else:
|
||||||
print "Unknown system architecture."
|
print "Unknown system architecture."
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue