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
- License: GPLv2
* RabbitMQ (works with version 1.7.2 and above)
* RabbitMQ
- What is it: Interprocess Message Passing with Queuing
- Web site: http://www.rabbitmq.com/
- License: Mozilla Public License (http://www.rabbitmq.com/mpl.html)
@ -63,11 +63,11 @@ Non-linked code:
- Web site: http://httpd.apache.org/
- 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/
- License: The PostgreSQL License. See http://www.postgresql.org/about/licence
* PHP 5.3
* PHP 5.3
- Web site: http://www.php.net/
- License: The PHP License. See http://www.php.net/license/3_01.txt
@ -137,7 +137,7 @@ Linked code:
- License: MIT
Non-linked code:
* Python 2.6
* Python 2.7
- Web site: http://www.python.org/
- License: PSF License. See http://docs.python.org/license.html
@ -158,11 +158,11 @@ Linked code:
- Compatible with GPLv3? Yes.
Non-linked code:
* Python 2.6
* Python 2.7
- Web site: http://www.python.org/
- 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
- Web site: http://www.eca.cx/ecasound/
- License: GPLv2
@ -177,10 +177,10 @@ Linked code:
- Compatible with GPLv3? Yes.
Non-linked code:
* Python 2.6
* Python 2.7
- Web site: http://www.python.org/
- License: PSF License. See http://docs.python.org/license.html
* Liquidsoap 1.0.1
* Liquidsoap 1.1.1
- Web site: http://savonet.sourceforge.net/
- 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.
* 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')
->initContext();
}
public function indexAction()
{
$CC_CONFIG = Config::getConfig();
$request = $this->getRequest();
$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.crosshair.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;
$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/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->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']);
//default time is the last 24 hours.
$now = time();
$from = $request->getParam("from", $now - (24*60*60));
$to = $request->getParam("to", $now);
$start = DateTime::createFromFormat("U", $from, new DateTimeZone("UTC"));
$start->setTimezone(new DateTimeZone(date_default_timezone_get()));
$end = DateTime::createFromFormat("U", $to, new DateTimeZone("UTC"));
$end->setTimezone(new DateTimeZone(date_default_timezone_get()));
$form = new Application_Form_DateRange();
$form->populate(array(
'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_time_end' => $end->format("H:i")
));
$errorStatus = Application_Model_StreamSetting::GetAllListenerStatErrors();
Logging::info($errorStatus);
$out = array();
@ -57,25 +57,24 @@ class ListenerstatController extends Zend_Controller_Action
}
$out[$key[0]] = $v['value'];
}
$this->view->errorStatus = $out;
$this->view->date_form = $form;
}
public function getDataAction(){
$request = $this->getRequest();
$current_time = time();
$params = $request->getParams();
$starts_epoch = $request->getParam("startTimestamp", $current_time - (60*60*24));
$ends_epoch = $request->getParam("endTimestamp", $current_time);
$mountName = $request->getParam("mountName", null);
$startsDT = DateTime::createFromFormat("U", $starts_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);
$this->_helper->json->sendJson($data);
$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);
}
}

View File

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

View File

