diff --git a/LICENSE_3RD_PARTY b/LICENSE_3RD_PARTY index e48f0b314..7096a6f55 100644 --- a/LICENSE_3RD_PARTY +++ b/LICENSE_3RD_PARTY @@ -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 diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index edd959771..4069fbbfe 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -523,6 +523,15 @@ class ApiController extends Zend_Controller_Action } //Updating a metadata change. else { + //CC-5207 - restart media-monitor causes it to reevaluate all + //files in watched directories, and reset their cue-in/cue-out + //values. Since media-monitor has nothing to do with cue points + //let's unset it here. Note that on mode == "create", we still + //want media-monitor sending info about cue_out which by default + //will be equal to length of track until silan can take over. + unset($md['MDATA_KEY_CUE_IN']); + unset($md['MDATA_KEY_CUE_OUT']); + $file->setMetadata($md); } } elseif ($mode == "moved") { diff --git a/airtime_mvc/application/controllers/ErrorController.php b/airtime_mvc/application/controllers/ErrorController.php index 0a4fee725..70829db63 100644 --- a/airtime_mvc/application/controllers/ErrorController.php +++ b/airtime_mvc/application/controllers/ErrorController.php @@ -24,7 +24,7 @@ class ErrorController extends Zend_Controller_Action } // Log exception, if logger available - if ($log = $this->getLog()) { + if (($log = $this->getLog())) { $log->crit($this->view->message, $errors->exception); } diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php index afa4baa7a..780348372 100644 --- a/airtime_mvc/application/controllers/LibraryController.php +++ b/airtime_mvc/application/controllers/LibraryController.php @@ -393,7 +393,8 @@ class LibraryController extends Zend_Controller_Action } $c[0] = $c['item_id']; } - $newPl->addAudioClips($contents, null, 'begining'); + + $newPl->addAudioClips($contents, null, 'before'); $newPl->setCreator(Application_Model_User::getCurrentUser()->getId()); $newPl->setDescription($originalPl->getDescription()); @@ -425,6 +426,9 @@ class LibraryController extends Zend_Controller_Action $request = $this->getRequest(); + + + $file_id = $this->_getParam('id', null); $file = Application_Model_StoredFile::RecallById($file_id); @@ -437,7 +441,15 @@ class LibraryController extends Zend_Controller_Action $form->populate($file->getDbColMetadata()); if ($request->isPost()) { - if ($form->isValid($request->getPost())) { + + $js = $this->_getParam('data'); + $serialized = array(); + //need to convert from serialized jQuery array. + foreach ($js as $j) { + $serialized[$j["name"]] = $j["value"]; + } + + if ($form->isValid($serialized)) { $formValues = $this->_getParam('data', null); $formdata = array(); diff --git a/airtime_mvc/application/controllers/ListenerstatController.php b/airtime_mvc/application/controllers/ListenerstatController.php index bb280378d..3ec495839 100644 --- a/airtime_mvc/application/controllers/ListenerstatController.php +++ b/airtime_mvc/application/controllers/ListenerstatController.php @@ -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); } } diff --git a/airtime_mvc/application/controllers/LocaleController.php b/airtime_mvc/application/controllers/LocaleController.php index 463f2698c..91b9b6055 100644 --- a/airtime_mvc/application/controllers/LocaleController.php +++ b/airtime_mvc/application/controllers/LocaleController.php @@ -167,7 +167,7 @@ class LocaleController extends Zend_Controller_Action "Are you sure you want to remove the watched folder?" => _("Are you sure you want to remove the watched folder?"), "This path is currently not accessible." => _("This path is currently not accessible."), //preferences/streamsetting.js - "Some steam types require extra configuration. Details about enabling %sAAC+ Support%s or %sOpus Support%s are provided." => _("Some steam types require extra configuration. Details about enabling %sAAC+ Support%s or %sOpus Support%s are provided."), + "Some stream types require extra configuration. Details about enabling %sAAC+ Support%s or %sOpus Support%s are provided." => _("Some stream types require extra configuration. Details about enabling %sAAC+ Support%s or %sOpus Support%s are provided."), "Connected to the streaming server" => _("Connected to the streaming server"), "The stream is disabled" => _("The stream is disabled"), "Getting information from the server..." => _("Getting information from the server..."), @@ -193,6 +193,7 @@ class LocaleController extends Zend_Controller_Action "If your live streaming client does not ask for a username, this field should be 'source'." => _("If your live streaming client does not ask for a username, this field should be 'source'."), "The show instance doesn't exist anymore!" => _("The show instance doesn't exist anymore!"), "Warning: Shows cannot be re-linked" => _("Warning: Shows cannot be re-linked"), + "By linking your repeating shows any media items scheduled in any repeat show will also get scheduled in the other repeat shows" => _("By linking your repeating shows any media items scheduled in any repeat show will also get scheduled in the other repeat shows"), //schedule/full-calendar-functions //already in schedule/add-show.js //"The show instance doesn't exist anymore!" => _("The show instance doesn't exist anymore!"), diff --git a/airtime_mvc/application/controllers/PreferenceController.php b/airtime_mvc/application/controllers/PreferenceController.php index 68c7abeac..1d9f76612 100644 --- a/airtime_mvc/application/controllers/PreferenceController.php +++ b/airtime_mvc/application/controllers/PreferenceController.php @@ -30,6 +30,7 @@ class PreferenceController extends Zend_Controller_Action $this->view->statusMsg = ""; $form = new Application_Form_Preferences(); + $values = array(); if ($request->isPost()) { $params = $request->getPost(); @@ -137,11 +138,12 @@ class PreferenceController extends Zend_Controller_Action $setting[$t['keyname']] = $t['value']; } - $name_map = array('ogg' => 'Ogg Vorbis', - 'aacplus' => 'AAC+', + $name_map = array( + 'ogg' => 'Ogg Vorbis', + 'fdkaac' => 'AAC+', 'aac' => 'AAC', 'opus' => 'Opus', - 'mp3' => 'MP3' + 'mp3' => 'MP3', ); // get predefined type and bitrate from pref table @@ -162,7 +164,7 @@ class PreferenceController extends Zend_Controller_Action $stream_bitrates = array(); foreach ($temp_bitrate as $type) { if (intval($type) <= $max_bitrate) { - $stream_bitrates[trim($type)] = strtoupper(trim($type))." Kbit/s"; + $stream_bitrates[trim($type)] = strtoupper(trim($type))." kbit/s"; } } @@ -193,6 +195,7 @@ class PreferenceController extends Zend_Controller_Action $s1_data = array(); $s2_data = array(); $s3_data = array(); + $values = array(); foreach($postData as $k=>$v) { $v = explode('=', urldecode($v)); if (strpos($v[0], "s1_data") !== false) { diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index 1a02df525..406aabf73 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -600,6 +600,7 @@ class ScheduleController extends Zend_Controller_Action $baseUrl = $this->getRequest()->getBaseUrl(); $url = $file->getRelativeFileUrl($baseUrl).'download/true'; + $menu = array(); $menu[] = array('action' => array('type' => 'gourl', 'url' => $url), 'title' => _('Download')); diff --git a/airtime_mvc/application/controllers/UserController.php b/airtime_mvc/application/controllers/UserController.php index bfbe8a258..ddfd15c9c 100644 --- a/airtime_mvc/application/controllers/UserController.php +++ b/airtime_mvc/application/controllers/UserController.php @@ -41,6 +41,7 @@ class UserController extends Zend_Controller_Action if ($request->isPost()) { $params = $request->getPost(); $postData = explode('&', $params['data']); + $formData = array(); foreach($postData as $k=>$v) { $v = explode('=', $v); $formData[$v[0]] = urldecode($v[1]); diff --git a/airtime_mvc/application/forms/EditAudioMD.php b/airtime_mvc/application/forms/EditAudioMD.php index 11dda2610..cbb45af02 100644 --- a/airtime_mvc/application/forms/EditAudioMD.php +++ b/airtime_mvc/application/forms/EditAudioMD.php @@ -39,7 +39,7 @@ class Application_Form_EditAudioMD extends Zend_Form $this->addElement('text', 'track_number', array( 'label' => _('Track:'), 'class' => 'input_text', - 'filters' => array('StringTrim') + 'filters' => array('StringTrim'), )); // Add genre field @@ -50,16 +50,17 @@ class Application_Form_EditAudioMD extends Zend_Form )); // Add year field - $this->addElement('text', 'year', array( - 'label' => _('Year:'), - 'class' => 'input_text', - 'filters' => array('StringTrim'), - 'validators' => array( + $year = new Zend_Form_Element_Text('year'); + $year->class = 'input_text'; + $year->setLabel(_('Year:')) + ->setFilters(array('StringTrim')) + ->setValidators(array( + new Zend_Validate_StringLength(array('max' => 10)), Application_Form_Helper_ValidationTypes::overrrideDateValidator("YYYY-MM-DD"), Application_Form_Helper_ValidationTypes::overrrideDateValidator("YYYY-MM"), Application_Form_Helper_ValidationTypes::overrrideDateValidator("YYYY") - ) - )); + )); + $this->addElement($year); // Add label field $this->addElement('text', 'label', array( diff --git a/airtime_mvc/application/forms/SmartBlockCriteria.php b/airtime_mvc/application/forms/SmartBlockCriteria.php index cd588a215..52ea8d86d 100644 --- a/airtime_mvc/application/forms/SmartBlockCriteria.php +++ b/airtime_mvc/application/forms/SmartBlockCriteria.php @@ -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; } diff --git a/airtime_mvc/application/layouts/scripts/layout.phtml b/airtime_mvc/application/layouts/scripts/layout.phtml index f7c029ba5..fc46df5c4 100644 --- a/airtime_mvc/application/layouts/scripts/layout.phtml +++ b/airtime_mvc/application/layouts/scripts/layout.phtml @@ -36,6 +36,7 @@