Merge branch '2.4.x'

This commit is contained in:
denise 2013-08-09 13:02:33 -04:00
commit a2bba67679
24 changed files with 1044 additions and 659 deletions

View File

@ -8,7 +8,7 @@ Common Non-linked Code
- Web site: https://github.com/torvalds/linux - Web site: https://github.com/torvalds/linux
- License: GPLv2 - License: GPLv2
* RabbitMQ (works with version 1.7.2 and above) * RabbitMQ
- What is it: Interprocess Message Passing with Queuing - What is it: Interprocess Message Passing with Queuing
- Web site: http://www.rabbitmq.com/ - Web site: http://www.rabbitmq.com/
- License: Mozilla Public License (http://www.rabbitmq.com/mpl.html) - License: Mozilla Public License (http://www.rabbitmq.com/mpl.html)
@ -63,11 +63,11 @@ Non-linked code:
- Web site: http://httpd.apache.org/ - Web site: http://httpd.apache.org/
- License: Apache 2.0. See http://httpd.apache.org/docs/2.2/license.html - License: Apache 2.0. See http://httpd.apache.org/docs/2.2/license.html
* PostgreSQL 8.4 * PostgreSQL 9.1
- Web site: http://www.postgresql.org/ - Web site: http://www.postgresql.org/
- License: The PostgreSQL License. See http://www.postgresql.org/about/licence - License: The PostgreSQL License. See http://www.postgresql.org/about/licence
* PHP 5.3 * PHP 5.3
- Web site: http://www.php.net/ - Web site: http://www.php.net/
- License: The PHP License. See http://www.php.net/license/3_01.txt - License: The PHP License. See http://www.php.net/license/3_01.txt
@ -137,7 +137,7 @@ Linked code:
- License: MIT - License: MIT
Non-linked code: Non-linked code:
* Python 2.6 * Python 2.7
- Web site: http://www.python.org/ - Web site: http://www.python.org/
- License: PSF License. See http://docs.python.org/license.html - License: PSF License. See http://docs.python.org/license.html
@ -158,11 +158,11 @@ Linked code:
- Compatible with GPLv3? Yes. - Compatible with GPLv3? Yes.
Non-linked code: Non-linked code:
* Python 2.6 * Python 2.7
- Web site: http://www.python.org/ - Web site: http://www.python.org/
- License: PSF License. See http://docs.python.org/license.html - License: PSF License. See http://docs.python.org/license.html
* ecasound 2.7.2 * ecasound 2.8.1
- What is it: Records audio from line-in - What is it: Records audio from line-in
- Web site: http://www.eca.cx/ecasound/ - Web site: http://www.eca.cx/ecasound/
- License: GPLv2 - License: GPLv2
@ -177,10 +177,10 @@ Linked code:
- Compatible with GPLv3? Yes. - Compatible with GPLv3? Yes.
Non-linked code: Non-linked code:
* Python 2.6 * Python 2.7
- Web site: http://www.python.org/ - Web site: http://www.python.org/
- License: PSF License. See http://docs.python.org/license.html - License: PSF License. See http://docs.python.org/license.html
* Liquidsoap 1.0.1 * Liquidsoap 1.1.1
- Web site: http://savonet.sourceforge.net/ - Web site: http://savonet.sourceforge.net/
- License: GPLv2 - License: GPLv2

View File

@ -209,6 +209,43 @@ class ApiController extends Zend_Controller_Action
} }
} }
public function onAirLightAction()
{
$this->view->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$result = array();
$result["on_air_light"] = false;
$result["on_air_light_expected_status"] = false;
$result["station_down"] = false;
$range = Application_Model_Schedule::GetPlayOrderRange();
$isItemCurrentlyScheduled = !is_null($range["current"]) && count($range["currentShow"]) > 0 ? true : false;
$isCurrentItemPlaying = $range["current"]["media_item_played"] ? true : false;
if ($isItemCurrentlyScheduled ||
Application_Model_Preference::GetSourceSwitchStatus("live_dj") == "on" ||
Application_Model_Preference::GetSourceSwitchStatus("master_dj") == "on")
{
$result["on_air_light_expected_status"] = true;
}
if (($isItemCurrentlyScheduled && $isCurrentItemPlaying) ||
Application_Model_Preference::GetSourceSwitchStatus("live_dj") == "on" ||
Application_Model_Preference::GetSourceSwitchStatus("master_dj") == "on")
{
$result["on_air_light"] = true;
}
if ($result["on_air_light_expected_status"] != $result["on_air_light"]) {
$result["station_down"] = true;
}
echo isset($_GET['callback']) ? $_GET['callback'].'('.json_encode($result).')' : json_encode($result);
}
/** /**
* Retrieve the currently playing show as well as upcoming shows. * Retrieve the currently playing show as well as upcoming shows.
* Number of shows returned and the time interval in which to * Number of shows returned and the time interval in which to

View File

@ -9,36 +9,36 @@ class ListenerstatController extends Zend_Controller_Action
->addActionContext('get-data', 'json') ->addActionContext('get-data', 'json')
->initContext(); ->initContext();
} }
public function indexAction() public function indexAction()
{ {
$CC_CONFIG = Config::getConfig(); $CC_CONFIG = Config::getConfig();
$request = $this->getRequest(); $request = $this->getRequest();
$baseUrl = Application_Common_OsPath::getBaseDir(); $baseUrl = Application_Common_OsPath::getBaseDir();
$this->view->headScript()->appendFile($baseUrl.'js/flot/jquery.flot.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/flot/jquery.flot.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/flot/jquery.flot.crosshair.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/flot/jquery.flot.crosshair.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/listenerstat/listenerstat.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/listenerstat/listenerstat.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$offset = date("Z") * -1; $offset = date("Z") * -1;
$this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds"); $this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds");
$this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']);
//default time is the last 24 hours. //default time is the last 24 hours.
$now = time(); $now = time();
$from = $request->getParam("from", $now - (24*60*60)); $from = $request->getParam("from", $now - (24*60*60));
$to = $request->getParam("to", $now); $to = $request->getParam("to", $now);
$start = DateTime::createFromFormat("U", $from, new DateTimeZone("UTC")); $start = DateTime::createFromFormat("U", $from, new DateTimeZone("UTC"));
$start->setTimezone(new DateTimeZone(date_default_timezone_get())); $start->setTimezone(new DateTimeZone(date_default_timezone_get()));
$end = DateTime::createFromFormat("U", $to, new DateTimeZone("UTC")); $end = DateTime::createFromFormat("U", $to, new DateTimeZone("UTC"));
$end->setTimezone(new DateTimeZone(date_default_timezone_get())); $end->setTimezone(new DateTimeZone(date_default_timezone_get()));
$form = new Application_Form_DateRange(); $form = new Application_Form_DateRange();
$form->populate(array( $form->populate(array(
'his_date_start' => $start->format("Y-m-d"), 'his_date_start' => $start->format("Y-m-d"),
@ -46,7 +46,7 @@ class ListenerstatController extends Zend_Controller_Action
'his_date_end' => $end->format("Y-m-d"), 'his_date_end' => $end->format("Y-m-d"),
'his_time_end' => $end->format("H:i") 'his_time_end' => $end->format("H:i")
)); ));
$errorStatus = Application_Model_StreamSetting::GetAllListenerStatErrors(); $errorStatus = Application_Model_StreamSetting::GetAllListenerStatErrors();
Logging::info($errorStatus); Logging::info($errorStatus);
$out = array(); $out = array();
@ -57,25 +57,24 @@ class ListenerstatController extends Zend_Controller_Action
} }
$out[$key[0]] = $v['value']; $out[$key[0]] = $v['value'];
} }
$this->view->errorStatus = $out; $this->view->errorStatus = $out;
$this->view->date_form = $form; $this->view->date_form = $form;
} }
public function getDataAction(){ public function getDataAction(){
$request = $this->getRequest(); $request = $this->getRequest();
$current_time = time(); $current_time = time();
$params = $request->getParams(); $params = $request->getParams();
$starts_epoch = $request->getParam("startTimestamp", $current_time - (60*60*24)); $starts_epoch = $request->getParam("startTimestamp", $current_time - (60*60*24));
$ends_epoch = $request->getParam("endTimestamp", $current_time); $ends_epoch = $request->getParam("endTimestamp", $current_time);
$mountName = $request->getParam("mountName", null);
$startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC"));
$endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC"));
$data = Application_Model_ListenerStat::getDataPointsWithinRange($startsDT->format("Y-m-d H:i:s"), $endsDT->format("Y-m-d H:i:s"), $mountName); $data = Application_Model_ListenerStat::getDataPointsWithinRange($startsDT->format("Y-m-d H:i:s"), $endsDT->format("Y-m-d H:i:s"));
$this->_helper->json->sendJson($data); $this->_helper->json->sendJson($data);
} }
} }

View File

@ -5,7 +5,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
private $stringCriteriaOptions; private $stringCriteriaOptions;
private $numericCriteriaOptions; private $numericCriteriaOptions;
private $limitOptions; private $limitOptions;
/* We need to know if the criteria value will be a string /* We need to know if the criteria value will be a string
* or numeric value in order to populate the modifier * or numeric value in order to populate the modifier
* select list * select list
@ -40,7 +40,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
"info_url" => "s", "info_url" => "s",
"year" => "n" "year" => "n"
); );
private function getCriteriaOptions($option = null) private function getCriteriaOptions($option = null)
{ {
if (!isset($this->criteriaOptions)) { if (!isset($this->criteriaOptions)) {
@ -75,7 +75,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
"year" => _("Year") "year" => _("Year")
); );
} }
if (is_null($option)) return $this->criteriaOptions; if (is_null($option)) return $this->criteriaOptions;
else return $this->criteriaOptions[$option]; else return $this->criteriaOptions[$option];
} }
@ -122,7 +122,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
} }
return $this->limitOptions; return $this->limitOptions;
} }
public function init() public function init()
{ {
@ -259,7 +259,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
$repeatTracks->setChecked($storedCrit["repeat_tracks"]["value"] == 1?true:false); $repeatTracks->setChecked($storedCrit["repeat_tracks"]["value"] == 1?true:false);
} }
$this->addElement($repeatTracks); $this->addElement($repeatTracks);
$limit = new Zend_Form_Element_Select('sp_limit_options'); $limit = new Zend_Form_Element_Select('sp_limit_options');
$limit->setAttrib('class', 'sp_input_select') $limit->setAttrib('class', 'sp_input_select')
->setDecorators(array('viewHelper')) ->setDecorators(array('viewHelper'))
@ -268,7 +268,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
$limit->setValue($storedCrit["limit"]["modifier"]); $limit->setValue($storedCrit["limit"]["modifier"]);
} }
$this->addElement($limit); $this->addElement($limit);
$limitValue = new Zend_Form_Element_Text('sp_limit_value'); $limitValue = new Zend_Form_Element_Text('sp_limit_value');
$limitValue->setAttrib('class', 'sp_input_text_limit') $limitValue->setAttrib('class', 'sp_input_text_limit')
->setLabel(_('Limit to')) ->setLabel(_('Limit to'))
@ -541,7 +541,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
$isValid = false; $isValid = false;
} }
// length check // length check
if (intval($d['sp_criteria_value']) >= pow(2,31)) { if ($d['sp_criteria_value'] >= pow(2,31)) {
$element->addError(_("The value should be less then 2147483648")); $element->addError(_("The value should be less then 2147483648"));
$isValid = false; $isValid = false;
} }

View File

@ -4,7 +4,7 @@ class Application_Model_ListenerStat
public function __construct() public function __construct()
{ {
} }
public static function getDataPointsWithinRange($p_start, $p_end) { public static function getDataPointsWithinRange($p_start, $p_end) {
$sql = <<<SQL $sql = <<<SQL
SELECT mount_name, count(*) SELECT mount_name, count(*)
@ -16,13 +16,13 @@ group by mount_name
SQL; SQL;
$data = Application_Common_Database::prepareAndExecute($sql, $data = Application_Common_Database::prepareAndExecute($sql,
array('p1'=>$p_start, 'p2'=>$p_end)); array('p1'=>$p_start, 'p2'=>$p_end));
$out = array(); $out = array();
foreach ($data as $d) { foreach ($data as $d) {
$jump = intval($d['count']/1000); $jump = intval($d['count']/1000);
$jump = max(1, $jump); $jump = max(1, $jump);
$remainder = $jump == 1?0:1; $remainder = $jump == 1?0:1;
$sql = <<<SQL $sql = <<<SQL
SELECT * SELECT *
FROM FROM
@ -41,29 +41,36 @@ SQL;
$t->setTimezone(new DateTimeZone(date_default_timezone_get())); $t->setTimezone(new DateTimeZone(date_default_timezone_get()));
// tricking javascript so it thinks the server timezone is in UTC // tricking javascript so it thinks the server timezone is in UTC
$dt = new DateTime($t->format("Y-m-d H:i:s"), new DateTimeZone("UTC")); $dt = new DateTime($t->format("Y-m-d H:i:s"), new DateTimeZone("UTC"));
$r['timestamp'] = $dt->format("U"); $r['timestamp'] = $dt->format("U");
$out[$r['mount_name']][] = $r; $out[$r['mount_name']][] = $r;
} }
} }
$enabledStreamIds = Application_Model_StreamSetting::getEnabledStreamIds(); $enabledStreamIds = Application_Model_StreamSetting::getEnabledStreamIds();
$enabledOut = array(); $enabledOut = array();
foreach ($enabledStreamIds as $sId) { foreach ($enabledStreamIds as $sId) {
$sql = "SELECT value FROM cc_stream_setting" $sql = "SELECT value FROM cc_stream_setting"
." WHERE keyname = :key"; ." WHERE keyname = :key";
$result = Application_Common_Database::prepareAndExecute($sql, array('key' => $sId."_mount"), "single"); $result = Application_Common_Database::prepareAndExecute($sql, array('key' => $sId."_mount"), "single");
$enabledMountPoint = $result["value"]; $enabledMountPoint = $result["value"];
if (isset($out[$enabledMountPoint])) { if (isset($out[$enabledMountPoint])) {
$enabledOut[$enabledMountPoint] = $out[$enabledMountPoint]; $enabledOut[$enabledMountPoint] = $out[$enabledMountPoint];
} }
else {
//TODO fix this hack (here for CC-5254)
//all shoutcast streams are automatically put under "shoutcast" mount point.
if (isset($out["shoutcast"])) {
$enabledOut["shoutcast"] = $out["shoutcast"];
}
}
} }
return $enabledOut; return $enabledOut;
} }

View File

@ -17,7 +17,7 @@ class Application_Model_Scheduler
private $epochNow; private $epochNow;
private $nowDT; private $nowDT;
private $user; private $user;
private $crossfadeDuration; private $crossfadeDuration;
private $checkUserPermissions = true; private $checkUserPermissions = true;
@ -40,7 +40,7 @@ class Application_Model_Scheduler
} }
$this->user = Application_Model_User::getCurrentUser(); $this->user = Application_Model_User::getCurrentUser();
$this->crossfadeDuration = Application_Model_Preference::GetDefaultCrossfadeDuration(); $this->crossfadeDuration = Application_Model_Preference::GetDefaultCrossfadeDuration();
} }
@ -200,9 +200,12 @@ class Application_Model_Scheduler
} else { } else {
$data = $this->fileInfo; $data = $this->fileInfo;
$data["id"] = $id; $data["id"] = $id;
$data["cliplength"] = Application_Model_StoredFile::getRealClipLength(
$file->getDbCuein(), $cuein = Application_Common_DateHelper::playlistTimeToSeconds($file->getDbCuein());
$file->getDbCueout()); $cueout = Application_Common_DateHelper::playlistTimeToSeconds($file->getDbCueout());
$row_length = Application_Common_DateHelper::secondsToPlaylistTime($cueout - $cuein);
$data["cliplength"] = $row_length;
$data["cuein"] = $file->getDbCuein(); $data["cuein"] = $file->getDbCuein();
$data["cueout"] = $file->getDbCueout(); $data["cueout"] = $file->getDbCueout();
@ -265,11 +268,11 @@ class Application_Model_Scheduler
$cuein = Application_Common_DateHelper::calculateLengthInSeconds($data["cuein"]); $cuein = Application_Common_DateHelper::calculateLengthInSeconds($data["cuein"]);
$cueout = Application_Common_DateHelper::calculateLengthInSeconds($data["cueout"]); $cueout = Application_Common_DateHelper::calculateLengthInSeconds($data["cueout"]);
$data["cliplength"] = Application_Common_DateHelper::secondsToPlaylistTime($cueout - $cuein); $data["cliplength"] = Application_Common_DateHelper::secondsToPlaylistTime($cueout - $cuein);
//fade is in format SS.uuuuuu //fade is in format SS.uuuuuu
$data["fadein"] = $defaultFadeIn; $data["fadein"] = $defaultFadeIn;
$data["fadeout"] = $defaultFadeOut; $data["fadeout"] = $defaultFadeOut;
$data["type"] = 0; $data["type"] = 0;
$files[] = $data; $files[] = $data;
} }
@ -324,11 +327,11 @@ class Application_Model_Scheduler
$cuein = Application_Common_DateHelper::calculateLengthInSeconds($data["cuein"]); $cuein = Application_Common_DateHelper::calculateLengthInSeconds($data["cuein"]);
$cueout = Application_Common_DateHelper::calculateLengthInSeconds($data["cueout"]); $cueout = Application_Common_DateHelper::calculateLengthInSeconds($data["cueout"]);
$data["cliplength"] = Application_Common_DateHelper::secondsToPlaylistTime($cueout - $cuein); $data["cliplength"] = Application_Common_DateHelper::secondsToPlaylistTime($cueout - $cuein);
//fade is in format SS.uuuuuu //fade is in format SS.uuuuuu
$data["fadein"] = $defaultFadeIn; $data["fadein"] = $defaultFadeIn;
$data["fadeout"] = $defaultFadeOut; $data["fadeout"] = $defaultFadeOut;
$data["type"] = 0; $data["type"] = 0;
$files[] = $data; $files[] = $data;
} }
@ -338,7 +341,7 @@ class Application_Model_Scheduler
return $files; return $files;
} }
/* /*
* @param DateTime startDT in UTC * @param DateTime startDT in UTC
* @param string duration * @param string duration
@ -349,18 +352,18 @@ class Application_Model_Scheduler
private function findTimeDifference($p_startDT, $p_seconds) private function findTimeDifference($p_startDT, $p_seconds)
{ {
$startEpoch = $p_startDT->format("U.u"); $startEpoch = $p_startDT->format("U.u");
//add two float numbers to 6 subsecond precision //add two float numbers to 6 subsecond precision
//DateTime::createFromFormat("U.u") will have a problem if there is no decimal in the resulting number. //DateTime::createFromFormat("U.u") will have a problem if there is no decimal in the resulting number.
$newEpoch = bcsub($startEpoch , (string) $p_seconds, 6); $newEpoch = bcsub($startEpoch , (string) $p_seconds, 6);
$dt = DateTime::createFromFormat("U.u", $newEpoch, new DateTimeZone("UTC")); $dt = DateTime::createFromFormat("U.u", $newEpoch, new DateTimeZone("UTC"));
if ($dt === false) { if ($dt === false) {
//PHP 5.3.2 problem //PHP 5.3.2 problem
$dt = DateTime::createFromFormat("U", intval($newEpoch), new DateTimeZone("UTC")); $dt = DateTime::createFromFormat("U", intval($newEpoch), new DateTimeZone("UTC"));
} }
return $dt; return $dt;
} }
@ -420,7 +423,7 @@ class Application_Model_Scheduler
return $nextDT; return $nextDT;
} }
/* /*
* @param int $showInstance * @param int $showInstance
* This function recalculates the start/end times of items in a gapless show to * This function recalculates the start/end times of items in a gapless show to
@ -499,7 +502,7 @@ class Application_Model_Scheduler
} }
/** /**
* *
* Enter description here ... * Enter description here ...
* @param $scheduleItems * @param $scheduleItems
* cc_schedule items, where the items get inserted after * cc_schedule items, where the items get inserted after
@ -882,7 +885,7 @@ class Application_Model_Scheduler
private function updateMovedItem() private function updateMovedItem()
{ {
} }
private function getInstances($instanceId) private function getInstances($instanceId)
@ -1102,7 +1105,7 @@ class Application_Model_Scheduler
} else { } else {
$removedItem->delete($this->con); $removedItem->delete($this->con);
} }
// update is_scheduled in cc_files but only if // update is_scheduled in cc_files but only if
// the file is not scheduled somewhere else // the file is not scheduled somewhere else
$fileId = $removedItem->getDbFileId(); $fileId = $removedItem->getDbFileId();

View File

@ -778,17 +778,18 @@ SQL;
foreach ($results['aaData'] as &$row) { foreach ($results['aaData'] as &$row) {
$row['id'] = intval($row['id']); $row['id'] = intval($row['id']);
$len_formatter = new LengthFormatter(
self::getRealClipLength($row["cuein"], $row["cueout"]));
$row['length'] = $len_formatter->format();
$cuein_formatter = new LengthFormatter($row["cuein"]);
$row["cuein"] = $cuein_formatter->format();
$cueout_formatter = new LengthFormatter($row["cueout"]);
$row["cueout"] = $cueout_formatter->format();
if ($row['ftype'] === "audioclip") { if ($row['ftype'] === "audioclip") {
$cuein_formatter = new LengthFormatter($row["cuein"]);
$row["cuein"] = $cuein_formatter->format();
$cueout_formatter = new LengthFormatter($row["cueout"]);
$row["cueout"] = $cueout_formatter->format();
$cuein = Application_Common_DateHelper::playlistTimeToSeconds($row["cuein"]);
$cueout = Application_Common_DateHelper::playlistTimeToSeconds($row["cueout"]);
$row_length = Application_Common_DateHelper::secondsToPlaylistTime($cueout - $cuein);
$formatter = new SamplerateFormatter($row['sample_rate']); $formatter = new SamplerateFormatter($row['sample_rate']);
$row['sample_rate'] = $formatter->format(); $row['sample_rate'] = $formatter->format();
@ -801,9 +802,16 @@ SQL;
// for audio preview // for audio preview
$row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION); $row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
} else {
$row['audioFile'] = $row['id'];
} }
else {
$row['audioFile'] = $row['id'];
$row_length = $row['length'];
}
$len_formatter = new LengthFormatter($row_length);
$row['length'] = $len_formatter->format();
//convert mtime and utime to localtime //convert mtime and utime to localtime
$row['mtime'] = new DateTime($row['mtime'], new DateTimeZone('UTC')); $row['mtime'] = new DateTime($row['mtime'], new DateTimeZone('UTC'));
@ -1347,14 +1355,6 @@ SQL;
Application_Common_Database::prepareAndExecute($sql, array(), Application_Common_Database::prepareAndExecute($sql, array(),
Application_Common_Database::EXECUTE); Application_Common_Database::EXECUTE);
} }
public static function getRealClipLength($p_cuein, $p_cueout) {
$sql = "SELECT :cueout::INTERVAL - :cuein::INTERVAL";
return Application_Common_Database::prepareAndExecute($sql, array(
':cueout' => $p_cueout,
':cuein' => $p_cuein), 'column');
}
} }
class DeleteScheduledFileException extends Exception {} class DeleteScheduledFileException extends Exception {}

View File

@ -75,10 +75,10 @@ class Application_Service_CalendarService
} }
} else { } else {
//Show content can be modified from the calendar if: //Show content can be modified from the calendar if:
// the show has not ended, // the show has not started,
// the user is admin or hosting the show, // the user is admin or hosting the show,
// the show is not recorded // the show is not recorded
if ($now < $end && ($isAdminOrPM || $isHostOfShow) && if ($now < $start && ($isAdminOrPM || $isHostOfShow) &&
!$this->ccShowInstance->isRecorded() ) { !$this->ccShowInstance->isRecorded() ) {
$menu["schedule"] = array( $menu["schedule"] = array(
@ -328,4 +328,4 @@ class Application_Service_CalendarService
} }
} }
} }

View File

@ -248,22 +248,24 @@ class Application_Service_SchedulerService
} }
} //foreach linked instance } //foreach linked instance
$insert_sql = "INSERT INTO cc_schedule (starts, ends, ". if (!empty($values)) {
"clip_length, fade_in, fade_out, cue_in, cue_out, ". $insert_sql = "INSERT INTO cc_schedule (starts, ends, ".
"file_id, stream_id, instance_id, position) VALUES ". "clip_length, fade_in, fade_out, cue_in, cue_out, ".
implode($values, ","); "file_id, stream_id, instance_id, position) VALUES ".
implode($values, ",");
Application_Common_Database::prepareAndExecute( Application_Common_Database::prepareAndExecute(
$insert_sql, array(), Application_Common_Database::EXECUTE); $insert_sql, array(), Application_Common_Database::EXECUTE);
//update time_filled in cc_show_instances //update time_filled in cc_show_instances
$now = gmdate("Y-m-d H:i:s"); $now = gmdate("Y-m-d H:i:s");
$update_sql = "UPDATE cc_show_instances SET ". $update_sql = "UPDATE cc_show_instances SET ".
"time_filled = '{$timeFilled}', ". "time_filled = '{$timeFilled}', ".
"last_scheduled = '{$now}' ". "last_scheduled = '{$now}' ".
"WHERE show_id = {$ccShow->getDbId()}"; "WHERE show_id = {$ccShow->getDbId()}";
Application_Common_Database::prepareAndExecute( Application_Common_Database::prepareAndExecute(
$update_sql, array(), Application_Common_Database::EXECUTE); $update_sql, array(), Application_Common_Database::EXECUTE);
}
} //if at least one linked instance has content } //if at least one linked instance has content
} }

View File

@ -441,7 +441,7 @@ class Application_Service_ShowFormService
$rebroadcast = true; $rebroadcast = true;
$absRebroadcast = true; $absRebroadcast = true;
if ($formData["add_show_rebroadcast"]) { if (isset($formData["add_show_rebroadcast"]) && $formData["add_show_rebroadcast"]) {
$formData["add_show_duration"] = Application_Service_ShowService::formatShowDuration( $formData["add_show_duration"] = Application_Service_ShowService::formatShowDuration(
$formData["add_show_duration"]); $formData["add_show_duration"]);
$absRebroadcast = $forms["abs_rebroadcast"]->isValid($formData); $absRebroadcast = $forms["abs_rebroadcast"]->isValid($formData);

View File

@ -179,9 +179,6 @@ class Application_Service_ShowService
if (is_null($this->ccShow)) { if (is_null($this->ccShow)) {
$ccShowDays = $this->getShowDaysInRange($populateUntil, $end); $ccShowDays = $this->getShowDaysInRange($populateUntil, $end);
if (count($ccShowDays) > 0) {
$this->ccShow = $ccShowDays[0]->getCcShow();
}
} else { } else {
$ccShowDays = $this->ccShow->getCcShowDays(); $ccShowDays = $this->ccShow->getCcShowDays();
} }
@ -190,7 +187,18 @@ class Application_Service_ShowService
$populateUntil = $end; $populateUntil = $end;
} }
/* In case the user is moving forward in the calendar and there are
* linked shows in the schedule we need to keep track of each cc_show
* so we know which shows need to be filled with content
*/
$ccShows = array();
foreach ($ccShowDays as $day) { foreach ($ccShowDays as $day) {
$this->ccShow = $day->getCcShow();
if (!isset($ccShows[$day->getDbShowId()])) {
$ccShows[$day->getDbShowId()] = $day->getccShow();
}
switch ($day->getDbRepeatType()) { switch ($day->getDbRepeatType()) {
case NO_REPEAT: case NO_REPEAT:
$this->createNonRepeatingInstance($day, $populateUntil); $this->createNonRepeatingInstance($day, $populateUntil);
@ -212,9 +220,10 @@ class Application_Service_ShowService
} }
} }
if (isset($this->ccShow) && ($this->isUpdate || $fillInstances) && foreach ($ccShows as $ccShow) {
$this->ccShow->isLinked()) { if (($this->isUpdate || $fillInstances) && $ccShow->isLinked()) {
Application_Service_SchedulerService::fillNewLinkedInstances($this->ccShow); Application_Service_SchedulerService::fillNewLinkedInstances($ccShow);
}
} }
if (isset($this->linkedShowContent)) { if (isset($this->linkedShowContent)) {
@ -618,29 +627,45 @@ SQL;
->filterByDbShowId($showId) ->filterByDbShowId($showId)
->filterByDbModifiedInstance(false) ->filterByDbModifiedInstance(false)
->filterByDbRebroadcast(0) ->filterByDbRebroadcast(0)
->orderByDbStarts()
->find(); ->find();
if ($ccShowInstances->isEmpty()) { if ($ccShowInstances->isEmpty()) {
return true; return true;
} }
//only 1 show instance left of the show, make it non repeating. /* We need to update the last_show in cc_show_days so the instances
else if (count($ccShowInstances) === 1) { * don't get recreated as the user moves forward in the calendar
$ccShowInstance = $ccShowInstances[0]; */
else if (count($ccShowInstances) >= 1) {
$lastShowDays = array();
/* Creates an array where the key is the day of the week (monday,
* tuesday, etc.) and the value is the last show date for each
* day of the week. We will use this array to update the last_show
* for each cc_show_days entry of a cc_show
*/
foreach ($ccShowInstances as $instance) {
$instanceStartDT = new DateTime($instance->getDbStarts(),
new DateTimeZone("UTC"));
$lastShowDays[$instanceStartDT->format("w")] = $instanceStartDT;
}
$ccShowDay = CcShowDaysQuery::create() foreach ($lastShowDays as $dayOfWeek => $lastShowStartDT) {
->filterByDbShowId($showId) $ccShowDay = CcShowDaysQuery::create()
->findOne(); ->filterByDbShowId($showId)
$tz = $ccShowDay->getDbTimezone(); ->filterByDbDay($dayOfWeek)
->findOne();
$startDate = new DateTime($ccShowInstance->getDbStarts(), new DateTimeZone("UTC")); if (isset($ccShowDay)) {
$startDate->setTimeZone(new DateTimeZone($tz)); $lastShowStartDT->setTimeZone(new DateTimeZone(
$endDate = Application_Service_CalendarService::addDeltas($startDate, 1, 0); $ccShowDay->getDbTimezone()));
$lastShowEndDT = Application_Service_CalendarService::addDeltas(
$lastShowStartDT, 1, 0);
$ccShowDay->setDbFirstShow($startDate->format("Y-m-d")); $ccShowDay
$ccShowDay->setDbLastShow($endDate->format("Y-m-d")); ->setDbLastShow($lastShowEndDT->format("Y-m-d"))
$ccShowDay->setDbStartTime($startDate->format("H:i:s")); ->save();
$ccShowDay->setDbRepeatType(-1); }
$ccShowDay->save(); }
//remove the old repeating deleted instances. //remove the old repeating deleted instances.
CcShowInstancesQuery::create() CcShowInstancesQuery::create()
@ -848,6 +873,7 @@ SQL;
private function createWeeklyRepeatInstances($showDay, $populateUntil, private function createWeeklyRepeatInstances($showDay, $populateUntil,
$repeatType, $repeatInterval, $daysAdded=null) $repeatType, $repeatInterval, $daysAdded=null)
{ {
$show_id = $showDay->getDbShowId(); $show_id = $showDay->getDbShowId();
$first_show = $showDay->getDbFirstShow(); //non-UTC $first_show = $showDay->getDbFirstShow(); //non-UTC
$last_show = $showDay->getDbLastShow(); //non-UTC $last_show = $showDay->getDbLastShow(); //non-UTC
@ -870,10 +896,9 @@ SQL;
$utcLastShowDateTime = $last_show ? $utcLastShowDateTime = $last_show ?
Application_Common_DateHelper::ConvertToUtcDateTime($last_show, $timezone) : null; Application_Common_DateHelper::ConvertToUtcDateTime($last_show, $timezone) : null;
$utcStartDateTime = new DateTime("now");
$previousDate = clone $start; $previousDate = clone $start;
foreach ($datePeriod as $date) {
foreach ($datePeriod as $date) {
list($utcStartDateTime, $utcEndDateTime) = $this->createUTCStartEndDateTime( list($utcStartDateTime, $utcEndDateTime) = $this->createUTCStartEndDateTime(
$date, $duration); $date, $duration);
/* /*
@ -887,6 +912,7 @@ SQL;
( is_null($utcLastShowDateTime) || ( is_null($utcLastShowDateTime) ||
$utcStartDateTime->format("Y-m-d H:i:s") < $utcLastShowDateTime->format("Y-m-d H:i:s")) ) { $utcStartDateTime->format("Y-m-d H:i:s") < $utcLastShowDateTime->format("Y-m-d H:i:s")) ) {
$lastCreatedShow = clone $utcStartDateTime;
/* There may not always be an instance when editing a show /* There may not always be an instance when editing a show
* This will be the case when we are adding a new show day to * This will be the case when we are adding a new show day to
* a repeating show * a repeating show
@ -930,12 +956,19 @@ SQL;
$previousDate = clone $date; $previousDate = clone $date;
} }
/* Set UTC to local time before setting the next repeat date. If we don't /* We need to set the next populate date for repeat shows so when a user
* the next repeat date might be scheduled for the following day * moves forward in the calendar we know when to start generating new
* show instances.
* If $utcStartDateTime is not set then we know zero new shows were
* created and we shouldn't update the next populate date.
*/ */
$utcStartDateTime->setTimezone(new DateTimeZone(Application_Model_Preference::GetTimezone())); if (isset($lastCreatedShow)) {
$nextDate = $utcStartDateTime->add($repeatInterval); /* Set UTC to local time before setting the next repeat date. If we don't
$this->setNextRepeatingShowDate($nextDate->format("Y-m-d"), $day, $show_id); * the next repeat date might be scheduled for the following day */
$lastCreatedShow->setTimezone(new DateTimeZone(Application_Model_Preference::GetTimezone()));
$nextDate = $lastCreatedShow->add($repeatInterval);
$this->setNextRepeatingShowDate($nextDate->format("Y-m-d"), $day, $show_id);
}
} }
private function createMonthlyRepeatInstances($showDay, $populateUntil) private function createMonthlyRepeatInstances($showDay, $populateUntil)
@ -977,6 +1010,7 @@ SQL;
( is_null($utcLastShowDateTime) || ( is_null($utcLastShowDateTime) ||
$utcStartDateTime->getTimestamp() < $utcLastShowDateTime->getTimestamp()) ) { $utcStartDateTime->getTimestamp() < $utcLastShowDateTime->getTimestamp()) ) {
$lastCreatedShow = clone $utcStartDateTime;
/* There may not always be an instance when editing a show /* There may not always be an instance when editing a show
* This will be the case when we are adding a new show day to * This will be the case when we are adding a new show day to
* a repeating show * a repeating show
@ -1484,4 +1518,4 @@ SQL;
$repeatInfo->setDbNextPopDate($nextInfo[0]) $repeatInfo->setDbNextPopDate($nextInfo[0])
->save(); ->save();
} }
} }

View File

@ -18,18 +18,26 @@
<div class="jp-type-playlist"> <div class="jp-type-playlist">
<div class="jp-gui jp-interface"> <div class="jp-gui jp-interface">
<ul class="jp-controls"> <ul class="jp-controls">
<?php if ($this->type != "audioclip"): ?>
<li class="ui-state-default ui-corner-all jp-previous"> <li class="ui-state-default ui-corner-all jp-previous">
<span class="ui-icon ui-icon-seek-prev" tabindex="1"><? echo _("previous") ?></span> <span class="ui-icon ui-icon-seek-prev" tabindex="1"><? echo _("previous") ?></span>
</li> </li>
<?php endif;?>
<li class="ui-state-default ui-corner-all jp-play"> <li class="ui-state-default ui-corner-all jp-play">
<span class="ui-icon ui-icon-play" tabindex="1"><? echo _("play") ?></span> <span class="ui-icon ui-icon-play" tabindex="1"><? echo _("play") ?></span>
</li> </li>
<li class="ui-state-default ui-corner-all jp-pause"> <li class="ui-state-default ui-corner-all jp-pause">
<span class="ui-icon ui-icon-pause" tabindex="1"><? echo _("pause") ?></span> <span class="ui-icon ui-icon-pause" tabindex="1"><? echo _("pause") ?></span>
</li> </li>
<?php if ($this->type != "audioclip"): ?>
<li class="ui-state-default ui-corner-all jp-next"> <li class="ui-state-default ui-corner-all jp-next">
<span class="ui-icon ui-icon-seek-next" tabindex="1"><? echo _("next") ?></span> <span class="ui-icon ui-icon-seek-next" tabindex="1"><? echo _("next") ?></span>
</li> </li>
<?php endif;?>
<li class="ui-state-default ui-corner-all jp-stop"> <li class="ui-state-default ui-corner-all jp-stop">
<span class="ui-icon ui-icon-stop" tabindex="1"><? echo _("stop") ?></span> <span class="ui-icon ui-icon-stop" tabindex="1"><? echo _("stop") ?></span>
</li> </li>
@ -42,7 +50,9 @@
</div> </div>
<div class="jp-time-holder"> <div class="jp-time-holder">
<div class="jp-current-time"></div> <div class="jp-current-time"></div>
<?php if ($this->type == "audioclip"): ?><div class="jp-duration"></div><?php endif;?> <?php if ($this->type == "audioclip"): ?>
<div class="jp-duration"></div>
<?php endif;?>
</div> </div>
</div> </div>
<div class="jp-volume-block"> <div class="jp-volume-block">

File diff suppressed because it is too large Load Diff

View File

@ -92,10 +92,10 @@ msgstr "이 인스턴스와 이후에 모든 인스턴스 삭제"
#: airtime_mvc/application/services/CalendarService.php:210 #: airtime_mvc/application/services/CalendarService.php:210
msgid "Permission denied" msgid "Permission denied"
msgstr "" msgstr "권한이 부족합니다"
#: airtime_mvc/application/services/CalendarService.php:214 #: airtime_mvc/application/services/CalendarService.php:214
#: airtime_mvc/application/models/ShowInstance.php:245 #: airtime_mvc/application/models/ShowInstance.php:245
msgid "Can't drag and drop repeating shows" msgid "Can't drag and drop repeating shows"
msgstr "반복쇼는 드래그 앤 드롭 할수 없습니다" msgstr "반복쇼는 드래그 앤 드롭 할수 없습니다"
@ -227,12 +227,12 @@ msgstr "로그아웃"
#: airtime_mvc/application/layouts/scripts/layout.phtml:42 #: airtime_mvc/application/layouts/scripts/layout.phtml:42
#: airtime_mvc/application/layouts/scripts/layout.phtml:68 #: airtime_mvc/application/layouts/scripts/layout.phtml:68
msgid "Play" msgid "Play"
msgstr "" msgstr "재생"
#: airtime_mvc/application/layouts/scripts/layout.phtml:43 #: airtime_mvc/application/layouts/scripts/layout.phtml:43
#: airtime_mvc/application/layouts/scripts/layout.phtml:69 #: airtime_mvc/application/layouts/scripts/layout.phtml:69
msgid "Stop" msgid "Stop"
msgstr "" msgstr "정지"
#: airtime_mvc/application/layouts/scripts/layout.phtml:47 #: airtime_mvc/application/layouts/scripts/layout.phtml:47
#: airtime_mvc/application/models/Block.php:1334 #: airtime_mvc/application/models/Block.php:1334
@ -254,11 +254,11 @@ msgstr "큐 아웃"
#: airtime_mvc/application/layouts/scripts/layout.phtml:56 #: airtime_mvc/application/layouts/scripts/layout.phtml:56
msgid "Set Cue Out" msgid "Set Cue Out"
msgstr "" msgstr "큐 아웃 설정"
#: airtime_mvc/application/layouts/scripts/layout.phtml:73 #: airtime_mvc/application/layouts/scripts/layout.phtml:73
msgid "Cursor" msgid "Cursor"
msgstr "" msgstr "커서"
#: airtime_mvc/application/layouts/scripts/layout.phtml:74 #: airtime_mvc/application/layouts/scripts/layout.phtml:74
#: airtime_mvc/application/controllers/LocaleController.php:282 #: airtime_mvc/application/controllers/LocaleController.php:282
@ -370,7 +370,7 @@ msgid ""
"Cannot schedule overlapping shows.\n" "Cannot schedule overlapping shows.\n"
"Note: Resizing a repeating show affects all of its repeats." "Note: Resizing a repeating show affects all of its repeats."
msgstr "" msgstr ""
"쇼를 중복되게 스케줄 수 없습니다.\n" "쇼를 중복되게 스케줄 수 없습니다.\n"
"주의: 반복 쇼의 크기를 조정하면, 모든 반복 쇼의 크기가 바뀝니다." "주의: 반복 쇼의 크기를 조정하면, 모든 반복 쇼의 크기가 바뀝니다."
#: airtime_mvc/application/models/Webstream.php:157 #: airtime_mvc/application/models/Webstream.php:157
@ -442,7 +442,7 @@ msgstr "Airtime 암호 초기화"
#: airtime_mvc/application/models/Scheduler.php:72 #: airtime_mvc/application/models/Scheduler.php:72
msgid "Cannot move items out of linked shows" msgid "Cannot move items out of linked shows"
msgstr "" msgstr "링크 쇼에서 아이템을 분리 할수 없습니다"
#: airtime_mvc/application/models/Scheduler.php:118 #: airtime_mvc/application/models/Scheduler.php:118
msgid "The schedule you're viewing is out of date! (sched mismatch)" msgid "The schedule you're viewing is out of date! (sched mismatch)"
@ -479,7 +479,7 @@ msgstr "쇼 %s 업데이트 되었습니다!"
#: airtime_mvc/application/models/Scheduler.php:177 #: airtime_mvc/application/models/Scheduler.php:177
msgid "Content in linked shows must be scheduled before or after any one is broadcasted" msgid "Content in linked shows must be scheduled before or after any one is broadcasted"
msgstr "" msgstr "링크 쇼의 내용은 이미 방송된 쇼의 전후에만 스케쥴 할수 있습니다"
#: airtime_mvc/application/models/Scheduler.php:200 #: airtime_mvc/application/models/Scheduler.php:200
#: airtime_mvc/application/models/Scheduler.php:286 #: airtime_mvc/application/models/Scheduler.php:286
@ -566,7 +566,7 @@ msgstr ""
#: airtime_mvc/application/forms/SmartBlockCriteria.php:61 #: airtime_mvc/application/forms/SmartBlockCriteria.php:61
#: airtime_mvc/application/controllers/LocaleController.php:77 #: airtime_mvc/application/controllers/LocaleController.php:77
msgid "Label" msgid "Label"
msgstr "" msgstr "레이블"
#: airtime_mvc/application/models/Block.php:1341 #: airtime_mvc/application/models/Block.php:1341
#: airtime_mvc/application/forms/SmartBlockCriteria.php:62 #: airtime_mvc/application/forms/SmartBlockCriteria.php:62
@ -1123,7 +1123,7 @@ msgstr "Icecast 서버는 마운트 지점을 지정해야 합니다"
#: airtime_mvc/application/forms/AddShowRepeats.php:10 #: airtime_mvc/application/forms/AddShowRepeats.php:10
msgid "Link:" msgid "Link:"
msgstr "" msgstr "링크:"
#: airtime_mvc/application/forms/AddShowRepeats.php:16 #: airtime_mvc/application/forms/AddShowRepeats.php:16
msgid "Repeat Type:" msgid "Repeat Type:"
@ -1186,11 +1186,11 @@ msgstr ""
#: airtime_mvc/application/forms/AddShowRepeats.php:48 #: airtime_mvc/application/forms/AddShowRepeats.php:48
msgid "day of the month" msgid "day of the month"
msgstr "" msgstr "월중 날짜"
#: airtime_mvc/application/forms/AddShowRepeats.php:48 #: airtime_mvc/application/forms/AddShowRepeats.php:48
msgid "day of the week" msgid "day of the week"
msgstr "" msgstr "주중 날짜"
#: airtime_mvc/application/forms/AddShowRepeats.php:67 #: airtime_mvc/application/forms/AddShowRepeats.php:67
msgid "No End?" msgid "No End?"
@ -1602,7 +1602,7 @@ msgstr "암호를 입력해주세요"
#: airtime_mvc/application/forms/GeneralPreferences.php:33 #: airtime_mvc/application/forms/GeneralPreferences.php:33
msgid "Default Crossfade Duration (s):" msgid "Default Crossfade Duration (s):"
msgstr "" msgstr "기본 크로스페이드 길이(s)"
#: airtime_mvc/application/forms/GeneralPreferences.php:40 #: airtime_mvc/application/forms/GeneralPreferences.php:40
#: airtime_mvc/application/forms/GeneralPreferences.php:59 #: airtime_mvc/application/forms/GeneralPreferences.php:59
@ -1612,11 +1612,11 @@ msgstr "초단위를 입력해주세요 0{.0}"
#: airtime_mvc/application/forms/GeneralPreferences.php:52 #: airtime_mvc/application/forms/GeneralPreferences.php:52
msgid "Default Fade In (s):" msgid "Default Fade In (s):"
msgstr "" msgstr "기본 페이드 인(s)"
#: airtime_mvc/application/forms/GeneralPreferences.php:71 #: airtime_mvc/application/forms/GeneralPreferences.php:71
msgid "Default Fade Out (s):" msgid "Default Fade Out (s):"
msgstr "" msgstr "기본 페이드 아웃(s)"
#: airtime_mvc/application/forms/GeneralPreferences.php:89 #: airtime_mvc/application/forms/GeneralPreferences.php:89
#, php-format #, php-format
@ -1740,7 +1740,7 @@ msgstr "데모"
#: airtime_mvc/application/forms/SoundcloudPreferences.php:120 #: airtime_mvc/application/forms/SoundcloudPreferences.php:120
msgid "Work in progress" msgid "Work in progress"
msgstr "" msgstr "진행중"
#: airtime_mvc/application/forms/SoundcloudPreferences.php:121 #: airtime_mvc/application/forms/SoundcloudPreferences.php:121
msgid "Stem" msgid "Stem"
@ -1967,17 +1967,17 @@ msgstr "현재 페이지 선택 취소 "
msgid "Deselect all" msgid "Deselect all"
msgstr "모두 선택 취소" msgstr "모두 선택 취소"
#: airtime_mvc/application/controllers/LocaleController.php:63 #: airtime_mvc/application/controllers/LocaleController.php:63
msgid "Are you sure you want to delete the selected item(s)?" msgid "Are you sure you want to delete the selected item(s)?"
msgstr "선택된 아이템들을 모두 지우시겠습니다?" msgstr "선택된 아이템들을 모두 지우시겠습니다?"
#: airtime_mvc/application/controllers/LocaleController.php:64 #: airtime_mvc/application/controllers/LocaleController.php:64
msgid "Scheduled" msgid "Scheduled"
msgstr "" msgstr "스케쥴됨"
#: airtime_mvc/application/controllers/LocaleController.php:65 #: airtime_mvc/application/controllers/LocaleController.php:65
msgid "Playlist / Block" msgid "Playlist / Block"
msgstr "" msgstr "재생목록/블"
#: airtime_mvc/application/controllers/LocaleController.php:69 #: airtime_mvc/application/controllers/LocaleController.php:69
msgid "Bit Rate" msgid "Bit Rate"
@ -2068,7 +2068,7 @@ msgstr "현재 파일이 업로드 중입니다. %s다른 화면으로 이동하
#: airtime_mvc/application/controllers/LocaleController.php:113 #: airtime_mvc/application/controllers/LocaleController.php:113
msgid "Open Media Builder" msgid "Open Media Builder"
msgstr "" msgstr "미디아 빌더 열기"
#: airtime_mvc/application/controllers/LocaleController.php:114 #: airtime_mvc/application/controllers/LocaleController.php:114
msgid "please put in a time '00:00:00 (.0)'" msgid "please put in a time '00:00:00 (.0)'"
@ -2196,7 +2196,7 @@ msgstr "경로에 접근할수 없습니다"
#: airtime_mvc/application/controllers/LocaleController.php:170 #: airtime_mvc/application/controllers/LocaleController.php:170
#, php-format #, php-format
msgid "Some stream types require extra configuration. Details about enabling %sAAC+ Support%s or %sOpus Support%s are provided." msgid "Some stream types require extra configuration. Details about enabling %sAAC+ Support%s or %sOpus Support%s are provided."
msgstr "" msgstr "어떤 스트림은 추가 설정이 필요합니다. %sAAC+ 지원%s 또는 %sOpus 지원%s 설명"
#: airtime_mvc/application/controllers/LocaleController.php:171 #: airtime_mvc/application/controllers/LocaleController.php:171
msgid "Connected to the streaming server" msgid "Connected to the streaming server"
@ -2266,11 +2266,11 @@ msgstr "쇼 인스턴스가 존재 하지 않습니다"
#: airtime_mvc/application/controllers/LocaleController.php:195 #: airtime_mvc/application/controllers/LocaleController.php:195
msgid "Warning: Shows cannot be re-linked" msgid "Warning: Shows cannot be re-linked"
msgstr "" msgstr "주의: 쇼는 다시 링크 될수 없습니다"
#: airtime_mvc/application/controllers/LocaleController.php:196 #: airtime_mvc/application/controllers/LocaleController.php:196
msgid "By linking your repeating shows any media items scheduled in any repeat show will also get scheduled in the other repeat shows" msgid "By linking your repeating shows any media items scheduled in any repeat show will also get scheduled in the other repeat shows"
msgstr "" msgstr "반복 되는 쇼를 링크하면, 반복 쇼에 스케쥴된 아이템들이 다른 반복 쇼에도 스케쥴이 됩니다"
#: airtime_mvc/application/controllers/LocaleController.php:200 #: airtime_mvc/application/controllers/LocaleController.php:200
msgid "Show" msgid "Show"
@ -2494,15 +2494,15 @@ msgstr "아이템 %s개 이동"
#: airtime_mvc/application/controllers/LocaleController.php:295 #: airtime_mvc/application/controllers/LocaleController.php:295
msgid "Fade Editor" msgid "Fade Editor"
msgstr "" msgstr "페이드 에디터"
#: airtime_mvc/application/controllers/LocaleController.php:296 #: airtime_mvc/application/controllers/LocaleController.php:296
msgid "Cue Editor" msgid "Cue Editor"
msgstr "" msgstr "큐 에디터"
#: airtime_mvc/application/controllers/LocaleController.php:297 #: airtime_mvc/application/controllers/LocaleController.php:297
msgid "Waveform features are available in a browser supporting the Web Audio API" msgid "Waveform features are available in a browser supporting the Web Audio API"
msgstr "" msgstr "웨이브 폼 기능은 Web Audio API를 지원하면 브라우저에서만 사용 가능합니다"
#: airtime_mvc/application/controllers/LocaleController.php:300 #: airtime_mvc/application/controllers/LocaleController.php:300
msgid "Select all" msgid "Select all"
@ -3096,7 +3096,7 @@ msgstr "내용물 없음"
#: airtime_mvc/application/views/scripts/playlist/set-fade.phtml:3 #: airtime_mvc/application/views/scripts/playlist/set-fade.phtml:3
#: airtime_mvc/application/views/scripts/playlist/set-cue.phtml:3 #: airtime_mvc/application/views/scripts/playlist/set-cue.phtml:3
msgid "Show Waveform" msgid "Show Waveform"
msgstr "" msgstr "웨이브 폼 보기"
#: airtime_mvc/application/views/scripts/playlist/set-fade.phtml:6 #: airtime_mvc/application/views/scripts/playlist/set-fade.phtml:6
#: airtime_mvc/application/views/scripts/playlist/playlist.phtml:70 #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:70
@ -3143,12 +3143,12 @@ msgstr "새 웹스트림"
#: airtime_mvc/application/views/scripts/playlist/playlist.phtml:21 #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:21
msgid "Empty playlist content" msgid "Empty playlist content"
msgstr "" msgstr "재생 목록 비우기"
#: airtime_mvc/application/views/scripts/playlist/playlist.phtml:21 #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:21
#: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:21 #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:21
msgid "Clear" msgid "Clear"
msgstr "" msgstr "지우기"
#: airtime_mvc/application/views/scripts/playlist/playlist.phtml:24 #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:24
msgid "Shuffle playlist" msgid "Shuffle playlist"
@ -3175,7 +3175,7 @@ msgstr "열린 재생 목록 없음"
#: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:21 #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:21
msgid "Empty smart block content" msgid "Empty smart block content"
msgstr "" msgstr "스마트 블락 내용 지우기"
#: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:90 #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:90
msgid "No open smart block" msgid "No open smart block"

View File

@ -485,7 +485,7 @@ var AIRTIME = (function(AIRTIME){
$image, $image,
$div, $div,
headerIcon; headerIcon;
fnPrepareSeparatorRow = function fnPrepareSeparatorRow(sRowContent, sClass, iNodeIndex) { fnPrepareSeparatorRow = function fnPrepareSeparatorRow(sRowContent, sClass, iNodeIndex) {
$node = $(nRow.children[iNodeIndex]); $node = $(nRow.children[iNodeIndex]);
$node.html(sRowContent); $node.html(sRowContent);
@ -620,7 +620,7 @@ var AIRTIME = (function(AIRTIME){
} }
$node = $(nRow.children[0]); $node = $(nRow.children[0]);
if (aData.allowed === true && aData.scheduled >= 1) { if (aData.allowed === true && aData.scheduled >= 1 && aData.linked_allowed) {
$node.html('<input type="checkbox" name="'+aData.id+'"></input>'); $node.html('<input type="checkbox" name="'+aData.id+'"></input>');
} }
else { else {
@ -841,7 +841,7 @@ var AIRTIME = (function(AIRTIME){
}); });
$sbTable.find("tbody").on("click", "input:checkbox", function(ev) { $sbTable.find("tbody").on("click", "input:checkbox", function(ev) {
var $cb = $(this), var $cb = $(this),
$tr = $cb.parents("tr"), $tr = $cb.parents("tr"),
$prev; $prev;

View File

@ -3,14 +3,14 @@ in this file.
Running a diff between the original fullcalendar.js and our modified one: Running a diff between the original fullcalendar.js and our modified one:
martin@Thinkpad-T410:~/workspace/airtime/airtime_mvc/public/js/fullcalendar$ diff -u fullcalendar_orig.js fullcalendar.js denise@denise-desktop:~/airtime/airtime_mvc/public/js/fullcalendar$ diff -u fullcalendar_orig.js fullcalendar.js
--- fullcalendar_orig.js 2011-04-09 17:13:15.000000000 -0400 --- fullcalendar_orig.js 2013-05-24 08:33:54.462735215 -0400
+++ fullcalendar.js 2011-11-18 17:03:57.000000000 -0500 +++ fullcalendar.js 2013-07-19 12:42:37.274284180 -0400
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
/** /**
* @preserve * @preserve
- * FullCalendar v1.5.1 - * FullCalendar v1.5.3
+ * FullCalendar v1.5.1-CUSTOM (Changes by Martin Konecny -added primitive support for timezones) + * FullCalendar v1.5.3-CUSTOM (Changes by Martin Konecny -added primitive support for timezones)
* http://arshaw.com/fullcalendar/ * http://arshaw.com/fullcalendar/
* *
* Use fullcalendar.css for basic styling. * Use fullcalendar.css for basic styling.
@ -23,7 +23,7 @@ martin@Thinkpad-T410:~/workspace/airtime/airtime_mvc/public/js/fullcalendar$ dif
var events = []; var events = [];
var _dragElement; var _dragElement;
@@ -2275,7 +2275,7 @@ @@ -2277,7 +2277,7 @@
function updateCells(firstTime) { function updateCells(firstTime) {
var dowDirty = firstTime || rowCnt == 1; // could the cells' day-of-weeks need updating? var dowDirty = firstTime || rowCnt == 1; // could the cells' day-of-weeks need updating?
var month = t.start.getMonth(); var month = t.start.getMonth();
@ -32,7 +32,7 @@ martin@Thinkpad-T410:~/workspace/airtime/airtime_mvc/public/js/fullcalendar$ dif
var cell; var cell;
var date; var date;
var row; var row;
@@ -3108,7 +3108,7 @@ @@ -3110,7 +3110,7 @@
var headCell; var headCell;
var bodyCell; var bodyCell;
var date; var date;
@ -41,9 +41,16 @@ martin@Thinkpad-T410:~/workspace/airtime/airtime_mvc/public/js/fullcalendar$ dif
for (i=0; i<colCnt; i++) { for (i=0; i<colCnt; i++) {
date = colDate(i); date = colDate(i);
headCell = dayHeadCells.eq(i); headCell = dayHeadCells.eq(i);
@@ -5205,4 +5205,4 @@ @@ -3867,7 +3867,7 @@
if (seg.contentTop !== undefined && height - seg.contentTop < 10) {
} // not enough room for title, put it in the time header
eventElement.find('div.fc-event-time')
- .text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);
+ .text(formatDate(event.start, opt('timeFormat')) + ' - ' + formatDate(event.end, opt('timeFormat')) + ' ' + event.title);
eventElement.find('div.fc-event-title')
.remove();
}
-})(jQuery); -})(jQuery);
\ No newline at end of file \ No newline at end of file

View File

@ -3867,7 +3867,7 @@ function AgendaEventRenderer() {
if (seg.contentTop !== undefined && height - seg.contentTop < 10) { if (seg.contentTop !== undefined && height - seg.contentTop < 10) {
// not enough room for title, put it in the time header // not enough room for title, put it in the time header
eventElement.find('div.fc-event-time') eventElement.find('div.fc-event-time')
.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title); .text(formatDate(event.start, opt('timeFormat')) + ' - ' + formatDate(event.end, opt('timeFormat')) + ' ' + event.title);
eventElement.find('div.fc-event-title') eventElement.find('div.fc-event-title')
.remove(); .remove();
} }

View File

@ -1,3 +1,17 @@
2.4.0 - June 18th, 2013
* New features
* Show linking
* Repeating shows on every nth week of the month (2nd Monday etc)
* Waveform Editor (for cues/fades)
* Global crossfade setting, separate global fade in/fade out setting
* Library view shows which tracks are scheduled and/or in playlist
* Opus and AAC/AAC+ output support
* Improvements/Bug Fixes
* Show creation overhaul
* Library view re-ordering columns issue fixed
* Improved track length detection
2.3.1 - March 19th, 2013 2.3.1 - March 19th, 2013
* Bug fixes * Bug fixes
* Security fixes with running unescaped shell commands * Security fixes with running unescaped shell commands

View File

@ -0,0 +1,5 @@
[PHP]
memory_limit = 512M
magic_quotes_gpc = Off
file_uploads = On
upload_tmp_dir = /tmp

View File

@ -121,21 +121,43 @@ else
apt-get -y --force-yes install apache2 libapache2-mod-php5 apt-get -y --force-yes install apache2 libapache2-mod-php5
# Apache Config File # Apache Config File
echo "----------------------------------------------------" echo "----------------------------------------------------"
echo "2. Apache Config File" echo "2.1 Apache Config File"
echo "----------------------------------------------------" echo "----------------------------------------------------"
if [ ! -f /etc/apache2/sites-available/airtime ]; then if [ ! -f /etc/apache2/sites-available/airtime ]; then
echo "Creating Apache config for Airtime..."
cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/airtime cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/airtime
a2dissite default a2dissite default
a2ensite airtime a2ensite airtime
a2enmod rewrite php5
service apache2 restart
else else
echo "Apache config for Airtime already exists..." echo "Apache config for Airtime already exists..."
fi fi
if [ ! -d /usr/share/airtime/public ]; then
echo "Creating Apache web root directory..."
mkdir -p /usr/share/airtime/public/
else
echo "Airtime web root directory already exists..."
fi
# PHP Config File for Apache
echo "----------------------------------------------------"
echo "2.2 PHP Config File for Apache"
echo "----------------------------------------------------"
if [ ! -f /etc/php5/apache2/airtime.ini ]; then
echo "Creating Airtime PHP config for Apache..."
cp $SCRIPTPATH/../php5/airtime.ini /etc/php5/apache2/conf.d/airtime.ini
else
echo "Airtime PHP config for Apache already exists..."
fi
# Enable modules and restart Apache to enable any configuration changes
echo "----------------------------------------------------"
echo "2.3 Enable Apache Modules and Restart Apache"
echo "----------------------------------------------------"
a2enmod rewrite php5
service apache2 restart
fi fi
# Enable Icecast # Enable Icecast
echo "----------------------------------------------------" echo "----------------------------------------------------"
echo "3. Enable Icecast" echo "3. Enable Icecast"

View File

@ -41,9 +41,9 @@ source_id = ref 0
def create_source() def create_source()
l = request.equeue(id="s#{!source_id}", length=0.5) l = request.equeue(id="s#{!source_id}", length=0.5)
l = cue_cut(l)
l = audio_to_stereo(id="queue_src", l) l = audio_to_stereo(id="queue_src", l)
l = cue_cut(l)
l = amplify(1., override="replay_gain", l) l = amplify(1., override="replay_gain", l)
# the crossfade function controls fade in/out # the crossfade function controls fade in/out

View File

@ -217,7 +217,8 @@ class PypoFetch(Thread):
except Exception, e: except Exception, e:
self.logger.error(e) self.logger.error(e)
finally: finally:
self.telnet_lock.release() if self.telnet_lock.locked():
self.telnet_lock.release()
""" """
TODO: This function needs to be way shorter, and refactored :/ - MK TODO: This function needs to be way shorter, and refactored :/ - MK