@ -4,7 +4,7 @@ class Application_Model_ListenerStat
public function __construct()
{
}
public static function getDataPointsWithinRange($p_start, $p_end) {
$sql = <<<SQL
SELECT mount_name, count(*)
@ -16,13 +16,13 @@ group by mount_name
SQL;
$data = Application_Common_Database::prepareAndExecute($sql,
array('p1'=>$p_start, 'p2'=>$p_end));
$out = array();
foreach ($data as $d) {
$jump = intval($d['count']/1000);
$jump = max(1, $jump);
$remainder = $jump == 1?0:1;
$sql = <<<SQL
SELECT *
FROM
@ -41,29 +41,36 @@ SQL;
$t->setTimezone(new DateTimeZone(date_default_timezone_get()));
// 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"));
$r['timestamp'] = $dt->format("U");
$out[$r['mount_name']][] = $r;
}
}
$enabledStreamIds = Application_Model_StreamSetting::getEnabledStreamIds();
$enabledOut = array();
foreach ($enabledStreamIds as $sId) {
$sql = "SELECT value FROM cc_stream_setting"
." WHERE keyname = :key";
$result = Application_Common_Database::prepareAndExecute($sql, array('key' => $sId."_mount"), "single");
$enabledMountPoint = $result["value"];
if (isset($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;
}

View File

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

View File

@ -778,17 +778,18 @@ SQL;
foreach ($results['aaData'] as &$row) {
$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") {
$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']);
$row['sample_rate'] = $formatter->format();
@ -801,9 +802,16 @@ SQL;
// for audio preview
$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
$row['mtime'] = new DateTime($row['mtime'], new DateTimeZone('UTC'));
@ -1347,14 +1355,6 @@ SQL;
Application_Common_Database::prepareAndExecute($sql, array(),
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 {}

View File

@ -75,10 +75,10 @@ class Application_Service_CalendarService
}
} else {
//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 show is not recorded
if ($now < $end && ($isAdminOrPM || $isHostOfShow) &&
if ($now < $start && ($isAdminOrPM || $isHostOfShow) &&
!$this->ccShowInstance->isRecorded() ) {
$menu["schedule"] = array(
@ -328,4 +328,4 @@ class Application_Service_CalendarService
}
}
}
}

View File

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

View File

@ -441,7 +441,7 @@ class Application_Service_ShowFormService
$rebroadcast = 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"]);
$absRebroadcast = $forms["abs_rebroadcast"]->isValid($formData);

View File

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

View File

@ -18,18 +18,26 @@
<div class="jp-type-playlist">
<div class="jp-gui jp-interface">
<ul class="jp-controls">
<?php if ($this->type != "audioclip"): ?>
<li class="ui-state-default ui-corner-all jp-previous">
<span class="ui-icon ui-icon-seek-prev" tabindex="1"><? echo _("previous") ?></span>
</li>
<?php endif;?>
<li class="ui-state-default ui-corner-all jp-play">
<span class="ui-icon ui-icon-play" tabindex="1"><? echo _("play") ?></span>
</li>
<li class="ui-state-default ui-corner-all jp-pause">
<span class="ui-icon ui-icon-pause" tabindex="1"><? echo _("pause") ?></span>
</li>
<?php if ($this->type != "audioclip"): ?>
<li class="ui-state-default ui-corner-all jp-next">
<span class="ui-icon ui-icon-seek-next" tabindex="1"><? echo _("next") ?></span>
</li>
<?php endif;?>
<li class="ui-state-default ui-corner-all jp-stop">
<span class="ui-icon ui-icon-stop" tabindex="1"><? echo _("stop") ?></span>
</li>
@ -42,7 +50,9 @@
</div>
<div class="jp-time-holder">
<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 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
msgid "Permission denied"
msgstr ""
msgstr "권한이 부족합니다"
#: 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"
msgstr "반복쇼는 드래그 앤 드롭 할수 없습니다"
@ -227,12 +227,12 @@ msgstr "로그아웃"
#: airtime_mvc/application/layouts/scripts/layout.phtml:42
#: airtime_mvc/application/layouts/scripts/layout.phtml:68
msgid "Play"
msgstr ""
msgstr "재생"
#: airtime_mvc/application/layouts/scripts/layout.phtml:43
#: airtime_mvc/application/layouts/scripts/layout.phtml:69
msgid "Stop"
msgstr ""
msgstr "정지"
#: airtime_mvc/application/layouts/scripts/layout.phtml:47
#: airtime_mvc/application/models/Block.php:1334
@ -254,11 +254,11 @@ msgstr "큐 아웃"
#: airtime_mvc/application/layouts/scripts/layout.phtml:56
msgid "Set Cue Out"
msgstr ""
msgstr "큐 아웃 설정"
#: airtime_mvc/application/layouts/scripts/layout.phtml:73
msgid "Cursor"
msgstr ""
msgstr "커서"
#: airtime_mvc/application/layouts/scripts/layout.phtml:74
#: airtime_mvc/application/controllers/LocaleController.php:282
@ -370,7 +370,7 @@ msgid ""
"Cannot schedule overlapping shows.\n"
"Note: Resizing a repeating show affects all of its repeats."
msgstr ""
"쇼를 중복되게 스케줄 수 없습니다.\n"
"쇼를 중복되게 스케줄 수 없습니다.\n"
"주의: 반복 쇼의 크기를 조정하면, 모든 반복 쇼의 크기가 바뀝니다."
#: airtime_mvc/application/models/Webstream.php:157
@ -442,7 +442,7 @@ msgstr "Airtime 암호 초기화"
#: airtime_mvc/application/models/Scheduler.php:72
msgid "Cannot move items out of linked shows"
msgstr ""
msgstr "링크 쇼에서 아이템을 분리 할수 없습니다"
#: airtime_mvc/application/models/Scheduler.php:118
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
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:286
@ -566,7 +566,7 @@ msgstr ""
#: airtime_mvc/application/forms/SmartBlockCriteria.php:61
#: airtime_mvc/application/controllers/LocaleController.php:77
msgid "Label"
msgstr ""
msgstr "레이블"
#: airtime_mvc/application/models/Block.php:1341
#: airtime_mvc/application/forms/SmartBlockCriteria.php:62
@ -1123,7 +1123,7 @@ msgstr "Icecast 서버는 마운트 지점을 지정해야 합니다"
#: airtime_mvc/application/forms/AddShowRepeats.php:10
msgid "Link:"
msgstr ""
msgstr "링크:"
#: airtime_mvc/application/forms/AddShowRepeats.php:16
msgid "Repeat Type:"
@ -1186,11 +1186,11 @@ msgstr ""
#: airtime_mvc/application/forms/AddShowRepeats.php:48
msgid "day of the month"
msgstr ""
msgstr "월중 날짜"
#: airtime_mvc/application/forms/AddShowRepeats.php:48
msgid "day of the week"
msgstr ""
msgstr "주중 날짜"
#: airtime_mvc/application/forms/AddShowRepeats.php:67
msgid "No End?"
@ -1602,7 +1602,7 @@ msgstr "암호를 입력해주세요"
#: airtime_mvc/application/forms/GeneralPreferences.php:33
msgid "Default Crossfade Duration (s):"
msgstr ""
msgstr "기본 크로스페이드 길이(s)"
#: airtime_mvc/application/forms/GeneralPreferences.php:40
#: airtime_mvc/application/forms/GeneralPreferences.php:59
@ -1612,11 +1612,11 @@ msgstr "초단위를 입력해주세요 0{.0}"
#: airtime_mvc/application/forms/GeneralPreferences.php:52
msgid "Default Fade In (s):"
msgstr ""
msgstr "기본 페이드 인(s)"
#: airtime_mvc/application/forms/GeneralPreferences.php:71
msgid "Default Fade Out (s):"
msgstr ""
msgstr "기본 페이드 아웃(s)"
#: airtime_mvc/application/forms/GeneralPreferences.php:89
#, php-format
@ -1740,7 +1740,7 @@ msgstr "데모"
#: airtime_mvc/application/forms/SoundcloudPreferences.php:120
msgid "Work in progress"
msgstr ""
msgstr "진행중"
#: airtime_mvc/application/forms/SoundcloudPreferences.php:121
msgid "Stem"
@ -1967,17 +1967,17 @@ msgstr "현재 페이지 선택 취소 "
msgid "Deselect all"
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)?"
msgstr "선택된 아이템들을 모두 지우시겠습니다?"
#: airtime_mvc/application/controllers/LocaleController.php:64
msgid "Scheduled"
msgstr ""
msgstr "스케쥴됨"
#: airtime_mvc/application/controllers/LocaleController.php:65
msgid "Playlist / Block"
msgstr ""
msgstr "재생목록/블"
#: airtime_mvc/application/controllers/LocaleController.php:69
msgid "Bit Rate"
@ -2068,7 +2068,7 @@ msgstr "현재 파일이 업로드 중입니다. %s다른 화면으로 이동하
#: airtime_mvc/application/controllers/LocaleController.php:113
msgid "Open Media Builder"
msgstr ""
msgstr "미디아 빌더 열기"
#: airtime_mvc/application/controllers/LocaleController.php:114
msgid "please put in a time '00:00:00 (.0)'"
@ -2196,7 +2196,7 @@ msgstr "경로에 접근할수 없습니다"
#: airtime_mvc/application/controllers/LocaleController.php:170
#, php-format
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
msgid "Connected to the streaming server"
@ -2266,11 +2266,11 @@ msgstr "쇼 인스턴스가 존재 하지 않습니다"
#: airtime_mvc/application/controllers/LocaleController.php:195
msgid "Warning: Shows cannot be re-linked"
msgstr ""
msgstr "주의: 쇼는 다시 링크 될수 없습니다"
#: 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"
msgstr ""
msgstr "반복 되는 쇼를 링크하면, 반복 쇼에 스케쥴된 아이템들이 다른 반복 쇼에도 스케쥴이 됩니다"
#: airtime_mvc/application/controllers/LocaleController.php:200
msgid "Show"
@ -2494,15 +2494,15 @@ msgstr "아이템 %s개 이동"
#: airtime_mvc/application/controllers/LocaleController.php:295
msgid "Fade Editor"
msgstr ""
msgstr "페이드 에디터"
#: airtime_mvc/application/controllers/LocaleController.php:296
msgid "Cue Editor"
msgstr ""
msgstr "큐 에디터"
#: airtime_mvc/application/controllers/LocaleController.php:297
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
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-cue.phtml:3
msgid "Show Waveform"
msgstr ""
msgstr "웨이브 폼 보기"
#: airtime_mvc/application/views/scripts/playlist/set-fade.phtml:6
#: airtime_mvc/application/views/scripts/playlist/playlist.phtml:70
@ -3143,12 +3143,12 @@ msgstr "새 웹스트림"
#: airtime_mvc/application/views/scripts/playlist/playlist.phtml:21
msgid "Empty playlist content"
msgstr ""
msgstr "재생 목록 비우기"
#: airtime_mvc/application/views/scripts/playlist/playlist.phtml:21
#: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:21
msgid "Clear"
msgstr ""
msgstr "지우기"
#: airtime_mvc/application/views/scripts/playlist/playlist.phtml:24
msgid "Shuffle playlist"
@ -3175,7 +3175,7 @@ msgstr "열린 재생 목록 없음"
#: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:21
msgid "Empty smart block content"
msgstr ""
msgstr "스마트 블락 내용 지우기"
#: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:90
msgid "No open smart block"

View File

@ -485,7 +485,7 @@ var AIRTIME = (function(AIRTIME){
$image,
$div,
headerIcon;
fnPrepareSeparatorRow = function fnPrepareSeparatorRow(sRowContent, sClass, iNodeIndex) {
$node = $(nRow.children[iNodeIndex]);
$node.html(sRowContent);
@ -620,7 +620,7 @@ var AIRTIME = (function(AIRTIME){
}
$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>');
}
else {
@ -841,7 +841,7 @@ var AIRTIME = (function(AIRTIME){
});
$sbTable.find("tbody").on("click", "input:checkbox", function(ev) {
var $cb = $(this),
$tr = $cb.parents("tr"),
$prev;

View File

@ -3,14 +3,14 @@ in this file.
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
--- fullcalendar_orig.js 2011-04-09 17:13:15.000000000 -0400
+++ fullcalendar.js 2011-11-18 17:03:57.000000000 -0500
denise@denise-desktop:~/airtime/airtime_mvc/public/js/fullcalendar$ diff -u fullcalendar_orig.js fullcalendar.js
--- fullcalendar_orig.js 2013-05-24 08:33:54.462735215 -0400
+++ fullcalendar.js 2013-07-19 12:42:37.274284180 -0400
@@ -1,6 +1,6 @@
/**
* @preserve
- * FullCalendar v1.5.1
+ * FullCalendar v1.5.1-CUSTOM (Changes by Martin Konecny -added primitive support for timezones)
- * FullCalendar v1.5.3
+ * FullCalendar v1.5.3-CUSTOM (Changes by Martin Konecny -added primitive support for timezones)
* http://arshaw.com/fullcalendar/
*
* Use fullcalendar.css for basic styling.
@ -23,7 +23,7 @@ martin@Thinkpad-T410:~/workspace/airtime/airtime_mvc/public/js/fullcalendar$ dif
var events = [];
var _dragElement;
@@ -2275,7 +2275,7 @@
@@ -2277,7 +2277,7 @@
function updateCells(firstTime) {
var dowDirty = firstTime || rowCnt == 1; // could the cells' day-of-weeks need updating?
var month = t.start.getMonth();
@ -32,7 +32,7 @@ martin@Thinkpad-T410:~/workspace/airtime/airtime_mvc/public/js/fullcalendar$ dif
var cell;
var date;
var row;
@@ -3108,7 +3108,7 @@
@@ -3110,7 +3110,7 @@
var headCell;
var bodyCell;
var date;
@ -41,9 +41,16 @@ martin@Thinkpad-T410:~/workspace/airtime/airtime_mvc/public/js/fullcalendar$ dif
for (i=0; i<colCnt; i++) {
date = colDate(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);
\ No newline at end of file

View File

@ -3867,7 +3867,7 @@ function AgendaEventRenderer() {
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();
}

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
* Bug fixes
* 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
# Apache Config File
echo "----------------------------------------------------"
echo "2. Apache Config File"
echo "2.1 Apache Config File"
echo "----------------------------------------------------"
if [ ! -f /etc/apache2/sites-available/airtime ]; then
echo "Creating Apache config for Airtime..."
cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/airtime
a2dissite default
a2ensite airtime
a2enmod rewrite php5
service apache2 restart
else
echo "Apache config for Airtime already exists..."
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
# Enable Icecast
echo "----------------------------------------------------"
echo "3. Enable Icecast"

View File

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

View File

@ -217,7 +217,8 @@ class PypoFetch(Thread):
except Exception, e:
self.logger.error(e)
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