CC-2097 : Show-recorder: Use RabbitMQ, api_client, and the structure of pypofetch

setting up configs
This commit is contained in:
naomiaro 2011-03-24 17:43:37 -04:00
parent f4bba3d302
commit 35b2ddfd29
4 changed files with 16 additions and 22 deletions

View File

@ -150,6 +150,12 @@ class ApiController extends Zend_Controller_Action
}
}
public function recordedShowsAction()
{
$today_timestamp = date("Y-m-d H:i:s");
$this->view->shows = Show::getShows($today_timestamp, null, $excludeInstance=NULL, $onlyRecord=TRUE);
}
public function notifyMediaItemStartPlayAction()
{
global $CC_CONFIG;

View File

@ -1,22 +0,0 @@
<?php
require_once 'soundcloud-api/Services/Soundcloud.php';
class Airtime_View_Helper_SoundCloudLink extends Zend_View_Helper_Abstract
{
public function soundCloudLink()
{
$request = Zend_Controller_Front::getInstance()->getRequest();
$host = $request->getHttpHost();
$controller = $request->getControllerName();
$action = $request->getActionName();
$redirectUrl = "http://{$host}/{$controller}/{$action}";
$soundcloud = new Services_Soundcloud('2CLCxcSXYzx7QhhPVHN4A', 'pZ7beWmF06epXLHVUP1ufOg2oEnIt9XhE8l8xt0bBs', $redirectUrl);
$authorizeUrl = $soundcloud->getAuthorizeUrl();
return $authorizeUrl;
}
}

View File

@ -80,6 +80,7 @@ class AirtimeInstall {
$api_key = AirtimeInstall::GenerateRandomString();
AirtimeInstall::UpdateIniValue(__DIR__.'/../build/airtime.conf', 'api_key', $api_key);
AirtimeInstall::UpdateIniValue(__DIR__.'/../python_apps/pypo/config.cfg', 'api_key', "'$api_key'");
AirtimeInstall::UpdateIniValue(__DIR__.'/../python_apps/show-recorder/config.cfg', 'api_key', "'$api_key'");
}
public static function ExitIfNotRoot()

View File

@ -7,3 +7,12 @@ upload_file_url = 'Plupload/upload-recorded/format/json'
# base path to store recordered shows at
base_recorded_files = '/home/pypo/Music/'
# Value needed to access the API
api_key = 'AAA'
# Path to the base of the API
api_base = 'api/'
# URL to get the version number of the server API
version_url = 'version/api_key/%%api_key%%'