Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Martin Konecny 2013-04-01 19:15:02 -04:00
commit 5ac51e289d
165 changed files with 11281 additions and 14803 deletions

View File

@ -2,7 +2,7 @@
CREDITS CREDITS
======= =======
Version 2.3.0 Version 2.3.0/2.3.1
------------- -------------
Martin Konecny (martin.konecny@sourcefabric.org) Martin Konecny (martin.konecny@sourcefabric.org)
Role: Developer Team Lead Role: Developer Team Lead

View File

@ -1,2 +1,2 @@
PRODUCT_ID=Airtime PRODUCT_ID=Airtime
PRODUCT_RELEASE=2.3.0 PRODUCT_RELEASE=2.3.1

View File

@ -17,15 +17,12 @@ require_once "Timezone.php";
require_once __DIR__.'/forms/helpers/ValidationTypes.php'; require_once __DIR__.'/forms/helpers/ValidationTypes.php';
require_once __DIR__.'/controllers/plugins/RabbitMqPlugin.php'; require_once __DIR__.'/controllers/plugins/RabbitMqPlugin.php';
date_default_timezone_set('UTC'); date_default_timezone_set('UTC');
require_once (APPLICATION_PATH."/logging/Logging.php"); require_once (APPLICATION_PATH."/logging/Logging.php");
Logging::setLogPath('/var/log/airtime/zendphp.log'); Logging::setLogPath('/var/log/airtime/zendphp.log');
date_default_timezone_set(Application_Model_Preference::GetTimezone()); date_default_timezone_set(Application_Model_Preference::GetTimezone());
Config::setAirtimeVersion(); Config::setAirtimeVersion();
$CC_CONFIG = Config::getConfig();
require_once __DIR__."/configs/navigation.php"; require_once __DIR__."/configs/navigation.php";
Zend_Validate::setDefaultNamespaces("Zend"); Zend_Validate::setDefaultNamespaces("Zend");

View File

@ -229,7 +229,7 @@ class Application_Common_DateHelper
public static function calculateLengthInSeconds($p_time){ public static function calculateLengthInSeconds($p_time){
if (2 !== substr_count($p_time, ":")){ if (2 !== substr_count($p_time, ":")){
return FALSE; return false;
} }
if (1 === substr_count($p_time, ".")){ if (1 === substr_count($p_time, ".")){
@ -241,12 +241,8 @@ class Application_Common_DateHelper
list($hours, $minutes, $seconds) = explode(":", $hhmmss); list($hours, $minutes, $seconds) = explode(":", $hhmmss);
// keep ms in 3 digits $totalSeconds = ($hours*3600 + $minutes*60 + $seconds).".$ms";
$ms = substr($ms, 0, 3); return round($totalSeconds, 3);
$totalSeconds = $hours*3600 + $minutes*60 + $seconds + $ms/1000;
return $totalSeconds;
} }
public static function ConvertToUtcDateTime($p_dateString, $timezone=null){ public static function ConvertToUtcDateTime($p_dateString, $timezone=null){

View File

@ -1,6 +1,6 @@
<?php <?php
// This file generated by Propel 1.5.2 convert-conf target // This file generated by Propel 1.5.2 convert-conf target
// from XML runtime conf file /home/rudi/reps/Airtime/airtime_mvc/build/runtime-conf.xml // from XML runtime conf file /home/denise/airtime/airtime_mvc/build/runtime-conf.xml
$conf = array ( $conf = array (
'datasources' => 'datasources' =>
array ( array (

View File

@ -42,8 +42,10 @@ class ApiController extends Zend_Controller_Action
->addActionContext('reload-metadata-group' , 'json') ->addActionContext('reload-metadata-group' , 'json')
->addActionContext('notify-webstream-data' , 'json') ->addActionContext('notify-webstream-data' , 'json')
->addActionContext('get-stream-parameters' , 'json') ->addActionContext('get-stream-parameters' , 'json')
->addActionContext('push-stream-stats' , 'json') ->addActionContext('push-stream-stats' , 'json')
->addActionContext('update-stream-setting-table' , 'json') ->addActionContext('update-stream-setting-table' , 'json')
->addActionContext('update-replay-gain-value' , 'json')
->addActionContext('update-cue-values-by-silan' , 'json')
->initContext(); ->initContext();
} }
@ -261,7 +263,14 @@ class ApiController extends Zend_Controller_Action
"currentShow"=>Application_Model_Show::getCurrentShow($utcTimeNow), "currentShow"=>Application_Model_Show::getCurrentShow($utcTimeNow),
"nextShow"=>Application_Model_Show::getNextShows($utcTimeNow, $limit, $utcTimeEnd) "nextShow"=>Application_Model_Show::getNextShows($utcTimeNow, $limit, $utcTimeEnd)
); );
// XSS exploit prevention
foreach ($result["currentShow"] as &$current) {
$current["name"] = htmlspecialchars($current["name"]);
}
foreach ($result["nextShow"] as &$next) {
$next["name"] = htmlspecialchars($next["name"]);
}
Application_Model_Show::convertToLocalTimeZone($result["currentShow"], Application_Model_Show::convertToLocalTimeZone($result["currentShow"],
array("starts", "ends", "start_timestamp", "end_timestamp")); array("starts", "ends", "start_timestamp", "end_timestamp"));
Application_Model_Show::convertToLocalTimeZone($result["nextShow"], Application_Model_Show::convertToLocalTimeZone($result["nextShow"],
@ -269,6 +278,17 @@ class ApiController extends Zend_Controller_Action
} else { } else {
$result = Application_Model_Schedule::GetPlayOrderRange(); $result = Application_Model_Schedule::GetPlayOrderRange();
// XSS exploit prevention
$result["previous"]["name"] = htmlspecialchars($result["previous"]["name"]);
$result["current"]["name"] = htmlspecialchars($result["current"]["name"]);
$result["next"]["name"] = htmlspecialchars($result["next"]["name"]);
foreach ($result["currentShow"] as &$current) {
$current["name"] = htmlspecialchars($current["name"]);
}
foreach ($result["nextShow"] as &$next) {
$next["name"] = htmlspecialchars($next["name"]);
}
//Convert from UTC to localtime for Web Browser. //Convert from UTC to localtime for Web Browser.
Application_Model_Show::ConvertToLocalTimeZone($result["currentShow"], Application_Model_Show::ConvertToLocalTimeZone($result["currentShow"],
array("starts", "ends", "start_timestamp", "end_timestamp")); array("starts", "ends", "start_timestamp", "end_timestamp"));
@ -315,7 +335,15 @@ class ApiController extends Zend_Controller_Action
$result[$dow[$i]] = $shows; $result[$dow[$i]] = $shows;
} }
// XSS exploit prevention
foreach ($dow as $d) {
foreach ($result[$d] as &$show) {
$show["name"] = htmlspecialchars($show["name"]);
$show["url"] = htmlspecialchars($show["url"]);
}
}
//used by caller to determine if the airtime they are running or widgets in use is out of date. //used by caller to determine if the airtime they are running or widgets in use is out of date.
$result['AIRTIME_API_VERSION'] = AIRTIME_API_VERSION; $result['AIRTIME_API_VERSION'] = AIRTIME_API_VERSION;
header("Content-type: text/javascript"); header("Content-type: text/javascript");
@ -411,7 +439,9 @@ class ApiController extends Zend_Controller_Action
$result = Application_Model_StoredFile::copyFileToStor($upload_dir, $fileName, $tempFileName); $result = Application_Model_StoredFile::copyFileToStor($upload_dir, $fileName, $tempFileName);
if (!is_null($result)) { if (!is_null($result)) {
die('{"jsonrpc" : "2.0", "error" : {"code": '.$result['code'].', "message" : "'.$result['message'].'"}}'); $this->_helper->json->sendJson(
array("jsonrpc" => "2.0", "error" => array("code" => $result['code'], "message" => $result['message']))
);
} }
} }
@ -600,7 +630,7 @@ class ApiController extends Zend_Controller_Action
$response['key'] = $k; $response['key'] = $k;
array_push($responses, $response); array_push($responses, $response);
} }
die( json_encode($responses) ); $this->_helper->json->sendJson($responses);
} }
public function listAllFilesAction() public function listAllFilesAction()
@ -668,7 +698,6 @@ class ApiController extends Zend_Controller_Action
"platform"=>Application_Model_Systemstatus::GetPlatformInfo(), "platform"=>Application_Model_Systemstatus::GetPlatformInfo(),
"airtime_version"=>Application_Model_Preference::GetAirtimeVersion(), "airtime_version"=>Application_Model_Preference::GetAirtimeVersion(),
"services"=>array( "services"=>array(
"rabbitmq"=>Application_Model_Systemstatus::GetRabbitMqStatus(),
"pypo"=>Application_Model_Systemstatus::GetPypoStatus(), "pypo"=>Application_Model_Systemstatus::GetPypoStatus(),
"liquidsoap"=>Application_Model_Systemstatus::GetLiquidsoapStatus(), "liquidsoap"=>Application_Model_Systemstatus::GetLiquidsoapStatus(),
"media_monitor"=>Application_Model_Systemstatus::GetMediaMonitorStatus() "media_monitor"=>Application_Model_Systemstatus::GetMediaMonitorStatus()
@ -919,7 +948,7 @@ class ApiController extends Zend_Controller_Action
public function updateReplayGainValueAction() public function updateReplayGainValueAction()
{ {
// disable layout // disable the view and the layout
$this->view->layout()->disableLayout(); $this->view->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true); $this->_helper->viewRenderer->setNoRender(true);
@ -933,17 +962,19 @@ class ApiController extends Zend_Controller_Action
$file->setDbReplayGain($gain); $file->setDbReplayGain($gain);
$file->save(); $file->save();
} }
$this->view->msg = "OK";
} }
public function updateCueValuesBySilanAction() public function updateCueValuesBySilanAction()
{ {
// disable layout // disable the view and the layout
$this->view->layout()->disableLayout(); $this->view->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true); $this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest(); $request = $this->getRequest();
$data = json_decode($request->getParam('data')); $data = json_decode($request->getParam('data'));
Logging::info($data);
foreach ($data as $pair) { foreach ($data as $pair) {
list($id, $info) = $pair; list($id, $info) = $pair;
// TODO : move this code into model -- RG // TODO : move this code into model -- RG
@ -955,6 +986,8 @@ class ApiController extends Zend_Controller_Action
$file->setDbSilanCheck(true); $file->setDbSilanCheck(true);
$file->save(); $file->save();
} }
echo json_encode(array());
} }
public function notifyWebstreamDataAction() public function notifyWebstreamDataAction()
@ -962,7 +995,6 @@ class ApiController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
$data = $request->getParam("data"); $data = $request->getParam("data");
$media_id = $request->getParam("media_id"); $media_id = $request->getParam("media_id");
$data_arr = json_decode($data); $data_arr = json_decode($data);
if (!is_null($media_id)) { if (!is_null($media_id)) {

View File

@ -60,8 +60,10 @@ class AudiopreviewController extends Zend_Controller_Action
$this->view->uri = $uri; $this->view->uri = $uri;
$this->view->mime = $mime; $this->view->mime = $mime;
$this->view->audioFileID = $audioFileID; $this->view->audioFileID = $audioFileID;
$this->view->audioFileArtist = $audioFileArtist; // We need to decode artist and title because it gets
$this->view->audioFileTitle = $audioFileTitle; // encoded twice in js
$this->view->audioFileArtist = htmlspecialchars(urldecode($audioFileArtist));
$this->view->audioFileTitle = htmlspecialchars(urldecode($audioFileTitle));
$this->view->type = $type; $this->view->type = $type;
$this->_helper->viewRenderer->setRender('audio-preview'); $this->_helper->viewRenderer->setRender('audio-preview');

View File

@ -81,6 +81,17 @@ class LibraryController extends Zend_Controller_Action
$this->view->length = $formatter->format(); $this->view->length = $formatter->format();
$this->view->type = $obj_sess->type; $this->view->type = $obj_sess->type;
} }
//get user settings and determine if we need to hide
// or show the playlist editor
$showPlaylist = false;
$data = Application_Model_Preference::getLibraryScreenSettings();
if (!is_null($data)) {
if ($data["playlist"] == "true") {
$showPlaylist = true;
}
}
$this->view->showPlaylist = $showPlaylist;
} catch (PlaylistNotFoundException $e) { } catch (PlaylistNotFoundException $e) {
$this->playlistNotFound($obj_sess->type); $this->playlistNotFound($obj_sess->type);
} catch (Exception $e) { } catch (Exception $e) {
@ -382,23 +393,6 @@ class LibraryController extends Zend_Controller_Action
# terrible name for the method below. it does not only search files. # terrible name for the method below. it does not only search files.
$r = Application_Model_StoredFile::searchLibraryFiles($params); $r = Application_Model_StoredFile::searchLibraryFiles($params);
//TODO move this to the datatables row callback.
foreach ($r["aaData"] as &$data) {
if ($data['ftype'] == 'audioclip') {
$file = Application_Model_StoredFile::Recall($data['id']);
$scid = $file->getSoundCloudId();
if ($scid == "-2") {
$data['track_title'] .= '<span class="small-icon progress"/>';
} elseif ($scid == "-3") {
$data['track_title'] .= '<span class="small-icon sc-error"/>';
} elseif (!is_null($scid)) {
$data['track_title'] .= '<span class="small-icon soundcloud"/>';
}
}
}
$this->view->sEcho = $r["sEcho"]; $this->view->sEcho = $r["sEcho"];
$this->view->iTotalDisplayRecords = $r["iTotalDisplayRecords"]; $this->view->iTotalDisplayRecords = $r["iTotalDisplayRecords"];
$this->view->iTotalRecords = $r["iTotalRecords"]; $this->view->iTotalRecords = $r["iTotalRecords"];
@ -524,7 +518,7 @@ class LibraryController extends Zend_Controller_Action
$id = $this->_getParam('id'); $id = $this->_getParam('id');
Application_Model_Soundcloud::uploadSoundcloud($id); Application_Model_Soundcloud::uploadSoundcloud($id);
// we should die with ui info // we should die with ui info
die(); $this->_helper->json->sendJson(null);
} }
public function getUploadToSoundcloudStatusAction() public function getUploadToSoundcloudStatusAction()

View File

@ -76,6 +76,6 @@ class ListenerstatController extends Zend_Controller_Action
$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"), $mountName);
die(json_encode($data)); $this->_helper->json->sendJson($data);
} }
} }

View File

@ -4,10 +4,6 @@ class LocaleController extends Zend_Controller_Action
{ {
public function init() public function init()
{ {
$ajaxContext = $this->_helper->getHelper("AjaxContext");
$ajaxContext->addActionContext("general-translation-table", "json")
->addActionContext("datatables-translation-table", "json")
->initContext();
} }
public function datatablesTranslationTableAction() public function datatablesTranslationTableAction()
@ -26,7 +22,7 @@ class LocaleController extends Zend_Controller_Action
$locale.".txt") $locale.".txt")
); );
} }
public function generalTranslationTableAction() public function generalTranslationTableAction()
{ {
$translations = array ( $translations = array (

View File

@ -14,6 +14,7 @@ class PlaylistController extends Zend_Controller_Action
->addActionContext('new', 'json') ->addActionContext('new', 'json')
->addActionContext('edit', 'json') ->addActionContext('edit', 'json')
->addActionContext('delete', 'json') ->addActionContext('delete', 'json')
->addActionContext('close-playlist', 'json')
->addActionContext('play', 'json') ->addActionContext('play', 'json')
->addActionContext('set-playlist-fades', 'json') ->addActionContext('set-playlist-fades', 'json')
->addActionContext('get-playlist-fades', 'json') ->addActionContext('get-playlist-fades', 'json')
@ -26,6 +27,7 @@ class PlaylistController extends Zend_Controller_Action
->addActionContext('smart-block-shuffle', 'json') ->addActionContext('smart-block-shuffle', 'json')
->addActionContext('get-block-info', 'json') ->addActionContext('get-block-info', 'json')
->addActionContext('shuffle', 'json') ->addActionContext('shuffle', 'json')
->addActionContext('empty-content', 'json')
->initContext(); ->initContext();
} }
@ -132,7 +134,7 @@ class PlaylistController extends Zend_Controller_Action
if (!$p_isJson) { if (!$p_isJson) {
$this->createFullResponse(null); $this->createFullResponse(null);
} else { } else {
die(json_encode(array("error"=>$this->view->error, "result"=>1, "html"=>$this->createFullResponse(null, $p_isJson)))); $this->_helper->json->sendJson(array("error"=>$this->view->error, "result"=>1, "html"=>$this->createFullResponse(null, $p_isJson)));
} }
} }
@ -245,6 +247,13 @@ class PlaylistController extends Zend_Controller_Action
} }
} }
public function closePlaylistAction() {
$type = $this->_getParam('type');
$obj = null;
Application_Model_Library::changePlaylist($obj, $type);
$this->createFullResponse($obj);
}
public function addItemsAction() public function addItemsAction()
{ {
$ids = $this->_getParam('aItems', array()); $ids = $this->_getParam('aItems', array());
@ -336,6 +345,26 @@ class PlaylistController extends Zend_Controller_Action
$this->playlistUnknownError($e); $this->playlistUnknownError($e);
} }
} }
public function emptyContentAction()
{
$type = $this->_getParam('obj_type');
try {
$obj = $this->getPlaylist($type);
if ($type == 'playlist') {
$obj->deleteAllFilesFromPlaylist();
} else {
$obj->deleteAllFilesFromBlock();
}
$this->createUpdateResponse($obj);
} catch (PlaylistOutDatedException $e) {
$this->playlistOutdated($e);
} catch (PlaylistNotFoundException $e) {
$this->playlistNotFound($type);
} catch (Exception $e) {
$this->playlistUnknownError($e);
}
}
public function setCueAction() public function setCueAction()
{ {
@ -488,7 +517,7 @@ class PlaylistController extends Zend_Controller_Action
} }
$result["modified"] = $this->view->modified; $result["modified"] = $this->view->modified;
die(json_encode($result)); $this->_helper->json->sendJson($result);
} }
public function smartBlockGenerateAction() public function smartBlockGenerateAction()
@ -504,7 +533,7 @@ class PlaylistController extends Zend_Controller_Action
$form->startForm($params['obj_id']); $form->startForm($params['obj_id']);
if ($form->isValid($params)) { if ($form->isValid($params)) {
$result = $bl->generateSmartBlock($params['data']); $result = $bl->generateSmartBlock($params['data']);
die(json_encode(array("result"=>0, "html"=>$this->createFullResponse($bl, true, true)))); $this->_helper->json->sendJson(array("result"=>0, "html"=>$this->createFullResponse($bl, true, true)));
} else { } else {
$this->view->obj = $bl; $this->view->obj = $bl;
$this->view->id = $bl->getId(); $this->view->id = $bl->getId();
@ -512,7 +541,7 @@ class PlaylistController extends Zend_Controller_Action
$viewPath = 'playlist/smart-block.phtml'; $viewPath = 'playlist/smart-block.phtml';
$result['html'] = $this->view->render($viewPath); $result['html'] = $this->view->render($viewPath);
$result['result'] = 1; $result['result'] = 1;
die(json_encode($result)); $this->_helper->json->sendJson($result);
} }
} catch (BlockNotFoundException $e) { } catch (BlockNotFoundException $e) {
$this->playlistNotFound('block', true); $this->playlistNotFound('block', true);
@ -531,9 +560,9 @@ class PlaylistController extends Zend_Controller_Action
$result = $bl->shuffleSmartBlock(); $result = $bl->shuffleSmartBlock();
if ($result['result'] == 0) { if ($result['result'] == 0) {
die(json_encode(array("result"=>0, "html"=>$this->createFullResponse($bl, true)))); $this->_helper->json->sendJson(array("result"=>0, "html"=>$this->createFullResponse($bl, true)));
} else { } else {
die(json_encode($result)); $this->_helper->json->sendJson($result);
} }
} catch (BlockNotFoundException $e) { } catch (BlockNotFoundException $e) {
$this->playlistNotFound('block', true); $this->playlistNotFound('block', true);
@ -551,9 +580,9 @@ class PlaylistController extends Zend_Controller_Action
$result = $pl->shuffle(); $result = $pl->shuffle();
if ($result['result'] == 0) { if ($result['result'] == 0) {
die(json_encode(array("result"=>0, "html"=>$this->createFullResponse($pl, true)))); $this->_helper->json->sendJson(array("result"=>0, "html"=>$this->createFullResponse($pl, true)));
} else { } else {
die(json_encode($result)); $this->_helper->json->sendJson($result);
} }
} catch (PlaylistNotFoundException $e) { } catch (PlaylistNotFoundException $e) {
$this->playlistNotFound('block', true); $this->playlistNotFound('block', true);
@ -574,7 +603,7 @@ class PlaylistController extends Zend_Controller_Action
$out = $bl->getCriteria(); $out = $bl->getCriteria();
$out['isStatic'] = false; $out['isStatic'] = false;
} }
die(json_encode($out)); $this->_helper->json->sendJson($out);
} }
} }
class WrongTypeToBlockException extends Exception {} class WrongTypeToBlockException extends Exception {}

View File

@ -32,7 +32,7 @@ class PluploadController extends Zend_Controller_Action
$tempFilePath = Application_Model_StoredFile::uploadFile($upload_dir); $tempFilePath = Application_Model_StoredFile::uploadFile($upload_dir);
$tempFileName = basename($tempFilePath); $tempFileName = basename($tempFilePath);
die('{"jsonrpc" : "2.0", "tempfilepath" : "'.$tempFileName.'" }'); $this->_helper->json->sendJson(array("jsonrpc" => "2.0", "tempfilepath" => $tempFileName));
} }
public function copyfileAction() public function copyfileAction()
@ -43,8 +43,8 @@ class PluploadController extends Zend_Controller_Action
$result = Application_Model_StoredFile::copyFileToStor($upload_dir, $result = Application_Model_StoredFile::copyFileToStor($upload_dir,
$filename, $tempname); $filename, $tempname);
if (!is_null($result)) if (!is_null($result))
die('{"jsonrpc" : "2.0", "error" : '.json_encode($result).'}'); $this->_helper->json->sendJson(array("jsonrpc" => "2.0", "error" => $result));
die('{"jsonrpc" : "2.0"}'); $this->_helper->json->sendJson(array("jsonrpc" => "2.0"));
} }
} }

View File

@ -70,10 +70,10 @@ class PreferenceController extends Zend_Controller_Action
$this->view->statusMsg = "<div class='success'>". _("Preferences updated.")."</div>"; $this->view->statusMsg = "<div class='success'>". _("Preferences updated.")."</div>";
$this->view->form = $form; $this->view->form = $form;
die(json_encode(array("valid"=>"true", "html"=>$this->view->render('preference/index.phtml')))); $this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('preference/index.phtml')));
} else { } else {
$this->view->form = $form; $this->view->form = $form;
die(json_encode(array("valid"=>"false", "html"=>$this->view->render('preference/index.phtml')))); $this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('preference/index.phtml')));
} }
} }
$this->view->form = $form; $this->view->form = $form;
@ -139,17 +139,13 @@ class PreferenceController extends Zend_Controller_Action
{ {
$CC_CONFIG = Config::getConfig(); $CC_CONFIG = Config::getConfig();
if(Application_Model_Preference::GetPlanLevel() == 'disabled'){ $baseUrl = Application_Common_OsPath::getBaseDir();
$baseUrl = Application_Common_OsPath::getBaseDir();
$this->view->headScript()->appendFile($baseUrl.'js/serverbrowse/serverbrowser.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/serverbrowse/serverbrowser.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/preferences/musicdirs.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/preferences/musicdirs.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$watched_dirs_pref = new Application_Form_WatchedDirPreferences(); $watched_dirs_pref = new Application_Form_WatchedDirPreferences();
$this->view->form = $watched_dirs_pref;
$this->view->form = $watched_dirs_pref;
}
} }
public function streamSettingAction() public function streamSettingAction()
@ -251,12 +247,9 @@ class PreferenceController extends Zend_Controller_Action
/* If the admin password values are empty then we should not /* If the admin password values are empty then we should not
* set the pseudo password ('xxxxxx') on the front-end * set the pseudo password ('xxxxxx') on the front-end
*/ */
$s1_set_admin_pass = true; $s1_set_admin_pass = !empty($values["s1_data"]["admin_pass"]);
$s2_set_admin_pass = true; $s2_set_admin_pass = !empty($values["s2_data"]["admin_pass"]);
$s3_set_admin_pass = true; $s3_set_admin_pass = !empty($values["s3_data"]["admin_pass"]);
if (empty($values["s1_data"]["admin_pass"])) $s1_set_admin_pass = false;
if (empty($values["s2_data"]["admin_pass"])) $s2_set_admin_pass = false;
if (empty($values["s3_data"]["admin_pass"])) $s3_set_admin_pass = false;
// this goes into cc_pref table // this goes into cc_pref table
Application_Model_Preference::SetStreamLabelFormat($values['streamFormat']); Application_Model_Preference::SetStreamLabelFormat($values['streamFormat']);
@ -274,6 +267,7 @@ class PreferenceController extends Zend_Controller_Action
Application_Model_Preference::setReplayGainModifier($values["replayGainModifier"]); Application_Model_Preference::setReplayGainModifier($values["replayGainModifier"]);
$md = array('schedule' => Application_Model_Schedule::getSchedule()); $md = array('schedule' => Application_Model_Schedule::getSchedule());
Application_Model_RabbitMq::SendMessageToPypo("update_schedule", $md); Application_Model_RabbitMq::SendMessageToPypo("update_schedule", $md);
//Application_Model_RabbitMq::PushSchedule();
} }
if (!Application_Model_Preference::GetMasterDjConnectionUrlOverride()) { if (!Application_Model_Preference::GetMasterDjConnectionUrlOverride()) {
@ -322,19 +316,19 @@ class PreferenceController extends Zend_Controller_Action
$this->view->form = $form; $this->view->form = $form;
$this->view->num_stream = $num_of_stream; $this->view->num_stream = $num_of_stream;
$this->view->statusMsg = "<div class='success'>"._("Stream Setting Updated.")."</div>"; $this->view->statusMsg = "<div class='success'>"._("Stream Setting Updated.")."</div>";
die(json_encode(array( $this->_helper->json->sendJson(array(
"valid"=>"true", "valid"=>"true",
"html"=>$this->view->render('preference/stream-setting.phtml'), "html"=>$this->view->render('preference/stream-setting.phtml'),
"s1_set_admin_pass"=>$s1_set_admin_pass, "s1_set_admin_pass"=>$s1_set_admin_pass,
"s2_set_admin_pass"=>$s2_set_admin_pass, "s2_set_admin_pass"=>$s2_set_admin_pass,
"s3_set_admin_pass"=>$s3_set_admin_pass, "s3_set_admin_pass"=>$s3_set_admin_pass,
))); ));
} else { } else {
$live_stream_subform->updateVariables(); $live_stream_subform->updateVariables();
$this->view->enable_stream_conf = Application_Model_Preference::GetEnableStreamConf(); $this->view->enable_stream_conf = Application_Model_Preference::GetEnableStreamConf();
$this->view->form = $form; $this->view->form = $form;
$this->view->num_stream = $num_of_stream; $this->view->num_stream = $num_of_stream;
die(json_encode(array("valid"=>"false", "html"=>$this->view->render('preference/stream-setting.phtml')))); $this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('preference/stream-setting.phtml')));
} }
} }
@ -378,7 +372,7 @@ class PreferenceController extends Zend_Controller_Action
} }
ksort($result); ksort($result);
//returns format serverBrowse is looking for. //returns format serverBrowse is looking for.
die(json_encode($result)); $this->_helper->json->sendJson($result);
} }
public function changeStorDirectoryAction() public function changeStorDirectoryAction()
@ -420,7 +414,7 @@ class PreferenceController extends Zend_Controller_Action
Application_Model_RabbitMq::SendMessageToMediaMonitor('rescan_watch', $data); Application_Model_RabbitMq::SendMessageToMediaMonitor('rescan_watch', $data);
Logging::info("Unhiding all files belonging to:: $dir_path"); Logging::info("Unhiding all files belonging to:: $dir_path");
$dir->unhideFiles(); $dir->unhideFiles();
die(); # Get rid of this ugliness later $this->_helper->json->sendJson(null);
} }
public function removeWatchDirectoryAction() public function removeWatchDirectoryAction()
@ -440,7 +434,7 @@ class PreferenceController extends Zend_Controller_Action
if (Application_Model_Preference::GetImportTimestamp()+10 > $now) { if (Application_Model_Preference::GetImportTimestamp()+10 > $now) {
$res = true; $res = true;
} }
die(json_encode($res)); $this->_helper->json->sendJson($res);
} }
public function getLiquidsoapStatusAction() public function getLiquidsoapStatusAction()
@ -455,7 +449,7 @@ class PreferenceController extends Zend_Controller_Action
} }
$out[] = array("id"=>$i, "status"=>$status); $out[] = array("id"=>$i, "status"=>$status);
} }
die(json_encode($out)); $this->_helper->json->sendJson($out);
} }
public function setSourceConnectionUrlAction() public function setSourceConnectionUrlAction()
@ -473,7 +467,7 @@ class PreferenceController extends Zend_Controller_Action
Application_Model_Preference::SetLiveDjConnectionUrlOverride($override); Application_Model_Preference::SetLiveDjConnectionUrlOverride($override);
} }
die(); $this->_helper->json->sendJson(null);
} }
public function getAdminPasswordStatusAction() public function getAdminPasswordStatusAction()
@ -486,6 +480,6 @@ class PreferenceController extends Zend_Controller_Action
$out["s".$i] = true; $out["s".$i] = true;
} }
} }
die(json_encode($out)); $this->_helper->json->sendJson($out);
} }
} }

View File

@ -9,6 +9,7 @@ class ScheduleController extends Zend_Controller_Action
{ {
$ajaxContext = $this->_helper->getHelper('AjaxContext'); $ajaxContext = $this->_helper->getHelper('AjaxContext');
$ajaxContext->addActionContext('event-feed', 'json') $ajaxContext->addActionContext('event-feed', 'json')
->addActionContext('event-feed-preload', 'json')
->addActionContext('make-context-menu', 'json') ->addActionContext('make-context-menu', 'json')
->addActionContext('add-show-dialog', 'json') ->addActionContext('add-show-dialog', 'json')
->addActionContext('add-show', 'json') ->addActionContext('add-show', 'json')
@ -33,6 +34,7 @@ class ScheduleController extends Zend_Controller_Action
->addActionContext('dj-edit-show', 'json') ->addActionContext('dj-edit-show', 'json')
->addActionContext('calculate-duration', 'json') ->addActionContext('calculate-duration', 'json')
->addActionContext('get-current-show', 'json') ->addActionContext('get-current-show', 'json')
->addActionContext('update-future-is-scheduled', 'json')
->initContext(); ->initContext();
$this->sched_sess = new Zend_Session_Namespace("schedule"); $this->sched_sess = new Zend_Session_Namespace("schedule");
@ -88,15 +90,23 @@ class ScheduleController extends Zend_Controller_Action
$this->view->headLink()->appendStylesheet($baseUrl.'css/showbuilder.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/showbuilder.css?'.$CC_CONFIG['airtime_version']);
//End Show builder JS/CSS requirements //End Show builder JS/CSS requirements
Application_Model_Schedule::createNewFormSections($this->view); Application_Model_Schedule::createNewFormSections($this->view);
$user = Application_Model_User::getCurrentUser(); $user = Application_Model_User::getCurrentUser();
if ($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) { if ($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) {
$this->view->preloadShowForm = true; $this->view->preloadShowForm = true;
} }
$this->view->headScript()->appendScript("var weekStart = ".Application_Model_Preference::GetWeekStartDay().";"); $this->view->headScript()->appendScript(
"var calendarPref = {};\n".
"calendarPref.weekStart = ".Application_Model_Preference::GetWeekStartDay().";\n".
"calendarPref.timestamp = ".time().";\n".
"calendarPref.timezoneOffset = ".date("Z").";\n".
"calendarPref.timeScale = '".Application_Model_Preference::GetCalendarTimeScale()."';\n".
"calendarPref.timeInterval = ".Application_Model_Preference::GetCalendarTimeInterval().";\n".
"calendarPref.weekStartDay = ".Application_Model_Preference::GetWeekStartDay().";\n".
"var calendarEvents = null;"
);
} }
public function eventFeedAction() public function eventFeedAction()
@ -108,10 +118,28 @@ class ScheduleController extends Zend_Controller_Action
$userInfo = Zend_Auth::getInstance()->getStorage()->read(); $userInfo = Zend_Auth::getInstance()->getStorage()->read();
$user = new Application_Model_User($userInfo->id); $user = new Application_Model_User($userInfo->id);
if ($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) { $editable = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
$editable = true;
$events = &Application_Model_Show::getFullCalendarEvents($start, $end, $editable);
$this->view->events = $events;
}
public function eventFeedPreloadAction()
{
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
$user = new Application_Model_User($userInfo->id);
$editable = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
$calendar_interval = Application_Model_Preference::GetCalendarTimeScale();
Logging::info($calendar_interval);
if ($calendar_interval == "agendaDay") {
list($start, $end) = Application_Model_Show::getStartEndCurrentDayView();
} else if ($calendar_interval == "agendaWeek") {
list($start, $end) = Application_Model_Show::getStartEndCurrentWeekView();
} else if ($calendar_interval == "month") {
list($start, $end) = Application_Model_Show::getStartEndCurrentMonthView();
} else { } else {
$editable = false; Logging::error("Invalid Calendar Interval '$calendar_interval'");
} }
$events = &Application_Model_Show::getFullCalendarEvents($start, $end, $editable); $events = &Application_Model_Show::getFullCalendarEvents($start, $end, $editable);
@ -218,7 +246,7 @@ class ScheduleController extends Zend_Controller_Action
$id = $file->getId(); $id = $file->getId();
Application_Model_Soundcloud::uploadSoundcloud($id); Application_Model_Soundcloud::uploadSoundcloud($id);
// we should die with ui info // we should die with ui info
die(); $this->_helper->json->sendJson(null);
} }
public function makeContextMenuAction() public function makeContextMenuAction()
@ -452,7 +480,7 @@ class ScheduleController extends Zend_Controller_Action
$this->view->percentFilled = $show->getPercentScheduled(); $this->view->percentFilled = $show->getPercentScheduled();
$this->view->showContent = $show->getShowListContent(); $this->view->showContent = $show->getShowListContent();
$this->view->dialog = $this->view->render('schedule/show-content-dialog.phtml'); $this->view->dialog = $this->view->render('schedule/show-content-dialog.phtml');
$this->view->showTitle = $show->getName(); $this->view->showTitle = htmlspecialchars($show->getName());
unset($this->view->showContent); unset($this->view->showContent);
} }
@ -546,7 +574,10 @@ class ScheduleController extends Zend_Controller_Action
return; return;
} }
if ($isDJ) { // in case a user was once a dj and had been assigned to a show
// but was then changed to an admin user we need to allow
// the user to edit the show as an admin (CC-4925)
if ($isDJ && !$isAdminOrPM) {
$this->view->action = "dj-edit-show"; $this->view->action = "dj-edit-show";
} }
@ -599,7 +630,11 @@ class ScheduleController extends Zend_Controller_Action
if (!$showInstance->getShow()->isRepeating()) { if (!$showInstance->getShow()->isRepeating()) {
$formWhen->disableStartDateAndTime(); $formWhen->disableStartDateAndTime();
} else { } else {
$formWhen->getElement('add_show_start_date')->setOptions(array('disabled' => true)); $nextFutureRepeatShow = $show->getNextFutureRepeatShowTime();
$formWhen->getElement('add_show_start_date')->setValue($nextFutureRepeatShow["starts"]->format("Y-m-d"));
$formWhen->getElement('add_show_start_time')->setValue($nextFutureRepeatShow["starts"]->format("H:i"));
$formWhen->getElement('add_show_end_date_no_repeat')->setValue($nextFutureRepeatShow["ends"]->format("Y-m-d"));
$formWhen->getElement('add_show_end_time')->setValue($nextFutureRepeatShow["ends"]->format("H:i"));
} }
} }
@ -774,10 +809,16 @@ class ScheduleController extends Zend_Controller_Action
} }
$data['add_show_record'] = $show->isRecorded(); $data['add_show_record'] = $show->isRecorded();
$origianlShowStartDateTime = Application_Common_DateHelper::ConvertToLocalDateTime($show->getStartDateAndTime()); if ($show->isRepeating()) {
$nextFutureRepeatShow = $show->getNextFutureRepeatShowTime();
$originalShowStartDateTime = $nextFutureRepeatShow["starts"];
} else {
$originalShowStartDateTime = Application_Common_DateHelper::ConvertToLocalDateTime(
$show->getStartDateAndTime());
}
$success = Application_Model_Schedule::addUpdateShow($data, $this, $success = Application_Model_Schedule::addUpdateShow($data, $this,
$validateStartDate, $origianlShowStartDateTime, true, $validateStartDate, $originalShowStartDateTime, true,
$data['add_show_instance_id']); $data['add_show_instance_id']);
if ($success) { if ($success) {
@ -867,6 +908,7 @@ class ScheduleController extends Zend_Controller_Action
try { try {
$scheduler = new Application_Model_Scheduler(); $scheduler = new Application_Model_Scheduler();
$scheduler->cancelShow($id); $scheduler->cancelShow($id);
Application_Model_StoredFile::updatePastFilesIsScheduled();
// send kick out source stream signal to pypo // send kick out source stream signal to pypo
$data = array("sourcename"=>"live_dj"); $data = array("sourcename"=>"live_dj");
Application_Model_RabbitMq::SendMessageToPypo("disconnect_source", $data); Application_Model_RabbitMq::SendMessageToPypo("disconnect_source", $data);
@ -897,7 +939,7 @@ class ScheduleController extends Zend_Controller_Action
'title' => _('Download')); 'title' => _('Download'));
//returns format jjmenu is looking for. //returns format jjmenu is looking for.
die(json_encode($menu)); $this->_helper->json->sendJson($menu);
} }
/** /**
@ -950,4 +992,11 @@ class ScheduleController extends Zend_Controller_Action
echo Zend_Json::encode($result); echo Zend_Json::encode($result);
exit(); exit();
} }
public function updateFutureIsScheduledAction()
{
$schedId = $this->_getParam('schedId');
$redrawLibTable = Application_Model_StoredFile::setIsScheduled($schedId, false);
$this->_helper->json->sendJson(array("redrawLibTable" => $redrawLibTable));
}
} }

View File

@ -17,7 +17,6 @@ class SystemstatusController extends Zend_Controller_Action
"pypo"=>Application_Model_Systemstatus::GetPypoStatus(), "pypo"=>Application_Model_Systemstatus::GetPypoStatus(),
"liquidsoap"=>Application_Model_Systemstatus::GetLiquidsoapStatus(), "liquidsoap"=>Application_Model_Systemstatus::GetLiquidsoapStatus(),
"media-monitor"=>Application_Model_Systemstatus::GetMediaMonitorStatus(), "media-monitor"=>Application_Model_Systemstatus::GetMediaMonitorStatus(),
"rabbitmq-server"=>Application_Model_Systemstatus::GetRabbitMqStatus()
); );
$partitions = Application_Model_Systemstatus::GetDiskInfo(); $partitions = Application_Model_Systemstatus::GetDiskInfo();

View File

@ -48,13 +48,7 @@ class UserController extends Zend_Controller_Action
if ($form->isValid($formData)) { if ($form->isValid($formData)) {
if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1 if ($form->validateLogin($formData)) {
&& $formData['login'] == 'admin'
&& $formData['user_id'] != 0) {
$this->view->form = $form;
$this->view->successMessage = "<div class='errors'>"._("Specific action is not allowed in demo version!")."</div>";
die(json_encode(array("valid"=>"false", "html"=>$this->view->render('user/add-user.phtml'))));
} elseif ($form->validateLogin($formData)) {
$user = new Application_Model_User($formData['user_id']); $user = new Application_Model_User($formData['user_id']);
if (empty($formData['user_id'])) { if (empty($formData['user_id'])) {
$user->setLogin($formData['login']); $user->setLogin($formData['login']);
@ -89,14 +83,14 @@ class UserController extends Zend_Controller_Action
$this->view->successMessage = "<div class='success'>"._("User updated successfully!")."</div>"; $this->view->successMessage = "<div class='success'>"._("User updated successfully!")."</div>";
} }
die(json_encode(array("valid"=>"true", "html"=>$this->view->render('user/add-user.phtml')))); $this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('user/add-user.phtml')));
} else { } else {
$this->view->form = $form; $this->view->form = $form;
die(json_encode(array("valid"=>"false", "html"=>$this->view->render('user/add-user.phtml')))); $this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('user/add-user.phtml')));
} }
} else { } else {
$this->view->form = $form; $this->view->form = $form;
die(json_encode(array("valid"=>"false", "html"=>$this->view->render('user/add-user.phtml')))); $this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('user/add-user.phtml')));
} }
} }
@ -115,7 +109,7 @@ class UserController extends Zend_Controller_Action
$post = $this->getRequest()->getPost(); $post = $this->getRequest()->getPost();
$users = Application_Model_User::getUsersDataTablesInfo($post); $users = Application_Model_User::getUsersDataTablesInfo($post);
die(json_encode($users)); $this->_helper->json->sendJson($users);
} }
public function getUserDataAction() public function getUserDataAction()
@ -131,12 +125,7 @@ class UserController extends Zend_Controller_Action
if ($request->isPost()) { if ($request->isPost()) {
$formData = $request->getPost(); $formData = $request->getPost();
if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1 if ($form->isValid($formData) &&
&& $formData['cu_login'] == 'admin') {
$this->view->form = $form;
$this->view->successMessage = "<div class='errors'>"._("Specific action is not allowed in demo version!")."</div>";
die(json_encode(array("html"=>$this->view->render('user/edit-user.phtml'))));
} else if ($form->isValid($formData) &&
$form->validateLogin($formData['cu_login'], $formData['cu_user_id'])) { $form->validateLogin($formData['cu_login'], $formData['cu_user_id'])) {
$user = new Application_Model_User($formData['cu_user_id']); $user = new Application_Model_User($formData['cu_user_id']);
$user->setFirstName($formData['cu_first_name']); $user->setFirstName($formData['cu_first_name']);

View File

@ -15,6 +15,7 @@ class UsersettingsController extends Zend_Controller_Action
->addActionContext('remindme', 'json') ->addActionContext('remindme', 'json')
->addActionContext('remindme-never', 'json') ->addActionContext('remindme-never', 'json')
->addActionContext('donotshowregistrationpopup', 'json') ->addActionContext('donotshowregistrationpopup', 'json')
->addActionContext('set-library-screen-settings', 'json')
->initContext(); ->initContext();
} }
@ -54,6 +55,7 @@ class UsersettingsController extends Zend_Controller_Action
{ {
$request = $this->getRequest(); $request = $this->getRequest();
$settings = $request->getParam("settings"); $settings = $request->getParam("settings");
Application_Model_Preference::setTimelineDatatableSetting($settings); Application_Model_Preference::setTimelineDatatableSetting($settings);
} }
@ -91,4 +93,11 @@ class UsersettingsController extends Zend_Controller_Action
// unset session // unset session
Zend_Session::namespaceUnset('referrer'); Zend_Session::namespaceUnset('referrer');
} }
public function setLibraryScreenSettingsAction()
{
$request = $this->getRequest();
$settings = $request->getParam("settings");
Application_Model_Preference::setLibraryScreenSettings($settings);
}
} }

View File

@ -110,7 +110,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
{ {
$controller = strtolower($request->getControllerName()); $controller = strtolower($request->getControllerName());
if (in_array($controller, array("api", "auth"))) { if (in_array($controller, array("api", "auth", "locale"))) {
$this->setRoleName("G"); $this->setRoleName("G");
} elseif (!Zend_Auth::getInstance()->hasIdentity()) { } elseif (!Zend_Auth::getInstance()->hasIdentity()) {

View File

@ -7,6 +7,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
{ {
$notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator(); $notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator();
$rangeValidator = Application_Form_Helper_ValidationTypes::overrideBetweenValidator(0, 59.9);
$this->setDecorators(array( $this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/preferences_general.phtml')) array('ViewScript', array('viewScript' => 'form/preferences_general.phtml'))
)); ));
@ -34,9 +35,13 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
'label' => _('Default Fade (s):'), 'label' => _('Default Fade (s):'),
'required' => true, 'required' => true,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'validators' => array(array($notEmptyValidator, 'regex', false, 'validators' => array(
array('/^[0-9]{1,2}(\.\d{1})?$/', array(
'messages' => _('enter a time in seconds 0{.0}')))), $rangeValidator,
$notEmptyValidator,
'regex', false, array('/^[0-9]{1,2}(\.\d{1})?$/', 'messages' => _('enter a time in seconds 0{.0}'))
)
),
'value' => $defaultFade, 'value' => $defaultFade,
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'

View File

@ -7,7 +7,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
public function init() public function init()
{ {
$this->setAction(Application_Common_OsPath::getBaseDir().'/Showbuilder'); $this->setAction(Application_Common_OsPath::getBaseDir().'Showbuilder');
$this->setMethod('post'); $this->setMethod('post');
$country_list = Application_Model_Preference::GetCountryList(); $country_list = Application_Model_Preference::GetCountryList();

View File

@ -5,6 +5,11 @@ 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
* or numeric value in order to populate the modifier
* select list
*/
private $criteriaTypes = array( private $criteriaTypes = array(
0 => "", 0 => "",
"album_title" => "s", "album_title" => "s",
@ -13,6 +18,8 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
"composer" => "s", "composer" => "s",
"conductor" => "s", "conductor" => "s",
"copyright" => "s", "copyright" => "s",
"cuein" => "n",
"cueout" => "n",
"artist_name" => "s", "artist_name" => "s",
"encoded_by" => "s", "encoded_by" => "s",
"utime" => "n", "utime" => "n",
@ -45,6 +52,8 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
"composer" => _("Composer"), "composer" => _("Composer"),
"conductor" => _("Conductor"), "conductor" => _("Conductor"),
"copyright" => _("Copyright"), "copyright" => _("Copyright"),
"cuein" => _("Cue In"),
"cueout" => _("Cue Out"),
"artist_name" => _("Creator"), "artist_name" => _("Creator"),
"encoded_by" => _("Encoded By"), "encoded_by" => _("Encoded By"),
"genre" => _("Genre"), "genre" => _("Genre"),
@ -416,32 +425,34 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
$isValid = true; $isValid = true;
$data = $this->preValidation($params); $data = $this->preValidation($params);
$criteria2PeerMap = array( $criteria2PeerMap = array(
0 => "Select criteria", 0 => "Select criteria",
"album_title" => "DbAlbumTitle", "album_title" => "DbAlbumTitle",
"artist_name" => "DbArtistName", "artist_name" => "DbArtistName",
"bit_rate" => "DbBitRate", "bit_rate" => "DbBitRate",
"bpm" => "DbBpm", "bpm" => "DbBpm",
"composer" => "DbComposer", "composer" => "DbComposer",
"conductor" => "DbConductor", "conductor" => "DbConductor",
"copyright" => "DbCopyright", "copyright" => "DbCopyright",
"encoded_by" => "DbEncodedBy", "cuein" => "DbCuein",
"utime" => "DbUtime", "cueout" => "DbCueout",
"mtime" => "DbMtime", "encoded_by" => "DbEncodedBy",
"lptime" => "DbLPtime", "utime" => "DbUtime",
"genre" => "DbGenre", "mtime" => "DbMtime",
"info_url" => "DbInfoUrl", "lptime" => "DbLPtime",
"isrc_number" => "DbIsrcNumber", "genre" => "DbGenre",
"label" => "DbLabel", "info_url" => "DbInfoUrl",
"language" => "DbLanguage", "isrc_number" => "DbIsrcNumber",
"length" => "DbLength", "label" => "DbLabel",
"mime" => "DbMime", "language" => "DbLanguage",
"mood" => "DbMood", "length" => "DbLength",
"owner_id" => "DbOwnerId", "mime" => "DbMime",
"replay_gain" => "DbReplayGain", "mood" => "DbMood",
"sample_rate" => "DbSampleRate", "owner_id" => "DbOwnerId",
"track_title" => "DbTrackTitle", "replay_gain" => "DbReplayGain",
"track_number" => "DbTrackNumber", "sample_rate" => "DbSampleRate",
"year" => "DbYear" "track_title" => "DbTrackTitle",
"track_number" => "DbTrackNumber",
"year" => "DbYear"
); );
// things we need to check // things we need to check
@ -492,7 +503,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
} else { } else {
$column = CcFilesPeer::getTableMap()->getColumnByPhpName($criteria2PeerMap[$d['sp_criteria_field']]); $column = CcFilesPeer::getTableMap()->getColumnByPhpName($criteria2PeerMap[$d['sp_criteria_field']]);
// validation on type of column // validation on type of column
if ($d['sp_criteria_field'] == 'length') { if (in_array($d['sp_criteria_field'], array('length', 'cuein', 'cueout'))) {
if (!preg_match("/^(\d{2}):(\d{2}):(\d{2})/", $d['sp_criteria_value'])) { if (!preg_match("/^(\d{2}):(\d{2}):(\d{2})/", $d['sp_criteria_value'])) {
$element->addError(_("'Length' should be in '00:00:00' format")); $element->addError(_("'Length' should be in '00:00:00' format"));
$isValid = false; $isValid = false;

View File

@ -24,7 +24,7 @@
<div class="personal-block solo"> <div class="personal-block solo">
<ul> <ul>
<li> <li>
<a id="current-user" href=<?php echo $baseUrl . "User/edit-user"?>><span class="name"><?php echo $this->loggedInAs()?></span></a> | <a href=<?php echo $baseUrl . "Login/logout"?>><?php echo _("Logout")?></a> <a id="current-user" href=<?php echo $baseUrl . "User/edit-user"?>><span class="name"><?php echo $this->escape($this->loggedInAs()); ?></span></a> | <a href=<?php echo $baseUrl . "Login/logout"?>><?php echo _("Logout")?></a>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -32,6 +32,8 @@ class Logging {
{ {
if (is_array($p_msg) || is_object($p_msg)) { if (is_array($p_msg) || is_object($p_msg)) {
return print_r($p_msg, true); return print_r($p_msg, true);
} else if (is_bool($p_msg)) {
return $p_msg ? "true" : "false";
} else { } else {
return $p_msg; return $p_msg;
} }

View File

@ -63,6 +63,8 @@ class Application_Model_Block implements Application_Model_LibraryEditable
"composer" => "DbComposer", "composer" => "DbComposer",
"conductor" => "DbConductor", "conductor" => "DbConductor",
"copyright" => "DbCopyright", "copyright" => "DbCopyright",
"cuein" => "DbCuein",
"cueout" => "DbCueout",
"encoded_by" => "DbEncodedBy", "encoded_by" => "DbEncodedBy",
"utime" => "DbUtime", "utime" => "DbUtime",
"mtime" => "DbMtime", "mtime" => "DbMtime",
@ -257,6 +259,10 @@ SQL;
//format original length //format original length
$formatter = new LengthFormatter($row['orig_length']); $formatter = new LengthFormatter($row['orig_length']);
$row['orig_length'] = $formatter->format(); $row['orig_length'] = $formatter->format();
// XSS exploit prevention
$row["track_title"] = htmlspecialchars($row["track_title"]);
$row["creator"] = htmlspecialchars($row["creator"]);
} }
return $rows; return $rows;
@ -399,10 +405,13 @@ SQL;
$entry = $this->blockItem; $entry = $this->blockItem;
$entry["id"] = $file->getDbId(); $entry["id"] = $file->getDbId();
$entry["pos"] = $pos; $entry["pos"] = $pos;
$entry["cliplength"] = $file->getDbLength();
$entry["cueout"] = $file->getDbCueout(); $entry["cueout"] = $file->getDbCueout();
$entry["cuein"] = $file->getDbCuein(); $entry["cuein"] = $file->getDbCuein();
$cue_out = Application_Common_DateHelper::calculateLengthInSeconds($entry['cueout']);
$cue_in = Application_Common_DateHelper::calculateLengthInSeconds($entry['cuein']);
$entry["cliplength"] = Application_Common_DateHelper::secondsToPlaylistTime($cue_out-$cue_in);
return $entry; return $entry;
} else { } else {
throw new Exception("trying to add a file that does not exist."); throw new Exception("trying to add a file that does not exist.");
@ -476,10 +485,19 @@ SQL;
try { try {
if (is_array($ac) && $ac[1] == 'audioclip') { if (is_array($ac) && $ac[1] == 'audioclip') {
$res = $this->insertBlockElement($this->buildEntry($ac[0], $pos)); $res = $this->insertBlockElement($this->buildEntry($ac[0], $pos));
// update is_playlist flag in cc_files to indicate the
// file belongs to a playlist or block (in this case a block)
$db_file = CcFilesQuery::create()->findPk($ac[0], $this->con);
$db_file->setDbIsPlaylist(true)->save($this->con);
$pos = $pos + 1; $pos = $pos + 1;
} elseif (!is_array($ac)) { } elseif (!is_array($ac)) {
$res = $this->insertBlockElement($this->buildEntry($ac, $pos)); $res = $this->insertBlockElement($this->buildEntry($ac, $pos));
$pos = $pos + 1; $pos = $pos + 1;
$db_file = CcFilesQuery::create()->findPk($ac, $this->con);
$db_file->setDbIsPlaylist(true)->save($this->con);
} }
} catch (Exception $e) { } catch (Exception $e) {
Logging::info($e->getMessage()); Logging::info($e->getMessage());
@ -592,10 +610,21 @@ SQL;
try { try {
// we need to get the file id of the item we are deleting
// before the item gets deleted from the block
$itemsToDelete = CcBlockcontentsQuery::create()
->filterByPrimaryKeys($p_items)
->filterByDbFileId(null, Criteria::NOT_EQUAL)
->find($this->con);
CcBlockcontentsQuery::create() CcBlockcontentsQuery::create()
->findPKs($p_items) ->findPKs($p_items)
->delete($this->con); ->delete($this->con);
// now that the items have been deleted we can update the
// is_playlist flag in cc_files
Application_Model_StoredFile::setIsPlaylist($itemsToDelete, 'block', false);
$contents = CcBlockcontentsQuery::create() $contents = CcBlockcontentsQuery::create()
->filterByDbBlockId($this->id) ->filterByDbBlockId($this->id)
->orderByDbPosition() ->orderByDbPosition()
@ -965,16 +994,36 @@ SQL;
$user = new Application_Model_User($userInfo->id); $user = new Application_Model_User($userInfo->id);
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER)); $isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
// get only the files from the blocks
// we are about to delete
$itemsToDelete = CcBlockcontentsQuery::create()
->filterByDbBlockId($p_ids)
->filterByDbFileId(null, Criteria::NOT_EQUAL)
->find();
$updateIsPlaylistFlag = false;
if (!$isAdminOrPM) { if (!$isAdminOrPM) {
$leftOver = self::blocksNotOwnedByUser($p_ids, $p_userId); $leftOver = self::blocksNotOwnedByUser($p_ids, $p_userId);
if (count($leftOver) == 0) { if (count($leftOver) == 0) {
CcBlockQuery::create()->findPKs($p_ids)->delete(); CcBlockQuery::create()->findPKs($p_ids)->delete();
$updateIsPlaylistFlag = true;
} else { } else {
throw new BlockNoPermissionException; throw new BlockNoPermissionException;
} }
} else { } else {
CcBlockQuery::create()->findPKs($p_ids)->delete(); CcBlockQuery::create()->findPKs($p_ids)->delete();
$updateIsPlaylistFlag = true;
}
if ($updateIsPlaylistFlag) {
// update is_playlist flag in cc_files
Application_Model_StoredFile::setIsPlaylist(
$itemsToDelete,
'block',
false
);
} }
} }
@ -1000,8 +1049,26 @@ SQL;
*/ */
public function deleteAllFilesFromBlock() public function deleteAllFilesFromBlock()
{ {
// get only the files from the playlist
// we are about to clear out
$itemsToDelete = CcBlockcontentsQuery::create()
->filterByDbBlockId($this->id)
->filterByDbFileId(null, Criteria::NOT_EQUAL)
->find();
CcBlockcontentsQuery::create()->findByDbBlockId($this->id)->delete(); CcBlockcontentsQuery::create()->findByDbBlockId($this->id)->delete();
$this->block->reload();
// update is_playlist flag in cc_files
Application_Model_StoredFile::setIsPlaylist(
$itemsToDelete,
'block',
false
);
//$this->block->reload();
$this->block->setDbMtime(new DateTime("now", new DateTimeZone("UTC")));
$this->block->save($this->con);
$this->con->commit();
} }
// smart block functions start // smart block functions start
@ -1213,6 +1280,8 @@ SQL;
"composer" => _("Composer"), "composer" => _("Composer"),
"conductor" => _("Conductor"), "conductor" => _("Conductor"),
"copyright" => _("Copyright"), "copyright" => _("Copyright"),
"cuein" => _("Cue In"),
"cueout" => _("Cue Out"),
"artist_name" => _("Creator"), "artist_name" => _("Creator"),
"encoded_by" => _("Encoded By"), "encoded_by" => _("Encoded By"),
"genre" => _("Genre"), "genre" => _("Genre"),
@ -1241,7 +1310,7 @@ SQL;
foreach ($out as $crit) { foreach ($out as $crit) {
$criteria = $crit->getDbCriteria(); $criteria = $crit->getDbCriteria();
$modifier = $crit->getDbModifier(); $modifier = $crit->getDbModifier();
$value = $crit->getDbValue(); $value = htmlspecialchars($crit->getDbValue());
$extra = $crit->getDbExtra(); $extra = $crit->getDbExtra();
if ($criteria == "limit") { if ($criteria == "limit") {
@ -1305,7 +1374,7 @@ SQL;
* user only sees the rounded version (i.e. 4:02.7 is 4:02.761625 * user only sees the rounded version (i.e. 4:02.7 is 4:02.761625
* in the database) * in the database)
*/ */
} elseif ($spCriteria == 'length' && $spCriteriaModifier == "is") { } elseif (in_array($spCriteria, array('length', 'cuein', 'cueout')) && $spCriteriaModifier == "is") {
$spCriteriaModifier = "starts with"; $spCriteriaModifier = "starts with";
$spCriteria = $spCriteria.'::text'; $spCriteria = $spCriteria.'::text';
$spCriteriaValue = $criteria['value']; $spCriteriaValue = $criteria['value'];
@ -1434,6 +1503,20 @@ SQL;
return $output; return $output;
} }
public static function getAllBlockFiles()
{
$con = Propel::getConnection();
$sql = <<<SQL
SELECT distinct(file_id)
FROM cc_blockcontents
SQL;
$files = $con->query($sql)->fetchAll();
$real_files = array();
foreach ($files as $f) {
$real_files[] = $f['file_id'];
}
return $real_files;
}
// smart block functions end // smart block functions end
} }

View File

@ -269,6 +269,10 @@ SQL;
//format original length //format original length
$formatter = new LengthFormatter($row['orig_length']); $formatter = new LengthFormatter($row['orig_length']);
$row['orig_length'] = $formatter->format(); $row['orig_length'] = $formatter->format();
// XSS exploit prevention
$row["track_title"] = htmlspecialchars($row["track_title"]);
$row["creator"] = htmlspecialchars($row["creator"]);
} }
return $rows; return $rows;
@ -398,6 +402,13 @@ SQL;
if ($obj instanceof CcFiles && $obj) { if ($obj instanceof CcFiles && $obj) {
$entry["cuein"] = $obj->getDbCuein(); $entry["cuein"] = $obj->getDbCuein();
$entry["cueout"] = $obj->getDbCueout(); $entry["cueout"] = $obj->getDbCueout();
$cue_out = Application_Common_DateHelper::calculateLengthInSeconds($entry['cueout']);
$cue_in = Application_Common_DateHelper::calculateLengthInSeconds($entry['cuein']);
$entry["cliplength"] = Application_Common_DateHelper::secondsToPlaylistTime($cue_out-$cue_in);
} elseif ($obj instanceof CcWebstream && $obj) {
$entry["cuein"] = "00:00:00";
$entry["cueout"] = $entry["cliplength"];
} }
$entry["ftype"] = $objType; $entry["ftype"] = $objType;
} }
@ -466,6 +477,12 @@ SQL;
foreach ($p_items as $ac) { foreach ($p_items as $ac) {
$res = $this->insertPlaylistElement($this->buildEntry($ac, $pos)); $res = $this->insertPlaylistElement($this->buildEntry($ac, $pos));
// update is_playlist flag in cc_files to indicate the
// file belongs to a playlist or block (in this case a playlist)
$db_file = CcFilesQuery::create()->findPk($ac[0], $this->con);
$db_file->setDbIsPlaylist(true)->save($this->con);
$pos = $pos + 1; $pos = $pos + 1;
Logging::info("Adding $ac[1] $ac[0]"); Logging::info("Adding $ac[1] $ac[0]");
@ -574,10 +591,21 @@ SQL;
try { try {
// we need to get the file id of the item we are deleting
// before the item gets deleted from the playlist
$itemsToDelete = CcPlaylistcontentsQuery::create()
->filterByPrimaryKeys($p_items)
->filterByDbFileId(null, Criteria::NOT_EQUAL)
->find($this->con);
CcPlaylistcontentsQuery::create() CcPlaylistcontentsQuery::create()
->findPKs($p_items) ->findPKs($p_items)
->delete($this->con); ->delete($this->con);
// now that the items have been deleted we can update the
// is_playlist flag in cc_files
Application_Model_StoredFile::setIsPlaylist($itemsToDelete, 'playlist', false);
$contents = CcPlaylistcontentsQuery::create() $contents = CcPlaylistcontentsQuery::create()
->filterByDbPlaylistId($this->id) ->filterByDbPlaylistId($this->id)
->orderByDbPosition() ->orderByDbPosition()
@ -892,15 +920,36 @@ SQL;
$user = new Application_Model_User($userInfo->id); $user = new Application_Model_User($userInfo->id);
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER)); $isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
// get only the files from the playlists
// we are about to delete
$itemsToDelete = CcPlaylistcontentsQuery::create()
->filterByDbPlaylistId($p_ids)
->filterByDbFileId(null, Criteria::NOT_EQUAL)
->find();
$updateIsPlaylistFlag = false;
if (!$isAdminOrPM) { if (!$isAdminOrPM) {
$leftOver = self::playlistsNotOwnedByUser($p_ids, $p_userId); $leftOver = self::playlistsNotOwnedByUser($p_ids, $p_userId);
if (count($leftOver) == 0) { if (count($leftOver) == 0) {
CcPlaylistQuery::create()->findPKs($p_ids)->delete(); CcPlaylistQuery::create()->findPKs($p_ids)->delete();
$updateIsPlaylistFlag = true;
} else { } else {
throw new PlaylistNoPermissionException; throw new PlaylistNoPermissionException;
} }
} else { } else {
CcPlaylistQuery::create()->findPKs($p_ids)->delete(); CcPlaylistQuery::create()->findPKs($p_ids)->delete();
$updateIsPlaylistFlag = true;
}
if ($updateIsPlaylistFlag) {
// update is_playlist flag in cc_files
Application_Model_StoredFile::setIsPlaylist(
$itemsToDelete,
'playlist',
false
);
} }
} }
@ -927,7 +976,25 @@ SQL;
*/ */
public function deleteAllFilesFromPlaylist() public function deleteAllFilesFromPlaylist()
{ {
// get only the files from the playlist
// we are about to clear out
$itemsToDelete = CcPlaylistcontentsQuery::create()
->filterByDbPlaylistId($this->id)
->filterByDbFileId(null, Criteria::NOT_EQUAL)
->find();
CcPlaylistcontentsQuery::create()->findByDbPlaylistId($this->id)->delete(); CcPlaylistcontentsQuery::create()->findByDbPlaylistId($this->id)->delete();
// update is_playlist flag in cc_files
Application_Model_StoredFile::setIsPlaylist(
$itemsToDelete,
'playlist',
false
);
$this->pl->setDbMtime(new DateTime("now", new DateTimeZone("UTC")));
$this->pl->save($this->con);
$this->con->commit();
} }
public function shuffle() public function shuffle()
@ -953,6 +1020,38 @@ SQL;
return $result; return $result;
} }
public static function getAllPlaylistFiles()
{
$con = Propel::getConnection();
$sql = <<<SQL
SELECT distinct(file_id)
FROM cc_playlistcontents
WHERE file_id is not null
SQL;
$files = $con->query($sql)->fetchAll();
$real_files = array();
foreach ($files as $f) {
$real_files[] = $f['file_id'];
}
return $real_files;
}
public static function getAllPlaylistStreams()
{
$con = Propel::getConnection();
$sql = <<<SQL
SELECT distinct(stream_id)
FROM cc_playlistcontents
WHERE stream_id is not null
SQL;
$streams = $con->query($sql)->fetchAll();
$real_streams = array();
foreach ($streams as $s) {
$real_streams[] = $s['stream_id'];
}
return $real_streams;
}
} // class Playlist } // class Playlist
class PlaylistNotFoundException extends Exception {} class PlaylistNotFoundException extends Exception {}

View File

@ -1223,9 +1223,9 @@ class Application_Model_Preference
$num_columns = count(Application_Model_StoredFile::getLibraryColumns()); $num_columns = count(Application_Model_StoredFile::getLibraryColumns());
$new_columns_num = count($settings['abVisCols']); $new_columns_num = count($settings['abVisCols']);
if ($num_columns != $new_columns_num) { /*if ($num_columns != $new_columns_num) {
throw new Exception("Trying to write a user column preference with incorrect number of columns!"); throw new Exception("Trying to write a user column preference with incorrect number of columns!");
} }*/
$data = serialize($settings); $data = serialize($settings);
$v = self::setValue("library_datatable", $data, true); $v = self::setValue("library_datatable", $data, true);
@ -1262,7 +1262,19 @@ class Application_Model_Preference
$data = self::getValue("nowplaying_screen", true); $data = self::getValue("nowplaying_screen", true);
return ($data != "") ? unserialize($data) : null; return ($data != "") ? unserialize($data) : null;
} }
public static function setLibraryScreenSettings($settings)
{
$data = serialize($settings);
self::setValue("library_screen", $data, true);
}
public static function getLibraryScreenSettings()
{
$data = self::getValue("library_screen", true);
return ($data != "") ? unserialize($data) : null;
}
public static function SetEnableReplayGain($value) { public static function SetEnableReplayGain($value) {
self::setValue("enable_replay_gain", $value, false); self::setValue("enable_replay_gain", $value, false);
} }

View File

@ -22,6 +22,11 @@ class Application_Model_RabbitMq
$CC_CONFIG["rabbitmq"]["user"], $CC_CONFIG["rabbitmq"]["user"],
$CC_CONFIG["rabbitmq"]["password"], $CC_CONFIG["rabbitmq"]["password"],
$CC_CONFIG["rabbitmq"]["vhost"]); $CC_CONFIG["rabbitmq"]["vhost"]);
if (!isset($conn)) {
throw new Exception("Cannot connect to RabbitMQ server");
}
$channel = $conn->channel(); $channel = $conn->channel();
$channel->access_request($CC_CONFIG["rabbitmq"]["vhost"], false, false, $channel->access_request($CC_CONFIG["rabbitmq"]["vhost"], false, false,
true, true); true, true);

View File

@ -20,6 +20,41 @@ SQL;
return (is_numeric($count) && ($count != '0')); return (is_numeric($count) && ($count != '0'));
} }
public static function getAllFutureScheduledFiles()
{
$con = Propel::getConnection();
$sql = <<<SQL
SELECT distinct(file_id)
FROM cc_schedule
WHERE ends > now() AT TIME ZONE 'UTC'
AND file_id is not null
SQL;
$files = $con->query($sql)->fetchAll();
$real_files = array();
foreach ($files as $f) {
$real_files[] = $f['file_id'];
}
return $real_files;
}
public static function getAllFutureScheduledWebstreams()
{
$con = Propel::getConnection();
$sql = <<<SQL
SELECT distinct(stream_id)
FROM cc_schedule
WHERE ends > now() AT TIME ZONE 'UTC'
AND stream_id is not null
SQL;
$streams = $con->query($sql)->fetchAll();
$real_streams = array();
foreach ($streams as $s) {
$real_streams[] = $s['stream_id'];
}
return $real_streams;
}
/** /**
* Returns data related to the scheduled items. * Returns data related to the scheduled items.
* *
@ -696,6 +731,10 @@ SQL;
'replay_gain' => $replay_gain, 'replay_gain' => $replay_gain,
'independent_event' => $independent_event, 'independent_event' => $independent_event,
); );
if ($schedule_item['cue_in'] > $schedule_item['cue_out']) {
$schedule_item['cue_in'] = $schedule_item['cue_out'];
}
self::appendScheduleItem($data, $start, $schedule_item); self::appendScheduleItem($data, $start, $schedule_item);
} }
@ -906,7 +945,6 @@ SQL;
self::createScheduledEvents($data, $range_start, $range_end); self::createScheduledEvents($data, $range_start, $range_end);
self::foldData($data["media"]); self::foldData($data["media"]);
return $data; return $data;
} }

View File

@ -136,13 +136,17 @@ class Application_Model_Scheduler
if ($type === "audioclip") { if ($type === "audioclip") {
$file = CcFilesQuery::create()->findPK($id, $this->con); $file = CcFilesQuery::create()->findPK($id, $this->con);
$storedFile = new Application_Model_StoredFile($file->getDbId());
if (is_null($file) || !$file->visible()) { if (is_null($file) || !$file->visible()) {
throw new Exception(_("A selected File does not exist!")); throw new Exception(_("A selected File does not exist!"));
} else { } else {
$data = $this->fileInfo; $data = $this->fileInfo;
$data["id"] = $id; $data["id"] = $id;
$data["cliplength"] = $file->getDbLength(); $data["cliplength"] = $storedFile->getRealClipLength(
$file->getDbCuein(),
$file->getDbCueout());
$data["cuein"] = $file->getDbCuein(); $data["cuein"] = $file->getDbCuein();
$data["cueout"] = $file->getDbCueout(); $data["cueout"] = $file->getDbCueout();
@ -199,9 +203,12 @@ class Application_Model_Scheduler
$file = CcFilesQuery::create()->findPk($fileId); $file = CcFilesQuery::create()->findPk($fileId);
if (isset($file) && $file->visible()) { if (isset($file) && $file->visible()) {
$data["id"] = $file->getDbId(); $data["id"] = $file->getDbId();
$data["cliplength"] = $file->getDbLength(); $data["cuein"] = $file->getDbCuein();
$data["cuein"] = "00:00:00"; $data["cueout"] = $file->getDbCueout();
$data["cueout"] = $file->getDbLength();
$cuein = Application_Common_DateHelper::calculateLengthInSeconds($data["cuein"]);
$cueout = Application_Common_DateHelper::calculateLengthInSeconds($data["cueout"]);
$data["cliplength"] = Application_Common_DateHelper::secondsToPlaylistTime($cueout - $cuein);
$defaultFade = Application_Model_Preference::GetDefaultFade(); $defaultFade = Application_Model_Preference::GetDefaultFade();
if (isset($defaultFade)) { if (isset($defaultFade)) {
//fade is in format SS.uuuuuu //fade is in format SS.uuuuuu
@ -257,9 +264,12 @@ class Application_Model_Scheduler
$file = CcFilesQuery::create()->findPk($fileId); $file = CcFilesQuery::create()->findPk($fileId);
if (isset($file) && $file->visible()) { if (isset($file) && $file->visible()) {
$data["id"] = $file->getDbId(); $data["id"] = $file->getDbId();
$data["cliplength"] = $file->getDbLength(); $data["cuein"] = $file->getDbCuein();
$data["cuein"] = "00:00:00"; $data["cueout"] = $file->getDbCueout();
$data["cueout"] = $file->getDbLength();
$cuein = Application_Common_DateHelper::calculateLengthInSeconds($data["cuein"]);
$cueout = Application_Common_DateHelper::calculateLengthInSeconds($data["cueout"]);
$data["cliplength"] = Application_Common_DateHelper::secondsToPlaylistTime($cueout - $cuein);
$defaultFade = Application_Model_Preference::GetDefaultFade(); $defaultFade = Application_Model_Preference::GetDefaultFade();
if (isset($defaultFade)) { if (isset($defaultFade)) {
//fade is in format SS.uuuuuu //fade is in format SS.uuuuuu
@ -321,6 +331,8 @@ class Application_Model_Scheduler
$filler->setDbStarts($DT) $filler->setDbStarts($DT)
->setDbEnds($this->nowDT) ->setDbEnds($this->nowDT)
->setDbClipLength($cliplength) ->setDbClipLength($cliplength)
->setDbCueIn('00:00:00')
->setDbCueOut('00:00:00')
->setDbPlayoutStatus(-1) ->setDbPlayoutStatus(-1)
->setDbInstanceId($instance->getDbId()) ->setDbInstanceId($instance->getDbId())
->save($this->con); ->save($this->con);
@ -438,7 +450,6 @@ class Application_Model_Scheduler
} }
foreach ($schedFiles as $file) { foreach ($schedFiles as $file) {
$endTimeDT = $this->findEndTime($nextStartDT, $file['cliplength']); $endTimeDT = $this->findEndTime($nextStartDT, $file['cliplength']);
//item existed previously and is being moved. //item existed previously and is being moved.
@ -514,6 +525,13 @@ class Application_Model_Scheduler
$instance->updateScheduleStatus($this->con); $instance->updateScheduleStatus($this->con);
} }
// update is_scheduled flag for each cc_file
foreach ($schedFiles as $file) {
$db_file = CcFilesQuery::create()->findPk($file['id'], $this->con);
$db_file->setDbIsScheduled(true);
$db_file->save($this->con);
}
$endProfile = microtime(true); $endProfile = microtime(true);
Logging::debug("updating show instances status."); Logging::debug("updating show instances status.");
Logging::debug(floatval($endProfile) - floatval($startProfile)); Logging::debug(floatval($endProfile) - floatval($startProfile));
@ -718,6 +736,16 @@ class Application_Model_Scheduler
} else { } else {
$removedItem->delete($this->con); $removedItem->delete($this->con);
} }
// update is_scheduled in cc_files but only if
// the file is not scheduled somewhere else
$fileId = $removedItem->getDbFileId();
// check if the removed item is scheduled somewhere else
$futureScheduledFiles = Application_Model_Schedule::getAllFutureScheduledFiles();
if (!is_null($fileId) && !in_array($fileId, $futureScheduledFiles)) {
$db_file = CcFilesQuery::create()->findPk($fileId, $this->con);
$db_file->setDbIsScheduled(false)->save($this->con);
}
} }
if ($adjustSched === true) { if ($adjustSched === true) {

View File

@ -663,6 +663,30 @@ SQL;
$con->exec($sql); $con->exec($sql);
} }
public function getNextFutureRepeatShowTime()
{
$sql = <<<SQL
SELECT starts, ends FROM cc_show_instances
WHERE ends > now() at time zone 'UTC'
AND show_id = :showId
ORDER BY starts
LIMIT 1
SQL;
$result = Application_Common_Database::prepareAndExecute( $sql,
array( 'showId' => $this->getId() ), 'all' );
foreach ($result as $r) {
$show["starts"] = new DateTime($r["starts"], new DateTimeZone('UTC'));
$show["ends"] = new DateTime($r["ends"], new DateTimeZone('UTC'));
}
$currentUser = Application_Model_User::getCurrentUser();
$currentUserId = $currentUser->getId();
$userTimezone = Application_Model_Preference::GetUserTimezone($currentUserId);
$show["starts"]->setTimezone(new DateTimeZone($userTimezone));
$show["ends"]->setTimezone(new DateTimeZone($userTimezone));
return $show;
}
/** /**
* Get the start date of the current show in UTC timezone. * Get the start date of the current show in UTC timezone.
* *
@ -1750,12 +1774,15 @@ SQL;
$interval = $p_start->diff($p_end); $interval = $p_start->diff($p_end);
$days = $interval->format('%a'); $days = $interval->format('%a');
$shows = Application_Model_Show::getShows($p_start, $p_end); $shows = Application_Model_Show::getShows($p_start, $p_end);
$nowEpoch = time();
$content_count = Application_Model_ShowInstance::getContentCount( $content_count = Application_Model_ShowInstance::getContentCount(
$p_start, $p_end); $p_start, $p_end);
$isFull = Application_Model_ShowInstance::getIsFull($p_start, $p_end);
$timezone = date_default_timezone_get(); $timezone = date_default_timezone_get();
$current_timezone = new DateTimeZone($timezone);
$utc = new DateTimeZone("UTC");
$now = new DateTime("now", $utc);
foreach ($shows as $show) { foreach ($shows as &$show) {
$options = array(); $options = array();
//only bother calculating percent for week or day view. //only bother calculating percent for week or day view.
@ -1763,11 +1790,8 @@ SQL;
$options["percent"] = Application_Model_Show::getPercentScheduled($show["starts"], $show["ends"], $show["time_filled"]); $options["percent"] = Application_Model_Show::getPercentScheduled($show["starts"], $show["ends"], $show["time_filled"]);
} }
$utc = new DateTimeZone("UTC");
if (isset($show["parent_starts"])) { if (isset($show["parent_starts"])) {
$parentStartsDT = new DateTime($show["parent_starts"], $utc); $parentStartsDT = new DateTime($show["parent_starts"], $utc);
$parentStartsEpoch = intval($parentStartsDT->format("U"));
} }
$startsDT = DateTime::createFromFormat("Y-m-d G:i:s", $startsDT = DateTime::createFromFormat("Y-m-d G:i:s",
@ -1775,39 +1799,53 @@ SQL;
$endsDT = DateTime::createFromFormat("Y-m-d G:i:s", $endsDT = DateTime::createFromFormat("Y-m-d G:i:s",
$show["ends"], $utc); $show["ends"], $utc);
$startsEpochStr = $startsDT->format("U");
$endsEpochStr = $endsDT->format("U");
$startsEpoch = intval($startsEpochStr);
$endsEpoch = intval($endsEpochStr);
$startsDT->setTimezone(new DateTimeZone($timezone));
$endsDT->setTimezone(new DateTimeZone($timezone));
if( $p_editable ) { if( $p_editable ) {
if ($show["record"] && $nowEpoch > $startsEpoch) { if ($show["record"] && $now > $startsDT) {
$options["editable"] = false; $options["editable"] = false;
} elseif ($show["rebroadcast"] && } elseif ($show["rebroadcast"] &&
$nowEpoch > $parentStartsEpoch) { $now > $parentStartsDT) {
$options["editable"] = false; $options["editable"] = false;
} elseif ($nowEpoch < $endsEpoch) { } elseif ($now < $endsDT) {
$options["editable"] = true; $options["editable"] = true;
} }
} }
$startsDT->setTimezone($current_timezone);
$showInstance = new Application_Model_ShowInstance( $endsDT->setTimezone($current_timezone);
$show["instance_id"]);
$options["show_empty"] = (array_key_exists($show['instance_id'], $options["show_empty"] = (array_key_exists($show['instance_id'],
$content_count)) ? 0 : 1; $content_count)) ? 0 : 1;
$options["show_partial_filled"] = $showInstance->showPartialFilled();
$events[] = &self::makeFullCalendarEvent($show, $options, $options["show_partial_filled"] = !$isFull[$show['instance_id']];
$startsDT, $endsDT, $startsEpochStr, $endsEpochStr);
$event = array();
$event["id"] = intval($show["instance_id"]);
$event["title"] = $show["name"];
$event["start"] = $startsDT->format("Y-m-d H:i:s");
$event["end"] = $endsDT->format("Y-m-d H:i:s");
$event["allDay"] = false;
$event["showId"] = intval($show["show_id"]);
$event["record"] = intval($show["record"]);
$event["rebroadcast"] = intval($show["rebroadcast"]);
$event["soundcloud_id"] = is_null($show["soundcloud_id"])
? -1 : $show["soundcloud_id"];
//event colouring
if ($show["color"] != "") {
$event["textColor"] = "#".$show["color"];
}
if ($show["background_color"] != "") {
$event["color"] = "#".$show["background_color"];
}
foreach ($options as $key => $value) {
$event[$key] = $value;
}
$events[] = $event;
} }
return $events; return $events;
} }
@ -1824,7 +1862,7 @@ SQL;
return $percent; return $percent;
} }
private static function &makeFullCalendarEvent(&$show, $options=array(), $startDateTime, $endDateTime, $startsEpoch, $endsEpoch) /* private static function &makeFullCalendarEvent(&$show, $options=array(), $startDateTime, $endDateTime, $startsEpoch, $endsEpoch)
{ {
$event = array(); $event = array();
@ -1855,7 +1893,7 @@ SQL;
} }
return $event; return $event;
} }*/
/* Takes in a UTC DateTime object. /* Takes in a UTC DateTime object.
* Converts this to local time, since cc_show days * Converts this to local time, since cc_show days
@ -2162,4 +2200,42 @@ SQL;
} }
return $assocArray; return $assocArray;
} }
public static function getStartEndCurrentMonthView() {
$first_day_of_calendar_month_view = mktime(0, 0, 0, date("n"), 1);
$weekStart = Application_Model_Preference::GetWeekStartDay();
while (date('w', $first_day_of_calendar_month_view) != $weekStart) {
$first_day_of_calendar_month_view -= 60*60*24;
}
$last_day_of_calendar_view = $first_day_of_calendar_month_view + 3600*24*42;
$start = new DateTime("@".$first_day_of_calendar_month_view);
$end = new DateTime("@".$last_day_of_calendar_view);
return array($start, $end);
}
public static function getStartEndCurrentWeekView() {
$first_day_of_calendar_week_view = mktime(0, 0, 0, date("n"), date("j"));
$weekStart = Application_Model_Preference::GetWeekStartDay();
while (date('w', $first_day_of_calendar_week_view) != $weekStart) {
$first_day_of_calendar_week_view -= 60*60*24;
}
$last_day_of_calendar_view = $first_day_of_calendar_week_view + 3600*24*7;
$start = new DateTime("@".$first_day_of_calendar_week_view);
$end = new DateTime("@".$last_day_of_calendar_view);
return array($start, $end);
}
public static function getStartEndCurrentDayView() {
$today = mktime(0, 0, 0, date("n"), date("j"));
$tomorrow = $today + 3600*24;
$start = new DateTime("@".$today);
$end = new DateTime("@".$tomorrow);
return array($start, $end);
}
} }

View File

@ -227,7 +227,7 @@ class Application_Model_ShowBuilder
$row["endDate"] = $showEndDT->format("Y-m-d"); $row["endDate"] = $showEndDT->format("Y-m-d");
$row["endTime"] = $showEndDT->format("H:i"); $row["endTime"] = $showEndDT->format("H:i");
$row["duration"] = floatval($showEndDT->format("U.u")) - floatval($showStartDT->format("U.u")); $row["duration"] = floatval($showEndDT->format("U.u")) - floatval($showStartDT->format("U.u"));
$row["title"] = $p_item["show_name"]; $row["title"] = htmlspecialchars($p_item["show_name"]);
$row["instance"] = intval($p_item["si_id"]); $row["instance"] = intval($p_item["si_id"]);
$row["image"] = ''; $row["image"] = '';
@ -275,9 +275,9 @@ class Application_Model_ShowBuilder
$formatter = new LengthFormatter(Application_Common_DateHelper::ConvertMSToHHMMSSmm($run_time*1000)); $formatter = new LengthFormatter(Application_Common_DateHelper::ConvertMSToHHMMSSmm($run_time*1000));
$row['runtime'] = $formatter->format(); $row['runtime'] = $formatter->format();
$row["title"] = $p_item["file_track_title"]; $row["title"] = htmlspecialchars($p_item["file_track_title"]);
$row["creator"] = $p_item["file_artist_name"]; $row["creator"] = htmlspecialchars($p_item["file_artist_name"]);
$row["album"] = $p_item["file_album_title"]; $row["album"] = htmlspecialchars($p_item["file_album_title"]);
$row["cuein"] = $p_item["cue_in"]; $row["cuein"] = $p_item["cue_in"];
$row["cueout"] = $p_item["cue_out"]; $row["cueout"] = $p_item["cue_out"];

View File

@ -661,10 +661,8 @@ SQL;
return $returnStr; return $returnStr;
} }
public static function getContentCount($p_start, $p_end) public static function getContentCount($p_start, $p_end)
{ {
$sql = <<<SQL $sql = <<<SQL
SELECT instance_id, SELECT instance_id,
count(*) AS instance_count count(*) AS instance_count
@ -687,20 +685,26 @@ SQL;
} }
public function showPartialFilled() public static function getIsFull($p_start, $p_end)
{ {
$sql = <<<SQL $sql = <<<SQL
SELECT time_filled > '00:00:00' SELECT id, ends-starts-'00:00:05' < time_filled as filled
AND time_filled < ends - starts from cc_show_instances
AND file_id IS null AS partial_filled WHERE ends > :p_start::TIMESTAMP
FROM cc_show_instances AND starts < :p_end::TIMESTAMP
WHERE id = :instance_id
SQL; SQL;
$res = Application_Common_Database::prepareAndExecute($sql, $res = Application_Common_Database::prepareAndExecute($sql, array(
array(':instance_id' => $this->_instanceId), 'all'); ':p_start' => $p_start->format("Y-m-d G:i:s"),
':p_end' => $p_end->format("Y-m-d G:i:s"))
, 'all');
return $res[0]["partial_filled"]; $isFilled = array();
foreach ($res as $r) {
$isFilled[$r['id']] = $r['filled'];
}
return $isFilled;
} }
public function showEmpty() public function showEmpty()

View File

@ -368,7 +368,12 @@ SQL;
if (file_exists($filepath) && $type == "stor") { if (file_exists($filepath) && $type == "stor") {
$data = array("filepath" => $filepath, "delete" => 1); $data = array("filepath" => $filepath, "delete" => 1);
Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data); try {
Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
} catch (Exception $e) {
Logging::error($e->getMessage());
return;
}
} }
@ -645,7 +650,8 @@ SQL;
"track_number", "mood", "bpm", "composer", "info_url", "track_number", "mood", "bpm", "composer", "info_url",
"bit_rate", "sample_rate", "isrc_number", "encoded_by", "label", "bit_rate", "sample_rate", "isrc_number", "encoded_by", "label",
"copyright", "mime", "language", "filepath", "owner_id", "copyright", "mime", "language", "filepath", "owner_id",
"conductor", "replay_gain", "lptime" ); "conductor", "replay_gain", "lptime", "is_playlist", "is_scheduled",
"cuein", "cueout" );
} }
public static function searchLibraryFiles($datatables) public static function searchLibraryFiles($datatables)
@ -697,6 +703,16 @@ SQL;
$blSelect[] = "NULL::TIMESTAMP AS ".$key; $blSelect[] = "NULL::TIMESTAMP AS ".$key;
$fileSelect[] = $key; $fileSelect[] = $key;
$streamSelect[] = $key; $streamSelect[] = $key;
} elseif ($key === "is_scheduled" || $key === "is_playlist") {
$plSelect[] = "NULL::boolean AS ".$key;
$blSelect[] = "NULL::boolean AS ".$key;
$fileSelect[] = $key;
$streamSelect[] = "NULL::boolean AS ".$key;
} elseif ($key === "cuein" || $key === "cueout") {
$plSelect[] = "NULL::INTERVAL AS ".$key;
$blSelect[] = "NULL::INTERVAL AS ".$key;
$fileSelect[] = $key;
$streamSelect[] = "NULL::INTERVAL AS ".$key;
} }
//same columns in each table. //same columns in each table.
else if (in_array($key, array("length", "utime", "mtime"))) { else if (in_array($key, array("length", "utime", "mtime"))) {
@ -770,14 +786,22 @@ SQL;
$fromTable = $unionTable; $fromTable = $unionTable;
} }
// update is_scheduled to false for tracks that
// have already played out
self::updatePastFilesIsScheduled();
$results = Application_Model_Datatables::findEntries($con, $displayColumns, $fromTable, $datatables); $results = Application_Model_Datatables::findEntries($con, $displayColumns, $fromTable, $datatables);
//Used by the audio preview functionality in the library.
foreach ($results['aaData'] as &$row) { foreach ($results['aaData'] as &$row) {
$row['id'] = intval($row['id']); $row['id'] = intval($row['id']);
$formatter = new LengthFormatter($row['length']); $len_formatter = new LengthFormatter($row['length']);
$row['length'] = $formatter->format(); $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") {
$formatter = new SamplerateFormatter($row['sample_rate']); $formatter = new SamplerateFormatter($row['sample_rate']);
@ -785,6 +809,15 @@ SQL;
$formatter = new BitrateFormatter($row['bit_rate']); $formatter = new BitrateFormatter($row['bit_rate']);
$row['bit_rate'] = $formatter->format(); $row['bit_rate'] = $formatter->format();
//soundcloud status
$file = Application_Model_StoredFile::Recall($row['id']);
$row['soundcloud_status'] = $file->getSoundCloudId();
// for audio preview
$row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
} else {
$row['audioFile'] = $row['id'];
} }
//convert mtime and utime to localtime //convert mtime and utime to localtime
@ -795,31 +828,13 @@ SQL;
$row['utime']->setTimeZone(new DateTimeZone(date_default_timezone_get())); $row['utime']->setTimeZone(new DateTimeZone(date_default_timezone_get()));
$row['utime'] = $row['utime']->format('Y-m-d H:i:s'); $row['utime'] = $row['utime']->format('Y-m-d H:i:s');
// add checkbox row // we need to initalize the checkbox and image row because we do not retrieve
$row['checkbox'] = "<input type='checkbox' name='cb_".$row['id']."'>"; // any data from the db for these and datatables will complain
$row['checkbox'] = "";
$row['image'] = "";
$type = substr($row['ftype'], 0, 2); $type = substr($row['ftype'], 0, 2);
$row['tr_id'] = "{$type}_{$row['id']}"; $row['tr_id'] = "{$type}_{$row['id']}";
//TODO url like this to work on both playlist/showbuilder
//screens. datatable stuff really needs to be pulled out and
//generalized within the project access to zend view methods
//to access url helpers is needed.
// TODO : why is there inline html here? breaks abstraction and is
// ugly
if ($type == "au") {
$row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
$row['image'] = '<img title="'._("Track preview").'" src="'.$baseUrl.'css/images/icon_audioclip.png">';
} elseif ($type == "pl") {
$row['image'] = '<img title="'._("Playlist preview").'" src="'.$baseUrl.'css/images/icon_playlist.png">';
} elseif ($type == "st") {
$row['audioFile'] = $row['id'];
$row['image'] = '<img title="'._("Webstream preview").'" src="'.$baseUrl.'css/images/icon_webstream.png">';
} elseif ($type == "bl") {
$row['image'] = '<img title="'._("Smart Block").'" src="'.$baseUrl.'css/images/icon_smart-block.png">';
}
} }
return $results; return $results;
@ -1026,8 +1041,10 @@ SQL;
$LIQUIDSOAP_ERRORS = array('TagLib: MPEG::Properties::read() -- Could not find a valid last MPEG frame in the stream.'); $LIQUIDSOAP_ERRORS = array('TagLib: MPEG::Properties::read() -- Could not find a valid last MPEG frame in the stream.');
// Ask Liquidsoap if file is playable // Ask Liquidsoap if file is playable
$command = sprintf("/usr/bin/airtime-liquidsoap -c 'output.dummy(audio_to_stereo(single(\"%s\")))' 2>&1", $audio_file); $ls_command = sprintf('/usr/bin/airtime-liquidsoap -v -c "output.dummy(audio_to_stereo(single(%s)))" 2>&1',
escapeshellarg($audio_file));
$command = "export PATH=/usr/local/bin:/usr/bin:/bin/usr/bin/ && $ls_command";
exec($command, $output, $rv); exec($command, $output, $rv);
$isError = count($output) > 0 && in_array($output[0], $LIQUIDSOAP_ERRORS); $isError = count($output) > 0 && in_array($output[0], $LIQUIDSOAP_ERRORS);
@ -1285,6 +1302,65 @@ SQL;
} }
} }
} }
public static function setIsPlaylist($p_playlistItems, $p_type, $p_status) {
foreach ($p_playlistItems as $item) {
$file = self::Recall($item->getDbFileId());
$fileId = $file->_file->getDbId();
if ($p_type == 'playlist') {
// we have to check if the file is in another playlist before
// we can update
if (!is_null($fileId) && !in_array($fileId, Application_Model_Playlist::getAllPlaylistFiles())) {
$file->_file->setDbIsPlaylist($p_status)->save();
}
} elseif ($p_type == 'block') {
if (!is_null($fileId) && !in_array($fileId, Application_Model_Block::getAllBlockFiles())) {
$file->_file->setDbIsPlaylist($p_status)->save();
}
}
}
}
public static function setIsScheduled($p_scheduleItem, $p_status, $p_fileId=null) {
if (is_null($p_fileId)) {
$fileId = Application_Model_Schedule::GetFileId($p_scheduleItem);
} else {
$fileId = $p_fileId;
}
$file = self::Recall($fileId);
$updateIsScheduled = false;
if (!is_null($fileId) && !in_array($fileId, Application_Model_Schedule::getAllFutureScheduledFiles())) {
$file->_file->setDbIsScheduled($p_status)->save();
$updateIsScheduled = true;
}
return $updateIsScheduled;
}
public static function updatePastFilesIsScheduled()
{
$con = Propel::getConnection();
$sql = <<<SQL
SELECT file_id FROM cc_schedule
WHERE ends < now() at time zone 'UTC'
SQL;
$files = $con->query($sql)->fetchAll();
foreach ($files as $file) {
if (!is_null($file['file_id'])) {
self::setIsScheduled(null, false, $file['file_id']);
}
}
}
public 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

@ -214,35 +214,22 @@ class Application_Model_Systemstatus
{ {
$partions = array(); $partions = array();
if (isset($_SERVER['AIRTIME_SRV'])) { /* First lets get all the watched directories. Then we can group them
//connect to DB and find how much total space user has allocated. * into the same partitions by comparing the partition sizes. */
$totalSpace = Application_Model_Preference::GetDiskQuota(); $musicDirs = Application_Model_MusicDir::getWatchedDirs();
$musicDirs[] = Application_Model_MusicDir::getStorDir();
$storPath = Application_Model_MusicDir::getStorDir()->getDirectory(); foreach ($musicDirs as $md) {
$totalSpace = disk_total_space($md->getDirectory());
list($usedSpace,) = preg_split("/[\s]+/", exec("du -bs $storPath")); if (!isset($partitions[$totalSpace])) {
$partitions[$totalSpace] = new StdClass;
$partitions[$totalSpace]->totalSpace = $totalSpace;
$partitions[$totalSpace]->totalFreeSpace = disk_free_space($md->getDirectory());
$partitions[$totalSpace]->totalSpace = $totalSpace;
$partitions[$totalSpace]->totalFreeSpace = $totalSpace - $usedSpace;
Logging::info($partitions[$totalSpace]->totalFreeSpace);
} else {
/* First lets get all the watched directories. Then we can group them
* into the same partitions by comparing the partition sizes. */
$musicDirs = Application_Model_MusicDir::getWatchedDirs();
$musicDirs[] = Application_Model_MusicDir::getStorDir();
foreach ($musicDirs as $md) {
$totalSpace = disk_total_space($md->getDirectory());
if (!isset($partitions[$totalSpace])) {
$partitions[$totalSpace] = new StdClass;
$partitions[$totalSpace]->totalSpace = $totalSpace;
$partitions[$totalSpace]->totalFreeSpace = disk_free_space($md->getDirectory());
}
$partitions[$totalSpace]->dirs[] = $md->getDirectory();
} }
$partitions[$totalSpace]->dirs[] = $md->getDirectory();
} }
return array_values($partitions); return array_values($partitions);

View File

@ -335,6 +335,8 @@ class Application_Model_User
} else { } else {
$record['delete'] = ""; $record['delete'] = "";
} }
$record = array_map('htmlspecialchars', $record);
} }
return $res; return $res;

View File

@ -106,6 +106,8 @@ class CcFilesTableMap extends TableMap {
$this->addColumn('CUEOUT', 'DbCueout', 'VARCHAR', false, null, '00:00:00'); $this->addColumn('CUEOUT', 'DbCueout', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('SILAN_CHECK', 'DbSilanCheck', 'BOOLEAN', false, null, false); $this->addColumn('SILAN_CHECK', 'DbSilanCheck', 'BOOLEAN', false, null, false);
$this->addColumn('HIDDEN', 'DbHidden', 'BOOLEAN', false, null, false); $this->addColumn('HIDDEN', 'DbHidden', 'BOOLEAN', false, null, false);
$this->addColumn('IS_SCHEDULED', 'DbIsScheduled', 'BOOLEAN', false, null, false);
$this->addColumn('IS_PLAYLIST', 'DbIsPlaylist', 'BOOLEAN', false, null, false);
// validators // validators
} // initialize() } // initialize()

View File

@ -46,8 +46,8 @@ class CcScheduleTableMap extends TableMap {
$this->addColumn('CLIP_LENGTH', 'DbClipLength', 'VARCHAR', false, null, '00:00:00'); $this->addColumn('CLIP_LENGTH', 'DbClipLength', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('FADE_IN', 'DbFadeIn', 'TIME', false, null, '00:00:00'); $this->addColumn('FADE_IN', 'DbFadeIn', 'TIME', false, null, '00:00:00');
$this->addColumn('FADE_OUT', 'DbFadeOut', 'TIME', false, null, '00:00:00'); $this->addColumn('FADE_OUT', 'DbFadeOut', 'TIME', false, null, '00:00:00');
$this->addColumn('CUE_IN', 'DbCueIn', 'VARCHAR', false, null, '00:00:00'); $this->addColumn('CUE_IN', 'DbCueIn', 'VARCHAR', true, null, null);
$this->addColumn('CUE_OUT', 'DbCueOut', 'VARCHAR', false, null, '00:00:00'); $this->addColumn('CUE_OUT', 'DbCueOut', 'VARCHAR', true, null, null);
$this->addColumn('MEDIA_ITEM_PLAYED', 'DbMediaItemPlayed', 'BOOLEAN', false, null, false); $this->addColumn('MEDIA_ITEM_PLAYED', 'DbMediaItemPlayed', 'BOOLEAN', false, null, false);
$this->addForeignKey('INSTANCE_ID', 'DbInstanceId', 'INTEGER', 'cc_show_instances', 'ID', true, null, null); $this->addForeignKey('INSTANCE_ID', 'DbInstanceId', 'INTEGER', 'cc_show_instances', 'ID', true, null, null);
$this->addColumn('PLAYOUT_STATUS', 'DbPlayoutStatus', 'SMALLINT', true, null, 1); $this->addColumn('PLAYOUT_STATUS', 'DbPlayoutStatus', 'SMALLINT', true, null, 1);

View File

@ -444,6 +444,20 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/ */
protected $hidden; protected $hidden;
/**
* The value for the is_scheduled field.
* Note: this column has a database default value of: false
* @var boolean
*/
protected $is_scheduled;
/**
* The value for the is_playlist field.
* Note: this column has a database default value of: false
* @var boolean
*/
protected $is_playlist;
/** /**
* @var CcSubjs * @var CcSubjs
*/ */
@ -513,6 +527,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->cueout = '00:00:00'; $this->cueout = '00:00:00';
$this->silan_check = false; $this->silan_check = false;
$this->hidden = false; $this->hidden = false;
$this->is_scheduled = false;
$this->is_playlist = false;
} }
/** /**
@ -1297,6 +1313,26 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->hidden; return $this->hidden;
} }
/**
* Get the [is_scheduled] column value.
*
* @return boolean
*/
public function getDbIsScheduled()
{
return $this->is_scheduled;
}
/**
* Get the [is_playlist] column value.
*
* @return boolean
*/
public function getDbIsPlaylist()
{
return $this->is_playlist;
}
/** /**
* Set the value of [id] column. * Set the value of [id] column.
* *
@ -2785,6 +2821,46 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this; return $this;
} // setDbHidden() } // setDbHidden()
/**
* Set the value of [is_scheduled] column.
*
* @param boolean $v new value
* @return CcFiles The current object (for fluent API support)
*/
public function setDbIsScheduled($v)
{
if ($v !== null) {
$v = (boolean) $v;
}
if ($this->is_scheduled !== $v || $this->isNew()) {
$this->is_scheduled = $v;
$this->modifiedColumns[] = CcFilesPeer::IS_SCHEDULED;
}
return $this;
} // setDbIsScheduled()
/**
* Set the value of [is_playlist] column.
*
* @param boolean $v new value
* @return CcFiles The current object (for fluent API support)
*/
public function setDbIsPlaylist($v)
{
if ($v !== null) {
$v = (boolean) $v;
}
if ($this->is_playlist !== $v || $this->isNew()) {
$this->is_playlist = $v;
$this->modifiedColumns[] = CcFilesPeer::IS_PLAYLIST;
}
return $this;
} // setDbIsPlaylist()
/** /**
* Indicates whether the columns in this object are only set to default values. * Indicates whether the columns in this object are only set to default values.
* *
@ -2843,6 +2919,14 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return false; return false;
} }
if ($this->is_scheduled !== false) {
return false;
}
if ($this->is_playlist !== false) {
return false;
}
// otherwise, everything was equal, so return TRUE // otherwise, everything was equal, so return TRUE
return true; return true;
} // hasOnlyDefaultValues() } // hasOnlyDefaultValues()
@ -2933,6 +3017,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->cueout = ($row[$startcol + 65] !== null) ? (string) $row[$startcol + 65] : null; $this->cueout = ($row[$startcol + 65] !== null) ? (string) $row[$startcol + 65] : null;
$this->silan_check = ($row[$startcol + 66] !== null) ? (boolean) $row[$startcol + 66] : null; $this->silan_check = ($row[$startcol + 66] !== null) ? (boolean) $row[$startcol + 66] : null;
$this->hidden = ($row[$startcol + 67] !== null) ? (boolean) $row[$startcol + 67] : null; $this->hidden = ($row[$startcol + 67] !== null) ? (boolean) $row[$startcol + 67] : null;
$this->is_scheduled = ($row[$startcol + 68] !== null) ? (boolean) $row[$startcol + 68] : null;
$this->is_playlist = ($row[$startcol + 69] !== null) ? (boolean) $row[$startcol + 69] : null;
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
@ -2941,7 +3027,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->ensureConsistency(); $this->ensureConsistency();
} }
return $startcol + 68; // 68 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 70; // 70 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating CcFiles object", $e); throw new PropelException("Error populating CcFiles object", $e);
@ -3578,6 +3664,12 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
case 67: case 67:
return $this->getDbHidden(); return $this->getDbHidden();
break; break;
case 68:
return $this->getDbIsScheduled();
break;
case 69:
return $this->getDbIsPlaylist();
break;
default: default:
return null; return null;
break; break;
@ -3670,6 +3762,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$keys[65] => $this->getDbCueout(), $keys[65] => $this->getDbCueout(),
$keys[66] => $this->getDbSilanCheck(), $keys[66] => $this->getDbSilanCheck(),
$keys[67] => $this->getDbHidden(), $keys[67] => $this->getDbHidden(),
$keys[68] => $this->getDbIsScheduled(),
$keys[69] => $this->getDbIsPlaylist(),
); );
if ($includeForeignObjects) { if ($includeForeignObjects) {
if (null !== $this->aFkOwner) { if (null !== $this->aFkOwner) {
@ -3916,6 +4010,12 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
case 67: case 67:
$this->setDbHidden($value); $this->setDbHidden($value);
break; break;
case 68:
$this->setDbIsScheduled($value);
break;
case 69:
$this->setDbIsPlaylist($value);
break;
} // switch() } // switch()
} }
@ -4008,6 +4108,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if (array_key_exists($keys[65], $arr)) $this->setDbCueout($arr[$keys[65]]); if (array_key_exists($keys[65], $arr)) $this->setDbCueout($arr[$keys[65]]);
if (array_key_exists($keys[66], $arr)) $this->setDbSilanCheck($arr[$keys[66]]); if (array_key_exists($keys[66], $arr)) $this->setDbSilanCheck($arr[$keys[66]]);
if (array_key_exists($keys[67], $arr)) $this->setDbHidden($arr[$keys[67]]); if (array_key_exists($keys[67], $arr)) $this->setDbHidden($arr[$keys[67]]);
if (array_key_exists($keys[68], $arr)) $this->setDbIsScheduled($arr[$keys[68]]);
if (array_key_exists($keys[69], $arr)) $this->setDbIsPlaylist($arr[$keys[69]]);
} }
/** /**
@ -4087,6 +4189,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if ($this->isColumnModified(CcFilesPeer::CUEOUT)) $criteria->add(CcFilesPeer::CUEOUT, $this->cueout); if ($this->isColumnModified(CcFilesPeer::CUEOUT)) $criteria->add(CcFilesPeer::CUEOUT, $this->cueout);
if ($this->isColumnModified(CcFilesPeer::SILAN_CHECK)) $criteria->add(CcFilesPeer::SILAN_CHECK, $this->silan_check); if ($this->isColumnModified(CcFilesPeer::SILAN_CHECK)) $criteria->add(CcFilesPeer::SILAN_CHECK, $this->silan_check);
if ($this->isColumnModified(CcFilesPeer::HIDDEN)) $criteria->add(CcFilesPeer::HIDDEN, $this->hidden); if ($this->isColumnModified(CcFilesPeer::HIDDEN)) $criteria->add(CcFilesPeer::HIDDEN, $this->hidden);
if ($this->isColumnModified(CcFilesPeer::IS_SCHEDULED)) $criteria->add(CcFilesPeer::IS_SCHEDULED, $this->is_scheduled);
if ($this->isColumnModified(CcFilesPeer::IS_PLAYLIST)) $criteria->add(CcFilesPeer::IS_PLAYLIST, $this->is_playlist);
return $criteria; return $criteria;
} }
@ -4215,6 +4319,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$copyObj->setDbCueout($this->cueout); $copyObj->setDbCueout($this->cueout);
$copyObj->setDbSilanCheck($this->silan_check); $copyObj->setDbSilanCheck($this->silan_check);
$copyObj->setDbHidden($this->hidden); $copyObj->setDbHidden($this->hidden);
$copyObj->setDbIsScheduled($this->is_scheduled);
$copyObj->setDbIsPlaylist($this->is_playlist);
if ($deepCopy) { if ($deepCopy) {
// important: temporarily setNew(false) because this affects the behavior of // important: temporarily setNew(false) because this affects the behavior of
@ -5121,6 +5227,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->cueout = null; $this->cueout = null;
$this->silan_check = null; $this->silan_check = null;
$this->hidden = null; $this->hidden = null;
$this->is_scheduled = null;
$this->is_playlist = null;
$this->alreadyInSave = false; $this->alreadyInSave = false;
$this->alreadyInValidation = false; $this->alreadyInValidation = false;
$this->clearAllReferences(); $this->clearAllReferences();

View File

@ -26,7 +26,7 @@ abstract class BaseCcFilesPeer {
const TM_CLASS = 'CcFilesTableMap'; const TM_CLASS = 'CcFilesTableMap';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 68; const NUM_COLUMNS = 70;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
@ -235,6 +235,12 @@ abstract class BaseCcFilesPeer {
/** the column name for the HIDDEN field */ /** the column name for the HIDDEN field */
const HIDDEN = 'cc_files.HIDDEN'; const HIDDEN = 'cc_files.HIDDEN';
/** the column name for the IS_SCHEDULED field */
const IS_SCHEDULED = 'cc_files.IS_SCHEDULED';
/** the column name for the IS_PLAYLIST field */
const IS_PLAYLIST = 'cc_files.IS_PLAYLIST';
/** /**
* An identiy map to hold any loaded instances of CcFiles objects. * An identiy map to hold any loaded instances of CcFiles objects.
* This must be public so that other peer classes can access this when hydrating from JOIN * This must be public so that other peer classes can access this when hydrating from JOIN
@ -251,12 +257,12 @@ abstract class BaseCcFilesPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExists', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', 'DbSoundCloundUploadTime', 'DbReplayGain', 'DbOwnerId', 'DbCuein', 'DbCueout', 'DbSilanCheck', 'DbHidden', ), BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExists', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', 'DbSoundCloundUploadTime', 'DbReplayGain', 'DbOwnerId', 'DbCuein', 'DbCueout', 'DbSilanCheck', 'DbHidden', 'DbIsScheduled', 'DbIsPlaylist', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExists', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', 'dbSoundCloundUploadTime', 'dbReplayGain', 'dbOwnerId', 'dbCuein', 'dbCueout', 'dbSilanCheck', 'dbHidden', ), BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExists', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', 'dbSoundCloundUploadTime', 'dbReplayGain', 'dbOwnerId', 'dbCuein', 'dbCueout', 'dbSilanCheck', 'dbHidden', 'dbIsScheduled', 'dbIsPlaylist', ),
BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::MIME, self::FTYPE, self::DIRECTORY, self::FILEPATH, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::UTIME, self::LPTIME, self::MD5, self::TRACK_TITLE, self::ARTIST_NAME, self::BIT_RATE, self::SAMPLE_RATE, self::FORMAT, self::LENGTH, self::ALBUM_TITLE, self::GENRE, self::COMMENTS, self::YEAR, self::TRACK_NUMBER, self::CHANNELS, self::URL, self::BPM, self::RATING, self::ENCODED_BY, self::DISC_NUMBER, self::MOOD, self::LABEL, self::COMPOSER, self::ENCODER, self::CHECKSUM, self::LYRICS, self::ORCHESTRA, self::CONDUCTOR, self::LYRICIST, self::ORIGINAL_LYRICIST, self::RADIO_STATION_NAME, self::INFO_URL, self::ARTIST_URL, self::AUDIO_SOURCE_URL, self::RADIO_STATION_URL, self::BUY_THIS_URL, self::ISRC_NUMBER, self::CATALOG_NUMBER, self::ORIGINAL_ARTIST, self::COPYRIGHT, self::REPORT_DATETIME, self::REPORT_LOCATION, self::REPORT_ORGANIZATION, self::SUBJECT, self::CONTRIBUTOR, self::LANGUAGE, self::FILE_EXISTS, self::SOUNDCLOUD_ID, self::SOUNDCLOUD_ERROR_CODE, self::SOUNDCLOUD_ERROR_MSG, self::SOUNDCLOUD_LINK_TO_FILE, self::SOUNDCLOUD_UPLOAD_TIME, self::REPLAY_GAIN, self::OWNER_ID, self::CUEIN, self::CUEOUT, self::SILAN_CHECK, self::HIDDEN, ), BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::MIME, self::FTYPE, self::DIRECTORY, self::FILEPATH, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::UTIME, self::LPTIME, self::MD5, self::TRACK_TITLE, self::ARTIST_NAME, self::BIT_RATE, self::SAMPLE_RATE, self::FORMAT, self::LENGTH, self::ALBUM_TITLE, self::GENRE, self::COMMENTS, self::YEAR, self::TRACK_NUMBER, self::CHANNELS, self::URL, self::BPM, self::RATING, self::ENCODED_BY, self::DISC_NUMBER, self::MOOD, self::LABEL, self::COMPOSER, self::ENCODER, self::CHECKSUM, self::LYRICS, self::ORCHESTRA, self::CONDUCTOR, self::LYRICIST, self::ORIGINAL_LYRICIST, self::RADIO_STATION_NAME, self::INFO_URL, self::ARTIST_URL, self::AUDIO_SOURCE_URL, self::RADIO_STATION_URL, self::BUY_THIS_URL, self::ISRC_NUMBER, self::CATALOG_NUMBER, self::ORIGINAL_ARTIST, self::COPYRIGHT, self::REPORT_DATETIME, self::REPORT_LOCATION, self::REPORT_ORGANIZATION, self::SUBJECT, self::CONTRIBUTOR, self::LANGUAGE, self::FILE_EXISTS, self::SOUNDCLOUD_ID, self::SOUNDCLOUD_ERROR_CODE, self::SOUNDCLOUD_ERROR_MSG, self::SOUNDCLOUD_LINK_TO_FILE, self::SOUNDCLOUD_UPLOAD_TIME, self::REPLAY_GAIN, self::OWNER_ID, self::CUEIN, self::CUEOUT, self::SILAN_CHECK, self::HIDDEN, self::IS_SCHEDULED, self::IS_PLAYLIST, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXISTS', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', 'SOUNDCLOUD_UPLOAD_TIME', 'REPLAY_GAIN', 'OWNER_ID', 'CUEIN', 'CUEOUT', 'SILAN_CHECK', 'HIDDEN', ), BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXISTS', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', 'SOUNDCLOUD_UPLOAD_TIME', 'REPLAY_GAIN', 'OWNER_ID', 'CUEIN', 'CUEOUT', 'SILAN_CHECK', 'HIDDEN', 'IS_SCHEDULED', 'IS_PLAYLIST', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'mime', 'ftype', 'directory', 'filepath', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exists', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', 'soundcloud_upload_time', 'replay_gain', 'owner_id', 'cuein', 'cueout', 'silan_check', 'hidden', ), BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'mime', 'ftype', 'directory', 'filepath', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exists', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', 'soundcloud_upload_time', 'replay_gain', 'owner_id', 'cuein', 'cueout', 'silan_check', 'hidden', 'is_scheduled', 'is_playlist', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, )
); );
/** /**
@ -266,12 +272,12 @@ abstract class BaseCcFilesPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
private static $fieldKeys = array ( private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbMime' => 2, 'DbFtype' => 3, 'DbDirectory' => 4, 'DbFilepath' => 5, 'DbState' => 6, 'DbCurrentlyaccessing' => 7, 'DbEditedby' => 8, 'DbMtime' => 9, 'DbUtime' => 10, 'DbLPtime' => 11, 'DbMd5' => 12, 'DbTrackTitle' => 13, 'DbArtistName' => 14, 'DbBitRate' => 15, 'DbSampleRate' => 16, 'DbFormat' => 17, 'DbLength' => 18, 'DbAlbumTitle' => 19, 'DbGenre' => 20, 'DbComments' => 21, 'DbYear' => 22, 'DbTrackNumber' => 23, 'DbChannels' => 24, 'DbUrl' => 25, 'DbBpm' => 26, 'DbRating' => 27, 'DbEncodedBy' => 28, 'DbDiscNumber' => 29, 'DbMood' => 30, 'DbLabel' => 31, 'DbComposer' => 32, 'DbEncoder' => 33, 'DbChecksum' => 34, 'DbLyrics' => 35, 'DbOrchestra' => 36, 'DbConductor' => 37, 'DbLyricist' => 38, 'DbOriginalLyricist' => 39, 'DbRadioStationName' => 40, 'DbInfoUrl' => 41, 'DbArtistUrl' => 42, 'DbAudioSourceUrl' => 43, 'DbRadioStationUrl' => 44, 'DbBuyThisUrl' => 45, 'DbIsrcNumber' => 46, 'DbCatalogNumber' => 47, 'DbOriginalArtist' => 48, 'DbCopyright' => 49, 'DbReportDatetime' => 50, 'DbReportLocation' => 51, 'DbReportOrganization' => 52, 'DbSubject' => 53, 'DbContributor' => 54, 'DbLanguage' => 55, 'DbFileExists' => 56, 'DbSoundcloudId' => 57, 'DbSoundcloudErrorCode' => 58, 'DbSoundcloudErrorMsg' => 59, 'DbSoundcloudLinkToFile' => 60, 'DbSoundCloundUploadTime' => 61, 'DbReplayGain' => 62, 'DbOwnerId' => 63, 'DbCuein' => 64, 'DbCueout' => 65, 'DbSilanCheck' => 66, 'DbHidden' => 67, ), BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbMime' => 2, 'DbFtype' => 3, 'DbDirectory' => 4, 'DbFilepath' => 5, 'DbState' => 6, 'DbCurrentlyaccessing' => 7, 'DbEditedby' => 8, 'DbMtime' => 9, 'DbUtime' => 10, 'DbLPtime' => 11, 'DbMd5' => 12, 'DbTrackTitle' => 13, 'DbArtistName' => 14, 'DbBitRate' => 15, 'DbSampleRate' => 16, 'DbFormat' => 17, 'DbLength' => 18, 'DbAlbumTitle' => 19, 'DbGenre' => 20, 'DbComments' => 21, 'DbYear' => 22, 'DbTrackNumber' => 23, 'DbChannels' => 24, 'DbUrl' => 25, 'DbBpm' => 26, 'DbRating' => 27, 'DbEncodedBy' => 28, 'DbDiscNumber' => 29, 'DbMood' => 30, 'DbLabel' => 31, 'DbComposer' => 32, 'DbEncoder' => 33, 'DbChecksum' => 34, 'DbLyrics' => 35, 'DbOrchestra' => 36, 'DbConductor' => 37, 'DbLyricist' => 38, 'DbOriginalLyricist' => 39, 'DbRadioStationName' => 40, 'DbInfoUrl' => 41, 'DbArtistUrl' => 42, 'DbAudioSourceUrl' => 43, 'DbRadioStationUrl' => 44, 'DbBuyThisUrl' => 45, 'DbIsrcNumber' => 46, 'DbCatalogNumber' => 47, 'DbOriginalArtist' => 48, 'DbCopyright' => 49, 'DbReportDatetime' => 50, 'DbReportLocation' => 51, 'DbReportOrganization' => 52, 'DbSubject' => 53, 'DbContributor' => 54, 'DbLanguage' => 55, 'DbFileExists' => 56, 'DbSoundcloudId' => 57, 'DbSoundcloudErrorCode' => 58, 'DbSoundcloudErrorMsg' => 59, 'DbSoundcloudLinkToFile' => 60, 'DbSoundCloundUploadTime' => 61, 'DbReplayGain' => 62, 'DbOwnerId' => 63, 'DbCuein' => 64, 'DbCueout' => 65, 'DbSilanCheck' => 66, 'DbHidden' => 67, 'DbIsScheduled' => 68, 'DbIsPlaylist' => 69, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbMime' => 2, 'dbFtype' => 3, 'dbDirectory' => 4, 'dbFilepath' => 5, 'dbState' => 6, 'dbCurrentlyaccessing' => 7, 'dbEditedby' => 8, 'dbMtime' => 9, 'dbUtime' => 10, 'dbLPtime' => 11, 'dbMd5' => 12, 'dbTrackTitle' => 13, 'dbArtistName' => 14, 'dbBitRate' => 15, 'dbSampleRate' => 16, 'dbFormat' => 17, 'dbLength' => 18, 'dbAlbumTitle' => 19, 'dbGenre' => 20, 'dbComments' => 21, 'dbYear' => 22, 'dbTrackNumber' => 23, 'dbChannels' => 24, 'dbUrl' => 25, 'dbBpm' => 26, 'dbRating' => 27, 'dbEncodedBy' => 28, 'dbDiscNumber' => 29, 'dbMood' => 30, 'dbLabel' => 31, 'dbComposer' => 32, 'dbEncoder' => 33, 'dbChecksum' => 34, 'dbLyrics' => 35, 'dbOrchestra' => 36, 'dbConductor' => 37, 'dbLyricist' => 38, 'dbOriginalLyricist' => 39, 'dbRadioStationName' => 40, 'dbInfoUrl' => 41, 'dbArtistUrl' => 42, 'dbAudioSourceUrl' => 43, 'dbRadioStationUrl' => 44, 'dbBuyThisUrl' => 45, 'dbIsrcNumber' => 46, 'dbCatalogNumber' => 47, 'dbOriginalArtist' => 48, 'dbCopyright' => 49, 'dbReportDatetime' => 50, 'dbReportLocation' => 51, 'dbReportOrganization' => 52, 'dbSubject' => 53, 'dbContributor' => 54, 'dbLanguage' => 55, 'dbFileExists' => 56, 'dbSoundcloudId' => 57, 'dbSoundcloudErrorCode' => 58, 'dbSoundcloudErrorMsg' => 59, 'dbSoundcloudLinkToFile' => 60, 'dbSoundCloundUploadTime' => 61, 'dbReplayGain' => 62, 'dbOwnerId' => 63, 'dbCuein' => 64, 'dbCueout' => 65, 'dbSilanCheck' => 66, 'dbHidden' => 67, ), BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbMime' => 2, 'dbFtype' => 3, 'dbDirectory' => 4, 'dbFilepath' => 5, 'dbState' => 6, 'dbCurrentlyaccessing' => 7, 'dbEditedby' => 8, 'dbMtime' => 9, 'dbUtime' => 10, 'dbLPtime' => 11, 'dbMd5' => 12, 'dbTrackTitle' => 13, 'dbArtistName' => 14, 'dbBitRate' => 15, 'dbSampleRate' => 16, 'dbFormat' => 17, 'dbLength' => 18, 'dbAlbumTitle' => 19, 'dbGenre' => 20, 'dbComments' => 21, 'dbYear' => 22, 'dbTrackNumber' => 23, 'dbChannels' => 24, 'dbUrl' => 25, 'dbBpm' => 26, 'dbRating' => 27, 'dbEncodedBy' => 28, 'dbDiscNumber' => 29, 'dbMood' => 30, 'dbLabel' => 31, 'dbComposer' => 32, 'dbEncoder' => 33, 'dbChecksum' => 34, 'dbLyrics' => 35, 'dbOrchestra' => 36, 'dbConductor' => 37, 'dbLyricist' => 38, 'dbOriginalLyricist' => 39, 'dbRadioStationName' => 40, 'dbInfoUrl' => 41, 'dbArtistUrl' => 42, 'dbAudioSourceUrl' => 43, 'dbRadioStationUrl' => 44, 'dbBuyThisUrl' => 45, 'dbIsrcNumber' => 46, 'dbCatalogNumber' => 47, 'dbOriginalArtist' => 48, 'dbCopyright' => 49, 'dbReportDatetime' => 50, 'dbReportLocation' => 51, 'dbReportOrganization' => 52, 'dbSubject' => 53, 'dbContributor' => 54, 'dbLanguage' => 55, 'dbFileExists' => 56, 'dbSoundcloudId' => 57, 'dbSoundcloudErrorCode' => 58, 'dbSoundcloudErrorMsg' => 59, 'dbSoundcloudLinkToFile' => 60, 'dbSoundCloundUploadTime' => 61, 'dbReplayGain' => 62, 'dbOwnerId' => 63, 'dbCuein' => 64, 'dbCueout' => 65, 'dbSilanCheck' => 66, 'dbHidden' => 67, 'dbIsScheduled' => 68, 'dbIsPlaylist' => 69, ),
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::MIME => 2, self::FTYPE => 3, self::DIRECTORY => 4, self::FILEPATH => 5, self::STATE => 6, self::CURRENTLYACCESSING => 7, self::EDITEDBY => 8, self::MTIME => 9, self::UTIME => 10, self::LPTIME => 11, self::MD5 => 12, self::TRACK_TITLE => 13, self::ARTIST_NAME => 14, self::BIT_RATE => 15, self::SAMPLE_RATE => 16, self::FORMAT => 17, self::LENGTH => 18, self::ALBUM_TITLE => 19, self::GENRE => 20, self::COMMENTS => 21, self::YEAR => 22, self::TRACK_NUMBER => 23, self::CHANNELS => 24, self::URL => 25, self::BPM => 26, self::RATING => 27, self::ENCODED_BY => 28, self::DISC_NUMBER => 29, self::MOOD => 30, self::LABEL => 31, self::COMPOSER => 32, self::ENCODER => 33, self::CHECKSUM => 34, self::LYRICS => 35, self::ORCHESTRA => 36, self::CONDUCTOR => 37, self::LYRICIST => 38, self::ORIGINAL_LYRICIST => 39, self::RADIO_STATION_NAME => 40, self::INFO_URL => 41, self::ARTIST_URL => 42, self::AUDIO_SOURCE_URL => 43, self::RADIO_STATION_URL => 44, self::BUY_THIS_URL => 45, self::ISRC_NUMBER => 46, self::CATALOG_NUMBER => 47, self::ORIGINAL_ARTIST => 48, self::COPYRIGHT => 49, self::REPORT_DATETIME => 50, self::REPORT_LOCATION => 51, self::REPORT_ORGANIZATION => 52, self::SUBJECT => 53, self::CONTRIBUTOR => 54, self::LANGUAGE => 55, self::FILE_EXISTS => 56, self::SOUNDCLOUD_ID => 57, self::SOUNDCLOUD_ERROR_CODE => 58, self::SOUNDCLOUD_ERROR_MSG => 59, self::SOUNDCLOUD_LINK_TO_FILE => 60, self::SOUNDCLOUD_UPLOAD_TIME => 61, self::REPLAY_GAIN => 62, self::OWNER_ID => 63, self::CUEIN => 64, self::CUEOUT => 65, self::SILAN_CHECK => 66, self::HIDDEN => 67, ), BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::MIME => 2, self::FTYPE => 3, self::DIRECTORY => 4, self::FILEPATH => 5, self::STATE => 6, self::CURRENTLYACCESSING => 7, self::EDITEDBY => 8, self::MTIME => 9, self::UTIME => 10, self::LPTIME => 11, self::MD5 => 12, self::TRACK_TITLE => 13, self::ARTIST_NAME => 14, self::BIT_RATE => 15, self::SAMPLE_RATE => 16, self::FORMAT => 17, self::LENGTH => 18, self::ALBUM_TITLE => 19, self::GENRE => 20, self::COMMENTS => 21, self::YEAR => 22, self::TRACK_NUMBER => 23, self::CHANNELS => 24, self::URL => 25, self::BPM => 26, self::RATING => 27, self::ENCODED_BY => 28, self::DISC_NUMBER => 29, self::MOOD => 30, self::LABEL => 31, self::COMPOSER => 32, self::ENCODER => 33, self::CHECKSUM => 34, self::LYRICS => 35, self::ORCHESTRA => 36, self::CONDUCTOR => 37, self::LYRICIST => 38, self::ORIGINAL_LYRICIST => 39, self::RADIO_STATION_NAME => 40, self::INFO_URL => 41, self::ARTIST_URL => 42, self::AUDIO_SOURCE_URL => 43, self::RADIO_STATION_URL => 44, self::BUY_THIS_URL => 45, self::ISRC_NUMBER => 46, self::CATALOG_NUMBER => 47, self::ORIGINAL_ARTIST => 48, self::COPYRIGHT => 49, self::REPORT_DATETIME => 50, self::REPORT_LOCATION => 51, self::REPORT_ORGANIZATION => 52, self::SUBJECT => 53, self::CONTRIBUTOR => 54, self::LANGUAGE => 55, self::FILE_EXISTS => 56, self::SOUNDCLOUD_ID => 57, self::SOUNDCLOUD_ERROR_CODE => 58, self::SOUNDCLOUD_ERROR_MSG => 59, self::SOUNDCLOUD_LINK_TO_FILE => 60, self::SOUNDCLOUD_UPLOAD_TIME => 61, self::REPLAY_GAIN => 62, self::OWNER_ID => 63, self::CUEIN => 64, self::CUEOUT => 65, self::SILAN_CHECK => 66, self::HIDDEN => 67, self::IS_SCHEDULED => 68, self::IS_PLAYLIST => 69, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'MIME' => 2, 'FTYPE' => 3, 'DIRECTORY' => 4, 'FILEPATH' => 5, 'STATE' => 6, 'CURRENTLYACCESSING' => 7, 'EDITEDBY' => 8, 'MTIME' => 9, 'UTIME' => 10, 'LPTIME' => 11, 'MD5' => 12, 'TRACK_TITLE' => 13, 'ARTIST_NAME' => 14, 'BIT_RATE' => 15, 'SAMPLE_RATE' => 16, 'FORMAT' => 17, 'LENGTH' => 18, 'ALBUM_TITLE' => 19, 'GENRE' => 20, 'COMMENTS' => 21, 'YEAR' => 22, 'TRACK_NUMBER' => 23, 'CHANNELS' => 24, 'URL' => 25, 'BPM' => 26, 'RATING' => 27, 'ENCODED_BY' => 28, 'DISC_NUMBER' => 29, 'MOOD' => 30, 'LABEL' => 31, 'COMPOSER' => 32, 'ENCODER' => 33, 'CHECKSUM' => 34, 'LYRICS' => 35, 'ORCHESTRA' => 36, 'CONDUCTOR' => 37, 'LYRICIST' => 38, 'ORIGINAL_LYRICIST' => 39, 'RADIO_STATION_NAME' => 40, 'INFO_URL' => 41, 'ARTIST_URL' => 42, 'AUDIO_SOURCE_URL' => 43, 'RADIO_STATION_URL' => 44, 'BUY_THIS_URL' => 45, 'ISRC_NUMBER' => 46, 'CATALOG_NUMBER' => 47, 'ORIGINAL_ARTIST' => 48, 'COPYRIGHT' => 49, 'REPORT_DATETIME' => 50, 'REPORT_LOCATION' => 51, 'REPORT_ORGANIZATION' => 52, 'SUBJECT' => 53, 'CONTRIBUTOR' => 54, 'LANGUAGE' => 55, 'FILE_EXISTS' => 56, 'SOUNDCLOUD_ID' => 57, 'SOUNDCLOUD_ERROR_CODE' => 58, 'SOUNDCLOUD_ERROR_MSG' => 59, 'SOUNDCLOUD_LINK_TO_FILE' => 60, 'SOUNDCLOUD_UPLOAD_TIME' => 61, 'REPLAY_GAIN' => 62, 'OWNER_ID' => 63, 'CUEIN' => 64, 'CUEOUT' => 65, 'SILAN_CHECK' => 66, 'HIDDEN' => 67, ), BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'MIME' => 2, 'FTYPE' => 3, 'DIRECTORY' => 4, 'FILEPATH' => 5, 'STATE' => 6, 'CURRENTLYACCESSING' => 7, 'EDITEDBY' => 8, 'MTIME' => 9, 'UTIME' => 10, 'LPTIME' => 11, 'MD5' => 12, 'TRACK_TITLE' => 13, 'ARTIST_NAME' => 14, 'BIT_RATE' => 15, 'SAMPLE_RATE' => 16, 'FORMAT' => 17, 'LENGTH' => 18, 'ALBUM_TITLE' => 19, 'GENRE' => 20, 'COMMENTS' => 21, 'YEAR' => 22, 'TRACK_NUMBER' => 23, 'CHANNELS' => 24, 'URL' => 25, 'BPM' => 26, 'RATING' => 27, 'ENCODED_BY' => 28, 'DISC_NUMBER' => 29, 'MOOD' => 30, 'LABEL' => 31, 'COMPOSER' => 32, 'ENCODER' => 33, 'CHECKSUM' => 34, 'LYRICS' => 35, 'ORCHESTRA' => 36, 'CONDUCTOR' => 37, 'LYRICIST' => 38, 'ORIGINAL_LYRICIST' => 39, 'RADIO_STATION_NAME' => 40, 'INFO_URL' => 41, 'ARTIST_URL' => 42, 'AUDIO_SOURCE_URL' => 43, 'RADIO_STATION_URL' => 44, 'BUY_THIS_URL' => 45, 'ISRC_NUMBER' => 46, 'CATALOG_NUMBER' => 47, 'ORIGINAL_ARTIST' => 48, 'COPYRIGHT' => 49, 'REPORT_DATETIME' => 50, 'REPORT_LOCATION' => 51, 'REPORT_ORGANIZATION' => 52, 'SUBJECT' => 53, 'CONTRIBUTOR' => 54, 'LANGUAGE' => 55, 'FILE_EXISTS' => 56, 'SOUNDCLOUD_ID' => 57, 'SOUNDCLOUD_ERROR_CODE' => 58, 'SOUNDCLOUD_ERROR_MSG' => 59, 'SOUNDCLOUD_LINK_TO_FILE' => 60, 'SOUNDCLOUD_UPLOAD_TIME' => 61, 'REPLAY_GAIN' => 62, 'OWNER_ID' => 63, 'CUEIN' => 64, 'CUEOUT' => 65, 'SILAN_CHECK' => 66, 'HIDDEN' => 67, 'IS_SCHEDULED' => 68, 'IS_PLAYLIST' => 69, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'mime' => 2, 'ftype' => 3, 'directory' => 4, 'filepath' => 5, 'state' => 6, 'currentlyaccessing' => 7, 'editedby' => 8, 'mtime' => 9, 'utime' => 10, 'lptime' => 11, 'md5' => 12, 'track_title' => 13, 'artist_name' => 14, 'bit_rate' => 15, 'sample_rate' => 16, 'format' => 17, 'length' => 18, 'album_title' => 19, 'genre' => 20, 'comments' => 21, 'year' => 22, 'track_number' => 23, 'channels' => 24, 'url' => 25, 'bpm' => 26, 'rating' => 27, 'encoded_by' => 28, 'disc_number' => 29, 'mood' => 30, 'label' => 31, 'composer' => 32, 'encoder' => 33, 'checksum' => 34, 'lyrics' => 35, 'orchestra' => 36, 'conductor' => 37, 'lyricist' => 38, 'original_lyricist' => 39, 'radio_station_name' => 40, 'info_url' => 41, 'artist_url' => 42, 'audio_source_url' => 43, 'radio_station_url' => 44, 'buy_this_url' => 45, 'isrc_number' => 46, 'catalog_number' => 47, 'original_artist' => 48, 'copyright' => 49, 'report_datetime' => 50, 'report_location' => 51, 'report_organization' => 52, 'subject' => 53, 'contributor' => 54, 'language' => 55, 'file_exists' => 56, 'soundcloud_id' => 57, 'soundcloud_error_code' => 58, 'soundcloud_error_msg' => 59, 'soundcloud_link_to_file' => 60, 'soundcloud_upload_time' => 61, 'replay_gain' => 62, 'owner_id' => 63, 'cuein' => 64, 'cueout' => 65, 'silan_check' => 66, 'hidden' => 67, ), BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'mime' => 2, 'ftype' => 3, 'directory' => 4, 'filepath' => 5, 'state' => 6, 'currentlyaccessing' => 7, 'editedby' => 8, 'mtime' => 9, 'utime' => 10, 'lptime' => 11, 'md5' => 12, 'track_title' => 13, 'artist_name' => 14, 'bit_rate' => 15, 'sample_rate' => 16, 'format' => 17, 'length' => 18, 'album_title' => 19, 'genre' => 20, 'comments' => 21, 'year' => 22, 'track_number' => 23, 'channels' => 24, 'url' => 25, 'bpm' => 26, 'rating' => 27, 'encoded_by' => 28, 'disc_number' => 29, 'mood' => 30, 'label' => 31, 'composer' => 32, 'encoder' => 33, 'checksum' => 34, 'lyrics' => 35, 'orchestra' => 36, 'conductor' => 37, 'lyricist' => 38, 'original_lyricist' => 39, 'radio_station_name' => 40, 'info_url' => 41, 'artist_url' => 42, 'audio_source_url' => 43, 'radio_station_url' => 44, 'buy_this_url' => 45, 'isrc_number' => 46, 'catalog_number' => 47, 'original_artist' => 48, 'copyright' => 49, 'report_datetime' => 50, 'report_location' => 51, 'report_organization' => 52, 'subject' => 53, 'contributor' => 54, 'language' => 55, 'file_exists' => 56, 'soundcloud_id' => 57, 'soundcloud_error_code' => 58, 'soundcloud_error_msg' => 59, 'soundcloud_link_to_file' => 60, 'soundcloud_upload_time' => 61, 'replay_gain' => 62, 'owner_id' => 63, 'cuein' => 64, 'cueout' => 65, 'silan_check' => 66, 'hidden' => 67, 'is_scheduled' => 68, 'is_playlist' => 69, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, )
); );
/** /**
@ -411,6 +417,8 @@ abstract class BaseCcFilesPeer {
$criteria->addSelectColumn(CcFilesPeer::CUEOUT); $criteria->addSelectColumn(CcFilesPeer::CUEOUT);
$criteria->addSelectColumn(CcFilesPeer::SILAN_CHECK); $criteria->addSelectColumn(CcFilesPeer::SILAN_CHECK);
$criteria->addSelectColumn(CcFilesPeer::HIDDEN); $criteria->addSelectColumn(CcFilesPeer::HIDDEN);
$criteria->addSelectColumn(CcFilesPeer::IS_SCHEDULED);
$criteria->addSelectColumn(CcFilesPeer::IS_PLAYLIST);
} else { } else {
$criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.NAME'); $criteria->addSelectColumn($alias . '.NAME');
@ -480,6 +488,8 @@ abstract class BaseCcFilesPeer {
$criteria->addSelectColumn($alias . '.CUEOUT'); $criteria->addSelectColumn($alias . '.CUEOUT');
$criteria->addSelectColumn($alias . '.SILAN_CHECK'); $criteria->addSelectColumn($alias . '.SILAN_CHECK');
$criteria->addSelectColumn($alias . '.HIDDEN'); $criteria->addSelectColumn($alias . '.HIDDEN');
$criteria->addSelectColumn($alias . '.IS_SCHEDULED');
$criteria->addSelectColumn($alias . '.IS_PLAYLIST');
} }
} }

View File

@ -74,6 +74,8 @@
* @method CcFilesQuery orderByDbCueout($order = Criteria::ASC) Order by the cueout column * @method CcFilesQuery orderByDbCueout($order = Criteria::ASC) Order by the cueout column
* @method CcFilesQuery orderByDbSilanCheck($order = Criteria::ASC) Order by the silan_check column * @method CcFilesQuery orderByDbSilanCheck($order = Criteria::ASC) Order by the silan_check column
* @method CcFilesQuery orderByDbHidden($order = Criteria::ASC) Order by the hidden column * @method CcFilesQuery orderByDbHidden($order = Criteria::ASC) Order by the hidden column
* @method CcFilesQuery orderByDbIsScheduled($order = Criteria::ASC) Order by the is_scheduled column
* @method CcFilesQuery orderByDbIsPlaylist($order = Criteria::ASC) Order by the is_playlist column
* *
* @method CcFilesQuery groupByDbId() Group by the id column * @method CcFilesQuery groupByDbId() Group by the id column
* @method CcFilesQuery groupByDbName() Group by the name column * @method CcFilesQuery groupByDbName() Group by the name column
@ -143,6 +145,8 @@
* @method CcFilesQuery groupByDbCueout() Group by the cueout column * @method CcFilesQuery groupByDbCueout() Group by the cueout column
* @method CcFilesQuery groupByDbSilanCheck() Group by the silan_check column * @method CcFilesQuery groupByDbSilanCheck() Group by the silan_check column
* @method CcFilesQuery groupByDbHidden() Group by the hidden column * @method CcFilesQuery groupByDbHidden() Group by the hidden column
* @method CcFilesQuery groupByDbIsScheduled() Group by the is_scheduled column
* @method CcFilesQuery groupByDbIsPlaylist() Group by the is_playlist column
* *
* @method CcFilesQuery leftJoin($relation) Adds a LEFT JOIN clause to the query * @method CcFilesQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcFilesQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query * @method CcFilesQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
@ -247,6 +251,8 @@
* @method CcFiles findOneByDbCueout(string $cueout) Return the first CcFiles filtered by the cueout column * @method CcFiles findOneByDbCueout(string $cueout) Return the first CcFiles filtered by the cueout column
* @method CcFiles findOneByDbSilanCheck(boolean $silan_check) Return the first CcFiles filtered by the silan_check column * @method CcFiles findOneByDbSilanCheck(boolean $silan_check) Return the first CcFiles filtered by the silan_check column
* @method CcFiles findOneByDbHidden(boolean $hidden) Return the first CcFiles filtered by the hidden column * @method CcFiles findOneByDbHidden(boolean $hidden) Return the first CcFiles filtered by the hidden column
* @method CcFiles findOneByDbIsScheduled(boolean $is_scheduled) Return the first CcFiles filtered by the is_scheduled column
* @method CcFiles findOneByDbIsPlaylist(boolean $is_playlist) Return the first CcFiles filtered by the is_playlist column
* *
* @method array findByDbId(int $id) Return CcFiles objects filtered by the id column * @method array findByDbId(int $id) Return CcFiles objects filtered by the id column
* @method array findByDbName(string $name) Return CcFiles objects filtered by the name column * @method array findByDbName(string $name) Return CcFiles objects filtered by the name column
@ -316,6 +322,8 @@
* @method array findByDbCueout(string $cueout) Return CcFiles objects filtered by the cueout column * @method array findByDbCueout(string $cueout) Return CcFiles objects filtered by the cueout column
* @method array findByDbSilanCheck(boolean $silan_check) Return CcFiles objects filtered by the silan_check column * @method array findByDbSilanCheck(boolean $silan_check) Return CcFiles objects filtered by the silan_check column
* @method array findByDbHidden(boolean $hidden) Return CcFiles objects filtered by the hidden column * @method array findByDbHidden(boolean $hidden) Return CcFiles objects filtered by the hidden column
* @method array findByDbIsScheduled(boolean $is_scheduled) Return CcFiles objects filtered by the is_scheduled column
* @method array findByDbIsPlaylist(boolean $is_playlist) Return CcFiles objects filtered by the is_playlist column
* *
* @package propel.generator.airtime.om * @package propel.generator.airtime.om
*/ */
@ -2045,6 +2053,40 @@ abstract class BaseCcFilesQuery extends ModelCriteria
return $this->addUsingAlias(CcFilesPeer::HIDDEN, $dbHidden, $comparison); return $this->addUsingAlias(CcFilesPeer::HIDDEN, $dbHidden, $comparison);
} }
/**
* Filter the query on the is_scheduled column
*
* @param boolean|string $dbIsScheduled The value to use as filter.
* Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcFilesQuery The current query, for fluid interface
*/
public function filterByDbIsScheduled($dbIsScheduled = null, $comparison = null)
{
if (is_string($dbIsScheduled)) {
$is_scheduled = in_array(strtolower($dbIsScheduled), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
}
return $this->addUsingAlias(CcFilesPeer::IS_SCHEDULED, $dbIsScheduled, $comparison);
}
/**
* Filter the query on the is_playlist column
*
* @param boolean|string $dbIsPlaylist The value to use as filter.
* Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcFilesQuery The current query, for fluid interface
*/
public function filterByDbIsPlaylist($dbIsPlaylist = null, $comparison = null)
{
if (is_string($dbIsPlaylist)) {
$is_playlist = in_array(strtolower($dbIsPlaylist), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
}
return $this->addUsingAlias(CcFilesPeer::IS_PLAYLIST, $dbIsPlaylist, $comparison);
}
/** /**
* Filter the query by a related CcSubjs object * Filter the query by a related CcSubjs object
* *

View File

@ -77,14 +77,12 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
/** /**
* The value for the cue_in field. * The value for the cue_in field.
* Note: this column has a database default value of: '00:00:00'
* @var string * @var string
*/ */
protected $cue_in; protected $cue_in;
/** /**
* The value for the cue_out field. * The value for the cue_out field.
* Note: this column has a database default value of: '00:00:00'
* @var string * @var string
*/ */
protected $cue_out; protected $cue_out;
@ -161,8 +159,6 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->clip_length = '00:00:00'; $this->clip_length = '00:00:00';
$this->fade_in = '00:00:00'; $this->fade_in = '00:00:00';
$this->fade_out = '00:00:00'; $this->fade_out = '00:00:00';
$this->cue_in = '00:00:00';
$this->cue_out = '00:00:00';
$this->media_item_played = false; $this->media_item_played = false;
$this->playout_status = 1; $this->playout_status = 1;
$this->broadcasted = 0; $this->broadcasted = 0;
@ -708,7 +704,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$v = (string) $v; $v = (string) $v;
} }
if ($this->cue_in !== $v || $this->isNew()) { if ($this->cue_in !== $v) {
$this->cue_in = $v; $this->cue_in = $v;
$this->modifiedColumns[] = CcSchedulePeer::CUE_IN; $this->modifiedColumns[] = CcSchedulePeer::CUE_IN;
} }
@ -728,7 +724,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$v = (string) $v; $v = (string) $v;
} }
if ($this->cue_out !== $v || $this->isNew()) { if ($this->cue_out !== $v) {
$this->cue_out = $v; $this->cue_out = $v;
$this->modifiedColumns[] = CcSchedulePeer::CUE_OUT; $this->modifiedColumns[] = CcSchedulePeer::CUE_OUT;
} }
@ -842,14 +838,6 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
return false; return false;
} }
if ($this->cue_in !== '00:00:00') {
return false;
}
if ($this->cue_out !== '00:00:00') {
return false;
}
if ($this->media_item_played !== false) { if ($this->media_item_played !== false) {
return false; return false;
} }

View File

@ -1,4 +1,4 @@
<h2><? echo sprintf(_("%s's Settings"), $this->currentUser) ?></h2> <h2><? echo sprintf(_("%s's Settings"), $this->escape($this->currentUser)) ?></h2>
<div id="current-user-container"> <div id="current-user-container">
<form id="current-user-form" class="edit-user-global" method="post" enctype="application/x-www-form-urlencoded"> <form id="current-user-form" class="edit-user-global" method="post" enctype="application/x-www-form-urlencoded">
<dl class="zend_form"> <dl class="zend_form">
@ -160,4 +160,4 @@
<button type="submit" id="cu_save_user" class="btn btn-small right-floated"><?php echo _("Save")?></button> <button type="submit" id="cu_save_user" class="btn btn-small right-floated"><?php echo _("Save")?></button>
</dl> </dl>
</form> </form>
</div> </div>

View File

@ -11,7 +11,7 @@
<?php if($this->element->getElement('storageFolder')->hasErrors()) : ?> <?php if($this->element->getElement('storageFolder')->hasErrors()) : ?>
<ul class='errors'> <ul class='errors'>
<?php foreach($this->element->getElement('storageFolder')->getMessages() as $error): ?> <?php foreach($this->element->getElement('storageFolder')->getMessages() as $error): ?>
<li><?php echo $error; ?></li> <li><?php echo $this->escape($error); ?></li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
<?php endif; ?> <?php endif; ?>
@ -29,7 +29,7 @@
<?php if($this->element->getElement('watchedFolder')->hasErrors()) : ?> <?php if($this->element->getElement('watchedFolder')->hasErrors()) : ?>
<ul class='errors'> <ul class='errors'>
<?php foreach($this->element->getElement('watchedFolder')->getMessages() as $error): ?> <?php foreach($this->element->getElement('watchedFolder')->getMessages() as $error): ?>
<li><?php echo $error; ?></li> <li><?php echo $this->escape($error); ?></li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
<?php endif; ?> <?php endif; ?>
@ -39,7 +39,7 @@
<?php if (count($watched_dirs) > 0): ?> <?php if (count($watched_dirs) > 0): ?>
<?php foreach($watched_dirs as $watched_dir): ?> <?php foreach($watched_dirs as $watched_dir): ?>
<dd class="block-display selected-item"> <dd class="block-display selected-item">
<?php echo ($watched_dir->getExistsFlag())?"":"<span class='ui-icon-alert'><img src='/css/images/warning-icon.png'></span>"?><span id="folderPath" style="display:block; width:350px"><?php echo $watched_dir->getDirectory();?></span></span> <?php echo ($watched_dir->getExistsFlag())?"":"<span class='ui-icon-alert'><img src='/css/images/warning-icon.png'></span>"?><span id="folderPath" style="display:block; width:350px"><?php echo htmlspecialchars($watched_dir->getDirectory());?></span></span>
<span title="<?php echo _("Rescan watched directory (This is useful if it is network mount and may be out of sync with Airtime)")?>" class="ui-icon ui-icon-refresh"></span> <span title="<?php echo _("Rescan watched directory (This is useful if it is network mount and may be out of sync with Airtime)")?>" class="ui-icon ui-icon-refresh"></span>
<span title="<?php echo _("Remove watched directory")?>" class="ui-icon ui-icon-close"></span> <span title="<?php echo _("Remove watched directory")?>" class="ui-icon ui-icon-close"></span>

View File

@ -1,3 +1,9 @@
<?php
//XSS exploit prevention
foreach ($this->md as $key => &$value) {
$value = $this->escape($value);
}
?>
<?php if($this->type == "audioclip") : ?> <?php if($this->type == "audioclip") : ?>
<table class='library-track-md'> <table class='library-track-md'>
<tr><td><? echo _("Title:"); ?></td><td><?php echo ($this->md["MDATA_KEY_TITLE"]);?></td></tr> <tr><td><? echo _("Title:"); ?></td><td><?php echo ($this->md["MDATA_KEY_TITLE"]);?></td></tr>
@ -41,9 +47,18 @@
<span class='static'>o</span> <span><? echo _("Static Smart Block"); ?></span><br /> <span class='static'>o</span> <span><? echo _("Static Smart Block"); ?></span><br />
<span>o</span> <span><? echo _("Audio Track"); ?></span> <span>o</span> <span><? echo _("Audio Track"); ?></span>
</div> </div>
<?php } ?> <?php } ?>
<?php if ($this->type == "playlist" || ($this->type == "block" && $this->blType == "Static")) {?> <?php if ($this->type == "playlist" || ($this->type == "block" && $this->blType == "Static")) {?>
<?php
//XSS exploit prevention
/*foreach ($this->contents as &$item) {
foreach ($item as $key => &$value) {
$value = $this->escape($value);
}
}*/
?>
<?php if ($this->type == "playlist") { ?> <?php if ($this->type == "playlist") { ?>
<div class='file-md-qtip-left'><span><? echo _("Playlist Contents: "); ?></span></div> <div class='file-md-qtip-left'><span><? echo _("Playlist Contents: "); ?></span></div>
<?php } else { ?> <?php } else { ?>
@ -88,9 +103,13 @@
<?php } elseif ($this->blType == "Dynamic") { ?> <?php } elseif ($this->blType == "Dynamic") { ?>
<div class='file-md-qtip-left'><span><? echo _("Dynamic Smart Block Criteria: "); ?></span></div> <div class='file-md-qtip-left'><span><? echo _("Dynamic Smart Block Criteria: "); ?></span></div>
<table class='library-get-file-md table-small'> <table class='library-get-file-md table-small'>
<?php foreach ($this->contents["crit"] as $criterias) : ?> <?php foreach ($this->contents["crit"] as &$criterias) : ?>
<?php foreach ($criterias as $crit ) : ?> <?php foreach ($criterias as &$crit ) : ?>
<?php <?php
// XSS exploit prevention
//$crit["value"] = htmlspecialchars($crit["value"]);
//$crit["extra"] = htmlspecialchars($crit["extra"]);
$valMaxStrLen = 25; $valMaxStrLen = 25;
if (strlen($crit["value"]) > $valMaxStrLen) { if (strlen($crit["value"]) > $valMaxStrLen) {
$crit["value"] = substr($crit["value"], 0, 24)."..."; $crit["value"] = substr($crit["value"], 0, 24)."...";

View File

@ -2,7 +2,14 @@
<?php echo $this->render('library/library.phtml') ?> <?php echo $this->render('library/library.phtml') ?>
</div> </div>
<div id="side_playlist" class="pl-content ui-widget ui-widget-content block-shadow omega-block padded" style="height:697px; width:720px;"> <?php
if ($this->showPlaylist) {
$display = "";
} else {
$display = "display:none";
}
?>
<div id="side_playlist" class="pl-content ui-widget ui-widget-content block-shadow omega-block padded" style="height:697px; width:720px;<?php echo $display?>">
<?php if ($this->type == 'block') { <?php if ($this->type == 'block') {
echo $this->render('playlist/smart-block.phtml'); echo $this->render('playlist/smart-block.phtml');
} else if ($this->type == 'playlist') { } else if ($this->type == 'playlist') {

View File

@ -4,6 +4,7 @@ if (isset($this->obj)) {
$count = count($contents); $count = count($contents);
} }
?> ?>
<a href="#" class="close-round" id="lib_pl_close"></a>
<div class="btn-toolbar spl-no-top-margin clearfix"> <div class="btn-toolbar spl-no-top-margin clearfix">
<div class="btn-group pull-left"> <div class="btn-group pull-left">
<button id="spl_new" class="btn dropdown-toggle" data-toggle="dropdown" aria-disabled="false"> <button id="spl_new" class="btn dropdown-toggle" data-toggle="dropdown" aria-disabled="false">
@ -16,6 +17,9 @@ if (isset($this->obj)) {
</ul> </ul>
</div> </div>
<?php if (isset($this->obj)) : ?> <?php if (isset($this->obj)) : ?>
<div class='btn-group pull-right'>
<button class="btn btn-inverse" title='<?php echo _("Empty playlist content") ?>' type="button" id="pl-bl-clear-content"><? echo _("Clear") ?></button>
</div>
<div class='btn-group pull-right'> <div class='btn-group pull-right'>
<button class="btn btn-inverse" title='<?php echo _("Shuffle playlist") ?>' type="button" id="playlist_shuffle_button"><? echo _("Shuffle") ?></button> <button class="btn btn-inverse" title='<?php echo _("Shuffle playlist") ?>' type="button" id="playlist_shuffle_button"><? echo _("Shuffle") ?></button>
</div> </div>
@ -39,7 +43,7 @@ if (isset($this->obj)) {
<input id='obj_type' type='hidden' value='playlist'></input> <input id='obj_type' type='hidden' value='playlist'></input>
<div class="playlist_title"> <div class="playlist_title">
<h3 id="obj_name"> <h3 id="obj_name">
<a id="playlist_name_display" contenteditable="true"><?php echo $this->obj->getName(); ?></a> <a id="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
</h3> </h3>
<h4 id="obj_length"><?php echo $this->length; ?></h4> <h4 id="obj_length"><?php echo $this->length; ?></h4>
</div> </div>

View File

@ -4,6 +4,7 @@ if (isset($this->obj)) {
$count = count($contents); $count = count($contents);
} }
?> ?>
<a href="#" class="close-round" id="lib_pl_close"></a>
<div class="btn-toolbar spl-no-top-margin clearfix"> <div class="btn-toolbar spl-no-top-margin clearfix">
<div class="btn-group pull-left"> <div class="btn-group pull-left">
<button id="spl_new" class="btn dropdown-toggle" data-toggle='dropdown' aria-disabled="false"> <button id="spl_new" class="btn dropdown-toggle" data-toggle='dropdown' aria-disabled="false">
@ -16,6 +17,9 @@ if (isset($this->obj)) {
</ul> </ul>
</div> </div>
<?php if (isset($this->obj)) : ?> <?php if (isset($this->obj)) : ?>
<div class='btn-group pull-right'>
<button class="btn btn-inverse" title='<?php echo _("Empty smart block content") ?>' type="button" id="pl-bl-clear-content"><? echo _("Clear") ?></button>
</div>
<div class='btn-group pull-right'> <div class='btn-group pull-right'>
<button class="btn btn-inverse" title='Save smart block&#39s title, description, and criteria' type="button" id="save_button"><? echo _("Save") ?></button> <button class="btn btn-inverse" title='Save smart block&#39s title, description, and criteria' type="button" id="save_button"><? echo _("Save") ?></button>
</div> </div>
@ -39,7 +43,7 @@ if (isset($this->obj)) {
<a id="playlist_name_display" contenteditable="true"> <a id="playlist_name_display" contenteditable="true">
<?php <?php
if (isset($this->unsavedName)) echo $this->unsavedName; if (isset($this->unsavedName)) echo $this->unsavedName;
else echo $this->obj->getName(); else echo $this->escape($this->obj->getName());
?> ?>
</a> </a>
</h3> </h3>

View File

@ -13,9 +13,9 @@
<?php foreach($this->showContent as $row): ?> <?php foreach($this->showContent as $row): ?>
<tr id="au_<?php echo $row["item_id"] ?>" class="<?php if($i&1){echo "even";}else{echo "odd";}?>"> <tr id="au_<?php echo $row["item_id"] ?>" class="<?php if($i&1){echo "even";}else{echo "odd";}?>">
<td><?php echo $row["starts"] ?></td> <td><?php echo $row["starts"] ?></td>
<td><?php echo $row["track_title"] ?></td> <td><?php echo $this->escape($row["track_title"]) ?></td>
<td><?php echo $row["creator"] ?></td> <td><?php echo $this->escape($row["creator"]) ?></td>
<td><?php echo $row["album"] ?></td> <td><?php echo $this->escape($row["album"]) ?></td>
<td class="library_length"><?php echo $row["length"] ?></td> <td class="library_length"><?php echo $row["length"] ?></td>
<td><?php echo $row["genre"] ?></td> <td><?php echo $row["genre"] ?></td>
</tr> </tr>

View File

@ -1,3 +1,4 @@
<a href="#" class="close-round" id="lib_pl_close"></a>
<div class="btn-toolbar spl-no-top-margin clearfix"> <div class="btn-toolbar spl-no-top-margin clearfix">
<div class="btn-group pull-left"> <div class="btn-group pull-left">
<button id="ws_new" class="btn dropdown-toggle" data-toggle="dropdown" aria-disabled="false"> <button id="ws_new" class="btn dropdown-toggle" data-toggle="dropdown" aria-disabled="false">
@ -29,7 +30,7 @@
<div class="playlist_title"> <div class="playlist_title">
<div id="name-error" class="errors" style="display:none;"></div> <div id="name-error" class="errors" style="display:none;"></div>
<h3 id="ws_name"> <h3 id="ws_name">
<a id="playlist_name_display" contenteditable="true"><?php echo $this->obj->getName(); ?></a> <a id="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
</h3> </h3>
<h4 id="ws_length"><?php echo $this->obj->getDefaultLength(); ?></h4> <h4 id="ws_length"><?php echo $this->obj->getDefaultLength(); ?></h4>
</div> </div>

View File

@ -1,6 +1,6 @@
#Note: project.home is automatically generated by the propel-install script. #Note: project.home is automatically generated by the propel-install script.
#Any manual changes to this value will be overwritten. #Any manual changes to this value will be overwritten.
project.home = /home/rudi/reps/Airtime/airtime_mvc project.home = /home/denise/airtime/airtime_mvc
project.build = ${project.home}/build project.build = ${project.home}/build
#Database driver #Database driver

View File

@ -80,6 +80,8 @@
<column name="cueout" phpName="DbCueout" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00"/> <column name="cueout" phpName="DbCueout" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00"/>
<column name="silan_check" phpName="DbSilanCheck" type="BOOLEAN" defaultValue="false"/> <column name="silan_check" phpName="DbSilanCheck" type="BOOLEAN" defaultValue="false"/>
<column name="hidden" phpName="DbHidden" type="BOOLEAN" defaultValue="false"/> <column name="hidden" phpName="DbHidden" type="BOOLEAN" defaultValue="false"/>
<column name="is_scheduled" phpName="DbIsScheduled" type="BOOLEAN" defaultValue="false"/>
<column name="is_playlist" phpName="DbIsPlaylist" type="BOOLEAN" defaultValue="false"/>
<foreign-key foreignTable="cc_subjs" phpName="FkOwner" name="cc_files_owner_fkey"> <foreign-key foreignTable="cc_subjs" phpName="FkOwner" name="cc_files_owner_fkey">
<reference local="owner_id" foreign="id"/> <reference local="owner_id" foreign="id"/>
</foreign-key> </foreign-key>
@ -314,8 +316,8 @@
<column name="clip_length" phpName="DbClipLength" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00"/> <column name="clip_length" phpName="DbClipLength" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00"/>
<column name="fade_in" phpName="DbFadeIn" type="TIME" required="false" defaultValue="00:00:00"/> <column name="fade_in" phpName="DbFadeIn" type="TIME" required="false" defaultValue="00:00:00"/>
<column name="fade_out" phpName="DbFadeOut" type="TIME" required="false" defaultValue="00:00:00"/> <column name="fade_out" phpName="DbFadeOut" type="TIME" required="false" defaultValue="00:00:00"/>
<column name="cue_in" phpName="DbCueIn" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00"/> <column name="cue_in" phpName="DbCueIn" type="VARCHAR" sqlType="interval" required="true"/>
<column name="cue_out" phpName="DbCueOut" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00"/> <column name="cue_out" phpName="DbCueOut" type="VARCHAR" sqlType="interval" required="true"/>
<column name="media_item_played" phpName="DbMediaItemPlayed" type="BOOLEAN" required="false" defaultValue="0"/> <column name="media_item_played" phpName="DbMediaItemPlayed" type="BOOLEAN" required="false" defaultValue="0"/>
<column name="instance_id" phpName="DbInstanceId" type="INTEGER" required="true"/> <column name="instance_id" phpName="DbInstanceId" type="INTEGER" required="true"/>
<column name="playout_status" phpName="DbPlayoutStatus" type="SMALLINT" required="true" defaultValue="1"/> <column name="playout_status" phpName="DbPlayoutStatus" type="SMALLINT" required="true" defaultValue="1"/>

View File

@ -332,8 +332,10 @@ INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('es_ES', 'Español');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('fr_FR', 'Français'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('fr_FR', 'Français');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('it_IT', 'Italiano'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('it_IT', 'Italiano');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('ko_KR', '한국어'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('ko_KR', '한국어');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('pl_PL', 'Polski');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('pt_BR', 'Português Brasileiro'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('pt_BR', 'Português Brasileiro');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('ru_RU', 'Русский'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('ru_RU', 'Русский');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('zh_CN', '简体中文'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('zh_CN', '简体中文');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('el_GR', 'Ελληνικά');
-- end of added in 2.3 -- end of added in 2.3

View File

@ -98,6 +98,8 @@ CREATE TABLE "cc_files"
"cueout" interval default '00:00:00', "cueout" interval default '00:00:00',
"silan_check" BOOLEAN default 'f', "silan_check" BOOLEAN default 'f',
"hidden" BOOLEAN default 'f', "hidden" BOOLEAN default 'f',
"is_scheduled" BOOLEAN default 'f',
"is_playlist" BOOLEAN default 'f',
PRIMARY KEY ("id") PRIMARY KEY ("id")
); );
@ -418,8 +420,8 @@ CREATE TABLE "cc_schedule"
"clip_length" interval default '00:00:00', "clip_length" interval default '00:00:00',
"fade_in" TIME default '00:00:00', "fade_in" TIME default '00:00:00',
"fade_out" TIME default '00:00:00', "fade_out" TIME default '00:00:00',
"cue_in" interval default '00:00:00', "cue_in" interval NOT NULL,
"cue_out" interval default '00:00:00', "cue_out" interval NOT NULL,
"media_item_played" BOOLEAN default 'f', "media_item_played" BOOLEAN default 'f',
"instance_id" INTEGER NOT NULL, "instance_id" INTEGER NOT NULL,
"playout_status" INT2 default 1 NOT NULL, "playout_status" INT2 default 1 NOT NULL,

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: Airtime 2.3\n" "Project-Id-Version: Airtime 2.3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-01-15 10:36-0500\n" "POT-Creation-Date: 2013-01-15 10:36-0500\n"
"PO-Revision-Date: 2013-01-04 17:50+0100\n" "PO-Revision-Date: 2013-02-07 17:10-0500\n"
"Last-Translator: Daniel James <daniel.james@sourcefabric.org>\n" "Last-Translator: Denise Rigato <denise.rigato@sourcefabric.org>\n"
"Language-Team: Canadian Localization <contact@sourcefabric.org>\n" "Language-Team: Canadian Localization <contact@sourcefabric.org>\n"
"Language: en_CA\n" "Language: en_CA\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -2139,7 +2139,7 @@ msgstr "60m"
#: airtime_mvc/application/controllers/LocaleController.php:207 #: airtime_mvc/application/controllers/LocaleController.php:207
msgid "Retreiving data from the server..." msgid "Retreiving data from the server..."
msgstr "Retreiving data from the server..." msgstr "Retrieving data from the server..."
#: airtime_mvc/application/controllers/LocaleController.php:213 #: airtime_mvc/application/controllers/LocaleController.php:213
msgid "This show has no scheduled content." msgid "This show has no scheduled content."
@ -3511,7 +3511,7 @@ msgstr "Limit to "
#: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:512 #: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:512
msgid "Please selection an option" msgid "Please selection an option"
msgstr "Please selection an option" msgstr "Please select an option"
#: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:531 #: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:531
msgid "No Records" msgid "No Records"

View File

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Airtime 2.3\n" "Project-Id-Version: Airtime 2.3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-01-15 10:36-0500\n" "POT-Creation-Date: 2013-01-15 10:36-0500\n"
"PO-Revision-Date: 2013-01-04 17:47+0100\n" "PO-Revision-Date: 2013-02-08 11:03+0100\n"
"Last-Translator: Daniel James <daniel.james@sourcefabric.org>\n" "Last-Translator: Daniel James <daniel.james@sourcefabric.org>\n"
"Language-Team: British Localization <contact@sourcefabric.org>\n" "Language-Team: British Localization <contact@sourcefabric.org>\n"
"Language: en_GB\n" "Language: en_GB\n"
@ -716,7 +716,7 @@ msgstr "'%value%' is not between '%min%' and '%max%', inclusively"
#: airtime_mvc/application/forms/helpers/ValidationTypes.php:89 #: airtime_mvc/application/forms/helpers/ValidationTypes.php:89
msgid "Passwords do not match" msgid "Passwords do not match"
msgstr "" msgstr "Passwords do not match"
#: airtime_mvc/application/forms/AddShowRebroadcastDates.php:15 #: airtime_mvc/application/forms/AddShowRebroadcastDates.php:15
#: airtime_mvc/application/views/scripts/partialviews/trialBox.phtml:6 #: airtime_mvc/application/views/scripts/partialviews/trialBox.phtml:6
@ -845,7 +845,7 @@ msgstr "Password:"
#: airtime_mvc/application/forms/AddUser.php:40 #: airtime_mvc/application/forms/AddUser.php:40
#: airtime_mvc/application/forms/EditUser.php:50 #: airtime_mvc/application/forms/EditUser.php:50
msgid "Verify Password:" msgid "Verify Password:"
msgstr "" msgstr "Verify Password:"
#: airtime_mvc/application/forms/AddUser.php:48 #: airtime_mvc/application/forms/AddUser.php:48
#: airtime_mvc/application/forms/EditUser.php:59 #: airtime_mvc/application/forms/EditUser.php:59
@ -974,11 +974,11 @@ msgstr "Username"
#: airtime_mvc/application/forms/StreamSettingSubForm.php:195 #: airtime_mvc/application/forms/StreamSettingSubForm.php:195
msgid "Admin User" msgid "Admin User"
msgstr "" msgstr "Admin User"
#: airtime_mvc/application/forms/StreamSettingSubForm.php:207 #: airtime_mvc/application/forms/StreamSettingSubForm.php:207
msgid "Admin Password" msgid "Admin Password"
msgstr "" msgstr "Admin Password"
#: airtime_mvc/application/forms/StreamSettingSubForm.php:218 #: airtime_mvc/application/forms/StreamSettingSubForm.php:218
#: airtime_mvc/application/controllers/LocaleController.php:173 #: airtime_mvc/application/controllers/LocaleController.php:173
@ -1125,15 +1125,15 @@ msgstr "Station name - Show name"
#: airtime_mvc/application/forms/StreamSetting.php:63 #: airtime_mvc/application/forms/StreamSetting.php:63
msgid "Off Air Metadata" msgid "Off Air Metadata"
msgstr "" msgstr "Off Air Metadata"
#: airtime_mvc/application/forms/StreamSetting.php:69 #: airtime_mvc/application/forms/StreamSetting.php:69
msgid "Enable Replay Gain" msgid "Enable Replay Gain"
msgstr "" msgstr "Enable Replay Gain"
#: airtime_mvc/application/forms/StreamSetting.php:75 #: airtime_mvc/application/forms/StreamSetting.php:75
msgid "Replay Gain Modifier" msgid "Replay Gain Modifier"
msgstr "" msgstr "Replay Gain Modifier"
#: airtime_mvc/application/forms/PasswordRestore.php:14 #: airtime_mvc/application/forms/PasswordRestore.php:14
msgid "E-mail" msgid "E-mail"
@ -1435,7 +1435,7 @@ msgstr "All My Shows:"
#: airtime_mvc/application/forms/EditUser.php:118 #: airtime_mvc/application/forms/EditUser.php:118
msgid "Timezone:" msgid "Timezone:"
msgstr "" msgstr "Timezone:"
#: airtime_mvc/application/forms/AddShowLiveStream.php:10 #: airtime_mvc/application/forms/AddShowLiveStream.php:10
msgid "Use Airtime Authentication:" msgid "Use Airtime Authentication:"
@ -1484,11 +1484,11 @@ msgstr "Enabled"
#: airtime_mvc/application/forms/GeneralPreferences.php:56 #: airtime_mvc/application/forms/GeneralPreferences.php:56
msgid "Default Interface Language" msgid "Default Interface Language"
msgstr "" msgstr "Default Interface Language"
#: airtime_mvc/application/forms/GeneralPreferences.php:64 #: airtime_mvc/application/forms/GeneralPreferences.php:64
msgid "Default Interface Timezone" msgid "Default Interface Timezone"
msgstr "" msgstr "Default Interface Timezone"
#: airtime_mvc/application/forms/GeneralPreferences.php:72 #: airtime_mvc/application/forms/GeneralPreferences.php:72
msgid "Week Starts On" msgid "Week Starts On"
@ -1722,7 +1722,7 @@ msgstr "User updated successfully!"
#: airtime_mvc/application/controllers/UserController.php:164 #: airtime_mvc/application/controllers/UserController.php:164
msgid "Settings updated successfully!" msgid "Settings updated successfully!"
msgstr "" msgstr "Settings updated successfully!"
#: airtime_mvc/application/controllers/LocaleController.php:36 #: airtime_mvc/application/controllers/LocaleController.php:36
msgid "Recording:" msgid "Recording:"
@ -1796,7 +1796,7 @@ msgstr "You can only add tracks, smart blocks, and webstreams to playlists."
#: airtime_mvc/application/controllers/LocaleController.php:57 #: airtime_mvc/application/controllers/LocaleController.php:57
msgid "Please select a cursor position on timeline." msgid "Please select a cursor position on timeline."
msgstr "" msgstr "Please select a cursor position on timeline."
#: airtime_mvc/application/controllers/LocaleController.php:61 #: airtime_mvc/application/controllers/LocaleController.php:61
#: airtime_mvc/application/controllers/LibraryController.php:190 #: airtime_mvc/application/controllers/LibraryController.php:190
@ -1940,7 +1940,7 @@ msgstr "Playlist saved"
#: airtime_mvc/application/controllers/LocaleController.php:121 #: airtime_mvc/application/controllers/LocaleController.php:121
msgid "Playlist shuffled" msgid "Playlist shuffled"
msgstr "" msgstr "Playlist shuffled"
#: airtime_mvc/application/controllers/LocaleController.php:123 #: airtime_mvc/application/controllers/LocaleController.php:123
msgid "Airtime is unsure about the status of this file. This can happen when the file is on a remote drive that is unaccessible or the file is in a directory that isn't 'watched' anymore." msgid "Airtime is unsure about the status of this file. This can happen when the file is on a remote drive that is unaccessible or the file is in a directory that isn't 'watched' anymore."
@ -2003,12 +2003,12 @@ msgstr "Played"
#: airtime_mvc/application/controllers/LocaleController.php:160 #: airtime_mvc/application/controllers/LocaleController.php:160
#, php-format #, php-format
msgid "Copied %s row%s to the clipboard" msgid "Copied %s row%s to the clipboard"
msgstr "" msgstr "Copied %s row%s to the clipboard"
#: airtime_mvc/application/controllers/LocaleController.php:161 #: airtime_mvc/application/controllers/LocaleController.php:161
#, php-format #, php-format
msgid "%sPrint view%sPlease use your browser's print function to print this table. Press escape when finished." msgid "%sPrint view%sPlease use your browser's print function to print this table. Press escape when finished."
msgstr "" msgstr "%sPrint view%sPlease use your browser's print function to print this table. Press the Escape key when finished."
#: airtime_mvc/application/controllers/LocaleController.php:163 #: airtime_mvc/application/controllers/LocaleController.php:163
msgid "Choose Storage Folder" msgid "Choose Storage Folder"
@ -2087,7 +2087,7 @@ msgstr "If you change the username or password values for an enabled stream the
#: airtime_mvc/application/controllers/LocaleController.php:186 #: airtime_mvc/application/controllers/LocaleController.php:186
msgid "This is the admin username and password for Icecast/SHOUTcast to get listener statistics." msgid "This is the admin username and password for Icecast/SHOUTcast to get listener statistics."
msgstr "" msgstr "This is the admin username and password for Icecast/SHOUTcast to get listener statistics."
#: airtime_mvc/application/controllers/LocaleController.php:190 #: airtime_mvc/application/controllers/LocaleController.php:190
msgid "No result found" msgid "No result found"
@ -2139,7 +2139,7 @@ msgstr "60m"
#: airtime_mvc/application/controllers/LocaleController.php:207 #: airtime_mvc/application/controllers/LocaleController.php:207
msgid "Retreiving data from the server..." msgid "Retreiving data from the server..."
msgstr "Retreiving data from the server..." msgstr "Retrieving data from the server..."
#: airtime_mvc/application/controllers/LocaleController.php:213 #: airtime_mvc/application/controllers/LocaleController.php:213
msgid "This show has no scheduled content." msgid "This show has no scheduled content."
@ -2147,7 +2147,7 @@ msgstr "This show has no scheduled content."
#: airtime_mvc/application/controllers/LocaleController.php:214 #: airtime_mvc/application/controllers/LocaleController.php:214
msgid "This show is not completely filled with content." msgid "This show is not completely filled with content."
msgstr "" msgstr "This show is not completely filled with content."
#: airtime_mvc/application/controllers/LocaleController.php:218 #: airtime_mvc/application/controllers/LocaleController.php:218
msgid "January" msgid "January"
@ -2389,79 +2389,79 @@ msgstr "Open"
#: airtime_mvc/application/controllers/LocaleController.php:317 #: airtime_mvc/application/controllers/LocaleController.php:317
msgid "Guests can do the following:" msgid "Guests can do the following:"
msgstr "" msgstr "Guests can do the following:"
#: airtime_mvc/application/controllers/LocaleController.php:318 #: airtime_mvc/application/controllers/LocaleController.php:318
msgid "View schedule" msgid "View schedule"
msgstr "" msgstr "View schedule"
#: airtime_mvc/application/controllers/LocaleController.php:319 #: airtime_mvc/application/controllers/LocaleController.php:319
msgid "View show content" msgid "View show content"
msgstr "" msgstr "View show content"
#: airtime_mvc/application/controllers/LocaleController.php:320 #: airtime_mvc/application/controllers/LocaleController.php:320
msgid "DJs can do the following:" msgid "DJs can do the following:"
msgstr "" msgstr "DJs can do the following:"
#: airtime_mvc/application/controllers/LocaleController.php:321 #: airtime_mvc/application/controllers/LocaleController.php:321
msgid "Manage assigned show content" msgid "Manage assigned show content"
msgstr "" msgstr "Manage assigned show content"
#: airtime_mvc/application/controllers/LocaleController.php:322 #: airtime_mvc/application/controllers/LocaleController.php:322
msgid "Import media files" msgid "Import media files"
msgstr "" msgstr "Import media files"
#: airtime_mvc/application/controllers/LocaleController.php:323 #: airtime_mvc/application/controllers/LocaleController.php:323
msgid "Create playlists, smart blocks, and webstreams" msgid "Create playlists, smart blocks, and webstreams"
msgstr "" msgstr "Create playlists, smart blocks, and webstreams"
#: airtime_mvc/application/controllers/LocaleController.php:324 #: airtime_mvc/application/controllers/LocaleController.php:324
msgid "Manage their own library content" msgid "Manage their own library content"
msgstr "" msgstr "Manage their own library content"
#: airtime_mvc/application/controllers/LocaleController.php:325 #: airtime_mvc/application/controllers/LocaleController.php:325
msgid "Progam Managers can do the following:" msgid "Progam Managers can do the following:"
msgstr "" msgstr "Progam Managers can do the following:"
#: airtime_mvc/application/controllers/LocaleController.php:326 #: airtime_mvc/application/controllers/LocaleController.php:326
msgid "View and manage show content" msgid "View and manage show content"
msgstr "" msgstr "View and manage show content"
#: airtime_mvc/application/controllers/LocaleController.php:327 #: airtime_mvc/application/controllers/LocaleController.php:327
msgid "Schedule shows" msgid "Schedule shows"
msgstr "" msgstr "Schedule shows"
#: airtime_mvc/application/controllers/LocaleController.php:328 #: airtime_mvc/application/controllers/LocaleController.php:328
msgid "Manage all library content" msgid "Manage all library content"
msgstr "" msgstr "Manage all library content"
#: airtime_mvc/application/controllers/LocaleController.php:329 #: airtime_mvc/application/controllers/LocaleController.php:329
msgid "Admins can do the following:" msgid "Admins can do the following:"
msgstr "" msgstr "Admins can do the following:"
#: airtime_mvc/application/controllers/LocaleController.php:330 #: airtime_mvc/application/controllers/LocaleController.php:330
msgid "Manage preferences" msgid "Manage preferences"
msgstr "" msgstr "Manage preferences"
#: airtime_mvc/application/controllers/LocaleController.php:331 #: airtime_mvc/application/controllers/LocaleController.php:331
msgid "Manage users" msgid "Manage users"
msgstr "" msgstr "Manage users"
#: airtime_mvc/application/controllers/LocaleController.php:332 #: airtime_mvc/application/controllers/LocaleController.php:332
msgid "Manage watched folders" msgid "Manage watched folders"
msgstr "" msgstr "Manage watched folders"
#: airtime_mvc/application/controllers/LocaleController.php:334 #: airtime_mvc/application/controllers/LocaleController.php:334
msgid "View system status" msgid "View system status"
msgstr "" msgstr "View system status"
#: airtime_mvc/application/controllers/LocaleController.php:335 #: airtime_mvc/application/controllers/LocaleController.php:335
msgid "Access playout history" msgid "Access playout history"
msgstr "" msgstr "Access playout history"
#: airtime_mvc/application/controllers/LocaleController.php:336 #: airtime_mvc/application/controllers/LocaleController.php:336
msgid "View listener stats" msgid "View listener stats"
msgstr "" msgstr "View listener stats"
#: airtime_mvc/application/controllers/LocaleController.php:338 #: airtime_mvc/application/controllers/LocaleController.php:338
msgid "Show / hide columns" msgid "Show / hide columns"
@ -2535,99 +2535,99 @@ msgstr "Done"
#: airtime_mvc/application/controllers/LocaleController.php:361 #: airtime_mvc/application/controllers/LocaleController.php:361
msgid "Select files" msgid "Select files"
msgstr "" msgstr "Select files"
#: airtime_mvc/application/controllers/LocaleController.php:362 #: airtime_mvc/application/controllers/LocaleController.php:362
#: airtime_mvc/application/controllers/LocaleController.php:363 #: airtime_mvc/application/controllers/LocaleController.php:363
msgid "Add files to the upload queue and click the start button." msgid "Add files to the upload queue and click the start button."
msgstr "" msgstr "Add files to the upload queue and click the start button."
#: airtime_mvc/application/controllers/LocaleController.php:366 #: airtime_mvc/application/controllers/LocaleController.php:366
msgid "Add Files" msgid "Add Files"
msgstr "" msgstr "Add Files"
#: airtime_mvc/application/controllers/LocaleController.php:367 #: airtime_mvc/application/controllers/LocaleController.php:367
msgid "Stop Upload" msgid "Stop Upload"
msgstr "" msgstr "Stop Upload"
#: airtime_mvc/application/controllers/LocaleController.php:368 #: airtime_mvc/application/controllers/LocaleController.php:368
msgid "Start upload" msgid "Start upload"
msgstr "" msgstr "Start upload"
#: airtime_mvc/application/controllers/LocaleController.php:369 #: airtime_mvc/application/controllers/LocaleController.php:369
msgid "Add files" msgid "Add files"
msgstr "" msgstr "Add files"
#: airtime_mvc/application/controllers/LocaleController.php:370 #: airtime_mvc/application/controllers/LocaleController.php:370
#, php-format #, php-format
msgid "Uploaded %d/%d files" msgid "Uploaded %d/%d files"
msgstr "" msgstr "Uploaded %d/%d files"
#: airtime_mvc/application/controllers/LocaleController.php:371 #: airtime_mvc/application/controllers/LocaleController.php:371
msgid "N/A" msgid "N/A"
msgstr "" msgstr "N/A"
#: airtime_mvc/application/controllers/LocaleController.php:372 #: airtime_mvc/application/controllers/LocaleController.php:372
msgid "Drag files here." msgid "Drag files here."
msgstr "" msgstr "Drag files here."
#: airtime_mvc/application/controllers/LocaleController.php:373 #: airtime_mvc/application/controllers/LocaleController.php:373
msgid "File extension error." msgid "File extension error."
msgstr "" msgstr "File extension error."
#: airtime_mvc/application/controllers/LocaleController.php:374 #: airtime_mvc/application/controllers/LocaleController.php:374
msgid "File size error." msgid "File size error."
msgstr "" msgstr "File size error."
#: airtime_mvc/application/controllers/LocaleController.php:375 #: airtime_mvc/application/controllers/LocaleController.php:375
msgid "File count error." msgid "File count error."
msgstr "" msgstr "File count error."
#: airtime_mvc/application/controllers/LocaleController.php:376 #: airtime_mvc/application/controllers/LocaleController.php:376
msgid "Init error." msgid "Init error."
msgstr "" msgstr "Init error."
#: airtime_mvc/application/controllers/LocaleController.php:377 #: airtime_mvc/application/controllers/LocaleController.php:377
msgid "HTTP Error." msgid "HTTP Error."
msgstr "" msgstr "HTTP Error."
#: airtime_mvc/application/controllers/LocaleController.php:378 #: airtime_mvc/application/controllers/LocaleController.php:378
msgid "Security error." msgid "Security error."
msgstr "" msgstr "Security error."
#: airtime_mvc/application/controllers/LocaleController.php:379 #: airtime_mvc/application/controllers/LocaleController.php:379
msgid "Generic error." msgid "Generic error."
msgstr "" msgstr "Generic error."
#: airtime_mvc/application/controllers/LocaleController.php:380 #: airtime_mvc/application/controllers/LocaleController.php:380
msgid "IO error." msgid "IO error."
msgstr "" msgstr "IO error."
#: airtime_mvc/application/controllers/LocaleController.php:381 #: airtime_mvc/application/controllers/LocaleController.php:381
#, php-format #, php-format
msgid "File: %s" msgid "File: %s"
msgstr "" msgstr "File: %s"
#: airtime_mvc/application/controllers/LocaleController.php:383 #: airtime_mvc/application/controllers/LocaleController.php:383
#, php-format #, php-format
msgid "%d files queued" msgid "%d files queued"
msgstr "" msgstr "%d files queued"
#: airtime_mvc/application/controllers/LocaleController.php:384 #: airtime_mvc/application/controllers/LocaleController.php:384
msgid "File: %f, size: %s, max file size: %m" msgid "File: %f, size: %s, max file size: %m"
msgstr "" msgstr "File: %f, size: %s, max file size: %m"
#: airtime_mvc/application/controllers/LocaleController.php:385 #: airtime_mvc/application/controllers/LocaleController.php:385
msgid "Upload URL might be wrong or doesn't exist" msgid "Upload URL might be wrong or doesn't exist"
msgstr "" msgstr "Upload URL might be wrong or doesn't exist"
#: airtime_mvc/application/controllers/LocaleController.php:386 #: airtime_mvc/application/controllers/LocaleController.php:386
msgid "Error: File too large: " msgid "Error: File too large: "
msgstr "" msgstr "Error: File too large: "
#: airtime_mvc/application/controllers/LocaleController.php:387 #: airtime_mvc/application/controllers/LocaleController.php:387
msgid "Error: Invalid file extension: " msgid "Error: Invalid file extension: "
msgstr "" msgstr "Error: Invalid file extension: "
#: airtime_mvc/application/controllers/ShowbuilderController.php:190 #: airtime_mvc/application/controllers/ShowbuilderController.php:190
#: airtime_mvc/application/controllers/LibraryController.php:161 #: airtime_mvc/application/controllers/LibraryController.php:161
@ -2660,7 +2660,7 @@ msgstr "show does not exist"
#: airtime_mvc/application/controllers/ListenerstatController.php:56 #: airtime_mvc/application/controllers/ListenerstatController.php:56
msgid "Please make sure admin user/password is correct on System->Streams page." msgid "Please make sure admin user/password is correct on System->Streams page."
msgstr "" msgstr "Please make sure admin user/password is correct on System->Streams page."
#: airtime_mvc/application/controllers/ApiController.php:57 #: airtime_mvc/application/controllers/ApiController.php:57
#: airtime_mvc/application/controllers/ApiController.php:84 #: airtime_mvc/application/controllers/ApiController.php:84
@ -2720,7 +2720,7 @@ msgstr "Download"
#: airtime_mvc/application/controllers/LibraryController.php:198 #: airtime_mvc/application/controllers/LibraryController.php:198
msgid "Duplicate Playlist" msgid "Duplicate Playlist"
msgstr "" msgstr "Duplicate Playlist"
#: airtime_mvc/application/controllers/LibraryController.php:213 #: airtime_mvc/application/controllers/LibraryController.php:213
#: airtime_mvc/application/controllers/LibraryController.php:235 #: airtime_mvc/application/controllers/LibraryController.php:235
@ -2761,7 +2761,7 @@ msgstr "Could not delete some scheduled files."
#: airtime_mvc/application/controllers/LibraryController.php:375 #: airtime_mvc/application/controllers/LibraryController.php:375
#, php-format #, php-format
msgid "Copy of %s" msgid "Copy of %s"
msgstr "" msgstr "Copy of %s"
#: airtime_mvc/application/controllers/PlaylistController.php:45 #: airtime_mvc/application/controllers/PlaylistController.php:45
#, php-format #, php-format
@ -2929,7 +2929,7 @@ msgstr "%sSourcefabric%s o.p.s. Airtime is distributed under the %sGNU GPL v.3%s
#: airtime_mvc/application/views/scripts/dashboard/stream-player.phtml:3 #: airtime_mvc/application/views/scripts/dashboard/stream-player.phtml:3
msgid "Share" msgid "Share"
msgstr "" msgstr "Share"
#: airtime_mvc/application/views/scripts/dashboard/stream-player.phtml:64 #: airtime_mvc/application/views/scripts/dashboard/stream-player.phtml:64
msgid "Select stream:" msgid "Select stream:"
@ -3375,7 +3375,7 @@ msgstr "Show Source Connection URL:"
#: airtime_mvc/application/views/scripts/form/edit-user.phtml:1 #: airtime_mvc/application/views/scripts/form/edit-user.phtml:1
#, php-format #, php-format
msgid "%s's Settings" msgid "%s's Settings"
msgstr "" msgstr "%s's Settings"
#: airtime_mvc/application/views/scripts/form/add-show-rebroadcast.phtml:4 #: airtime_mvc/application/views/scripts/form/add-show-rebroadcast.phtml:4
msgid "Repeat Days:" msgid "Repeat Days:"
@ -3452,7 +3452,7 @@ msgstr "Global Settings"
#: airtime_mvc/application/views/scripts/preference/stream-setting.phtml:88 #: airtime_mvc/application/views/scripts/preference/stream-setting.phtml:88
msgid "dB" msgid "dB"
msgstr "" msgstr "dB"
#: airtime_mvc/application/views/scripts/preference/stream-setting.phtml:107 #: airtime_mvc/application/views/scripts/preference/stream-setting.phtml:107
msgid "Output Stream Settings" msgid "Output Stream Settings"
@ -3475,7 +3475,7 @@ msgstr "Isrc Number:"
#: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:21 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:21
msgid "File Path:" msgid "File Path:"
msgstr "" msgstr "File Path:"
#: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:39 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:39
msgid "Web Stream" msgid "Web Stream"
@ -3511,7 +3511,7 @@ msgstr "Limit to "
#: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:512 #: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:512
msgid "Please selection an option" msgid "Please selection an option"
msgstr "Please selection an option" msgstr "Please select an option"
#: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:531 #: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:531
msgid "No Records" msgid "No Records"
@ -3519,9 +3519,8 @@ msgstr "No Records"
#~ msgid "Timezone" #~ msgid "Timezone"
#~ msgstr "Timezone" #~ msgstr "Timezone"
#~ msgid "File" #~ msgid "File"
#~ msgstr "File" #~ msgstr "File"
#~ msgid "Path:" #~ msgid "Path:"
#~ msgstr "Path:" #~ msgstr "Path:"

View File

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Airtime 2.3\n" "Project-Id-Version: Airtime 2.3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-01-15 10:36-0500\n" "POT-Creation-Date: 2013-01-15 10:36-0500\n"
"PO-Revision-Date: 2013-01-04 17:48+0100\n" "PO-Revision-Date: 2013-02-08 11:10+0100\n"
"Last-Translator: Daniel James <daniel.james@sourcefabric.org>\n" "Last-Translator: Daniel James <daniel.james@sourcefabric.org>\n"
"Language-Team: United States Localization <contact@sourcefabric.org>\n" "Language-Team: United States Localization <contact@sourcefabric.org>\n"
"Language: en_US\n" "Language: en_US\n"
@ -2139,7 +2139,7 @@ msgstr "60m"
#: airtime_mvc/application/controllers/LocaleController.php:207 #: airtime_mvc/application/controllers/LocaleController.php:207
msgid "Retreiving data from the server..." msgid "Retreiving data from the server..."
msgstr "Retreiving data from the server..." msgstr "Retrieving data from the server..."
#: airtime_mvc/application/controllers/LocaleController.php:213 #: airtime_mvc/application/controllers/LocaleController.php:213
msgid "This show has no scheduled content." msgid "This show has no scheduled content."
@ -3511,7 +3511,7 @@ msgstr "Limit to "
#: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:512 #: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:512
msgid "Please selection an option" msgid "Please selection an option"
msgstr "Please selection an option" msgstr "Please select an option"
#: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:531 #: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:531
msgid "No Records" msgid "No Records"
@ -3519,9 +3519,8 @@ msgstr "No Records"
#~ msgid "Timezone" #~ msgid "Timezone"
#~ msgstr "Timezone" #~ msgstr "Timezone"
#~ msgid "File" #~ msgid "File"
#~ msgstr "File" #~ msgstr "File"
#~ msgid "Path:" #~ msgid "Path:"
#~ msgstr "Path:" #~ msgstr "Path:"

View File

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Airtime 2.3\n" "Project-Id-Version: Airtime 2.3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-01-15 10:36-0500\n" "POT-Creation-Date: 2013-01-15 10:36-0500\n"
"PO-Revision-Date: 2013-01-15 17:03-0500\n" "PO-Revision-Date: 2013-02-05 11:14-0500\n"
"Last-Translator: Denise Rigato <denise.rigato@sourcefabric.org>\n" "Last-Translator: Denise Rigato <denise.rigato@sourcefabric.org>\n"
"Language-Team: French Localization <contact@sourcefabric.org>\n" "Language-Team: French Localization <contact@sourcefabric.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -1124,7 +1124,7 @@ msgstr "Nom de la Station - Nom de l'Emission"
#: airtime_mvc/application/forms/StreamSetting.php:63 #: airtime_mvc/application/forms/StreamSetting.php:63
msgid "Off Air Metadata" msgid "Off Air Metadata"
msgstr "Métadonnées Hors Entenne" msgstr "Métadonnées Hors Antenne"
#: airtime_mvc/application/forms/StreamSetting.php:69 #: airtime_mvc/application/forms/StreamSetting.php:69
msgid "Enable Replay Gain" msgid "Enable Replay Gain"
@ -1745,7 +1745,7 @@ msgstr "Emission en Cours:"
#: airtime_mvc/application/controllers/LocaleController.php:41 #: airtime_mvc/application/controllers/LocaleController.php:41
msgid "Current" msgid "Current"
msgstr "Courant" msgstr "En ce moment"
#: airtime_mvc/application/controllers/LocaleController.php:43 #: airtime_mvc/application/controllers/LocaleController.php:43
msgid "You are running the latest version" msgid "You are running the latest version"

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Airtime 2.3\n" "Project-Id-Version: Airtime 2.3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-01-15 10:36-0500\n" "POT-Creation-Date: 2013-01-15 10:36-0500\n"
"PO-Revision-Date: 2013-01-21 11:14+0100\n" "PO-Revision-Date: 2013-02-07 10:20+0100\n"
"Last-Translator: Daniel James <daniel.james@sourcefabric.org>\n" "Last-Translator: Daniel James <daniel.james@sourcefabric.org>\n"
"Language-Team: Brazilian Localization <contact@sourcefabric.org>\n" "Language-Team: Brazilian Localization <contact@sourcefabric.org>\n"
"Language: pt-BR\n" "Language: pt-BR\n"
@ -69,11 +69,11 @@ msgstr "Estado"
#: airtime_mvc/application/configs/navigation.php:83 #: airtime_mvc/application/configs/navigation.php:83
msgid "Playout History" msgid "Playout History"
msgstr "Registro" msgstr "Histórico da Programação"
#: airtime_mvc/application/configs/navigation.php:90 #: airtime_mvc/application/configs/navigation.php:90
msgid "Listener Stats" msgid "Listener Stats"
msgstr "Estado de Ouvintes" msgstr "Estatísticas de Ouvintes"
#: airtime_mvc/application/configs/navigation.php:99 #: airtime_mvc/application/configs/navigation.php:99
#: airtime_mvc/application/views/scripts/error/error.phtml:13 #: airtime_mvc/application/views/scripts/error/error.phtml:13
@ -123,7 +123,7 @@ msgstr "Prévia da playlist"
#: airtime_mvc/application/models/StoredFile.php:815 #: airtime_mvc/application/models/StoredFile.php:815
msgid "Webstream preview" msgid "Webstream preview"
msgstr "Prévia do fluxo" msgstr "Prévia do fluxo web"
#: airtime_mvc/application/models/StoredFile.php:817 #: airtime_mvc/application/models/StoredFile.php:817
msgid "Smart Block" msgid "Smart Block"
@ -189,7 +189,7 @@ msgstr "%s não existe na lista de diretórios monitorados."
#: airtime_mvc/application/models/Playlist.php:723 #: airtime_mvc/application/models/Playlist.php:723
#: airtime_mvc/application/models/Block.php:760 #: airtime_mvc/application/models/Block.php:760
msgid "Cue in and cue out are null." msgid "Cue in and cue out are null."
msgstr "Cue dentro e fora sugestão são nulos." msgstr "Cue de entrada e saída são nulos."
#: airtime_mvc/application/models/Playlist.php:753 #: airtime_mvc/application/models/Playlist.php:753
#: airtime_mvc/application/models/Playlist.php:776 #: airtime_mvc/application/models/Playlist.php:776
@ -265,7 +265,7 @@ msgstr "Não foi possível analisar a lista M3U"
#: airtime_mvc/application/models/Webstream.php:314 #: airtime_mvc/application/models/Webstream.php:314
msgid "Invalid webstream - This appears to be a file download." msgid "Invalid webstream - This appears to be a file download."
msgstr "Fluxo inválido. Este parece tratar-se de download de arquivo." msgstr "Fluxo web inválido. A URL parece tratar-se de download de arquivo."
#: airtime_mvc/application/models/Webstream.php:318 #: airtime_mvc/application/models/Webstream.php:318
#, php-format #, php-format
@ -274,7 +274,7 @@ msgstr "Tipo de fluxo não reconhecido: %s"
#: 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 "Não é possível arrastar e soltar programas repetitivos" msgstr "Não é possível arrastar e soltar programas repetidos"
#: airtime_mvc/application/models/ShowInstance.php:253 #: airtime_mvc/application/models/ShowInstance.php:253
msgid "Can't move a past show" msgid "Can't move a past show"
@ -303,7 +303,7 @@ msgstr "O programa foi excluído porque a gravação prévia não existe!"
#: airtime_mvc/application/models/ShowInstance.php:310 #: airtime_mvc/application/models/ShowInstance.php:310
msgid "Must wait 1 hour to rebroadcast." msgid "Must wait 1 hour to rebroadcast."
msgstr "É necessário aguardar 1 hora para retransmitir." msgstr "É necessário aguardar 1 hora antes de retransmitir."
#: airtime_mvc/application/models/ShowInstance.php:342 #: airtime_mvc/application/models/ShowInstance.php:342
msgid "can't resize a past show" msgid "can't resize a past show"
@ -344,7 +344,7 @@ msgstr "A programação que você está vendo está desatualizada!"
#: airtime_mvc/application/models/Scheduler.php:105 #: airtime_mvc/application/models/Scheduler.php:105
#, php-format #, php-format
msgid "You are not allowed to schedule show %s." msgid "You are not allowed to schedule show %s."
msgstr "Você não tem permissão para agendar o programa %s." msgstr "Você não tem permissão para agendar programa %s."
#: airtime_mvc/application/models/Scheduler.php:109 #: airtime_mvc/application/models/Scheduler.php:109
msgid "You cannot add files to recording shows." msgid "You cannot add files to recording shows."
@ -363,7 +363,7 @@ msgstr "O programa %s foi previamente atualizado!"
#: airtime_mvc/application/models/Scheduler.php:141 #: airtime_mvc/application/models/Scheduler.php:141
#: airtime_mvc/application/models/Scheduler.php:223 #: airtime_mvc/application/models/Scheduler.php:223
msgid "A selected File does not exist!" msgid "A selected File does not exist!"
msgstr "Um arquivo selecionado não existe!" msgstr "Um dos arquivos selecionados não existe!"
#: airtime_mvc/application/models/ShowBuilder.php:198 #: airtime_mvc/application/models/ShowBuilder.php:198
#, php-format #, php-format
@ -385,7 +385,7 @@ msgstr "Álbum"
#: airtime_mvc/application/models/Block.php:1211 #: airtime_mvc/application/models/Block.php:1211
#: airtime_mvc/application/forms/SmartBlockCriteria.php:43 #: airtime_mvc/application/forms/SmartBlockCriteria.php:43
msgid "Bit Rate (Kbps)" msgid "Bit Rate (Kbps)"
msgstr "Bitrate (Kpbs)" msgstr "Bitrate (Kbps)"
#: airtime_mvc/application/models/Block.php:1212 #: airtime_mvc/application/models/Block.php:1212
#: airtime_mvc/application/forms/SmartBlockCriteria.php:44 #: airtime_mvc/application/forms/SmartBlockCriteria.php:44
@ -404,7 +404,7 @@ msgstr "Compositor"
#: airtime_mvc/application/forms/SmartBlockCriteria.php:46 #: airtime_mvc/application/forms/SmartBlockCriteria.php:46
#: airtime_mvc/application/controllers/LocaleController.php:74 #: airtime_mvc/application/controllers/LocaleController.php:74
msgid "Conductor" msgid "Conductor"
msgstr "Condutor" msgstr "Maestro"
#: airtime_mvc/application/models/Block.php:1215 #: airtime_mvc/application/models/Block.php:1215
#: airtime_mvc/application/forms/SmartBlockCriteria.php:47 #: airtime_mvc/application/forms/SmartBlockCriteria.php:47
@ -551,11 +551,11 @@ msgstr "%s:%s:%s não é um horário válido"
#: airtime_mvc/application/forms/EmailServerPreferences.php:17 #: airtime_mvc/application/forms/EmailServerPreferences.php:17
msgid "Enable System Emails (Password Reset)" msgid "Enable System Emails (Password Reset)"
msgstr "Ativar Emails do Sistema (Recuperação de Senha)" msgstr "Ativar Envio de Emails (Recuperação de Senha)"
#: airtime_mvc/application/forms/EmailServerPreferences.php:27 #: airtime_mvc/application/forms/EmailServerPreferences.php:27
msgid "Reset Password 'From' Email" msgid "Reset Password 'From' Email"
msgstr "Remetente do Email de Recuperação de Senha" msgstr "Remetente de Email para Recuperação de Senha"
#: airtime_mvc/application/forms/EmailServerPreferences.php:34 #: airtime_mvc/application/forms/EmailServerPreferences.php:34
msgid "Configure Mail Server" msgid "Configure Mail Server"
@ -693,7 +693,7 @@ msgstr "Data de Fim:"
#: airtime_mvc/application/forms/helpers/ValidationTypes.php:8 #: airtime_mvc/application/forms/helpers/ValidationTypes.php:8
#: airtime_mvc/application/forms/customvalidators/ConditionalNotEmpty.php:26 #: airtime_mvc/application/forms/customvalidators/ConditionalNotEmpty.php:26
msgid "Value is required and can't be empty" msgid "Value is required and can't be empty"
msgstr "Valor é obrigatório e não poder estar vazio." msgstr "Valor é obrigatório e não poder estar em branco."
#: airtime_mvc/application/forms/helpers/ValidationTypes.php:19 #: airtime_mvc/application/forms/helpers/ValidationTypes.php:19
msgid "'%value%' is no valid email address in the basic format local-part@hostname" msgid "'%value%' is no valid email address in the basic format local-part@hostname"
@ -727,21 +727,21 @@ msgstr "dias"
#: airtime_mvc/application/forms/AddShowRebroadcastDates.php:63 #: airtime_mvc/application/forms/AddShowRebroadcastDates.php:63
#: airtime_mvc/application/forms/AddShowAbsoluteRebroadcastDates.php:58 #: airtime_mvc/application/forms/AddShowAbsoluteRebroadcastDates.php:58
msgid "Day must be specified" msgid "Day must be specified"
msgstr "Dia precisa ser informado" msgstr "O dia precisa ser especificado"
#: airtime_mvc/application/forms/AddShowRebroadcastDates.php:68 #: airtime_mvc/application/forms/AddShowRebroadcastDates.php:68
#: airtime_mvc/application/forms/AddShowAbsoluteRebroadcastDates.php:63 #: airtime_mvc/application/forms/AddShowAbsoluteRebroadcastDates.php:63
msgid "Time must be specified" msgid "Time must be specified"
msgstr "Horário deve ser informado" msgstr "O horário deve ser especificado"
#: airtime_mvc/application/forms/AddShowRebroadcastDates.php:95 #: airtime_mvc/application/forms/AddShowRebroadcastDates.php:95
#: airtime_mvc/application/forms/AddShowAbsoluteRebroadcastDates.php:86 #: airtime_mvc/application/forms/AddShowAbsoluteRebroadcastDates.php:86
msgid "Must wait at least 1 hour to rebroadcast" msgid "Must wait at least 1 hour to rebroadcast"
msgstr "É preciso aguardar uma hora para retransmissão" msgstr "É preciso aguardar uma hora para retransmitir"
#: airtime_mvc/application/forms/AddShowRR.php:10 #: airtime_mvc/application/forms/AddShowRR.php:10
msgid "Record from Line In?" msgid "Record from Line In?"
msgstr "Gravar a partir de Line In?" msgstr "Gravar a partir do Line In?"
#: airtime_mvc/application/forms/AddShowRR.php:16 #: airtime_mvc/application/forms/AddShowRR.php:16
msgid "Rebroadcast?" msgid "Rebroadcast?"
@ -875,7 +875,7 @@ msgstr "Jabber:"
#: airtime_mvc/application/forms/AddUser.php:88 #: airtime_mvc/application/forms/AddUser.php:88
msgid "User Type:" msgid "User Type:"
msgstr "Tipo de Usuário:" msgstr "Perfil do Usuário:"
#: airtime_mvc/application/forms/AddUser.php:92 #: airtime_mvc/application/forms/AddUser.php:92
#: airtime_mvc/application/controllers/LocaleController.php:316 #: airtime_mvc/application/controllers/LocaleController.php:316
@ -908,7 +908,7 @@ msgstr "Administrador"
#: airtime_mvc/application/views/scripts/preference/index.phtml:6 #: airtime_mvc/application/views/scripts/preference/index.phtml:6
#: airtime_mvc/application/views/scripts/preference/index.phtml:14 #: airtime_mvc/application/views/scripts/preference/index.phtml:14
msgid "Save" msgid "Save"
msgstr "Gravar" msgstr "Salvar"
#: airtime_mvc/application/forms/AddUser.php:113 #: airtime_mvc/application/forms/AddUser.php:113
#: airtime_mvc/application/forms/EditUser.php:132 #: airtime_mvc/application/forms/EditUser.php:132
@ -996,11 +996,11 @@ msgstr "Porta não pode estar em branco."
#: airtime_mvc/application/forms/StreamSettingSubForm.php:243 #: airtime_mvc/application/forms/StreamSettingSubForm.php:243
msgid "Mount cannot be empty with Icecast server." msgid "Mount cannot be empty with Icecast server."
msgstr "Montagem não pode estar em branco com servidor Icecast." msgstr "Ponto de montagem deve ser informada em servidor Icecast."
#: airtime_mvc/application/forms/AddShowRepeats.php:11 #: airtime_mvc/application/forms/AddShowRepeats.php:11
msgid "Repeat Type:" msgid "Repeat Type:"
msgstr "Tipo de Repetição:" msgstr "Tipo de Reexibição:"
#: airtime_mvc/application/forms/AddShowRepeats.php:14 #: airtime_mvc/application/forms/AddShowRepeats.php:14
msgid "weekly" msgid "weekly"
@ -1055,11 +1055,11 @@ msgstr "Sab"
#: airtime_mvc/application/forms/AddShowRepeats.php:53 #: airtime_mvc/application/forms/AddShowRepeats.php:53
msgid "No End?" msgid "No End?"
msgstr "Não tem fim?" msgstr "Sem fim?"
#: airtime_mvc/application/forms/AddShowRepeats.php:79 #: airtime_mvc/application/forms/AddShowRepeats.php:79
msgid "End date must be after start date" msgid "End date must be after start date"
msgstr "Data de fim precisa ser após de data de início" msgstr "A data de fim deve ser posterior à data de início"
#: airtime_mvc/application/forms/AddShowWhat.php:26 #: airtime_mvc/application/forms/AddShowWhat.php:26
#: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:27 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:27
@ -1168,7 +1168,7 @@ msgstr "Duração:"
#: airtime_mvc/application/forms/AddShowWhen.php:83 #: airtime_mvc/application/forms/AddShowWhen.php:83
msgid "Repeats?" msgid "Repeats?"
msgstr "Repetir?" msgstr "Reexibir?"
#: airtime_mvc/application/forms/AddShowWhen.php:103 #: airtime_mvc/application/forms/AddShowWhen.php:103
msgid "Cannot create show in the past" msgid "Cannot create show in the past"
@ -1176,7 +1176,7 @@ msgstr "Não é possível criar um programa no passado."
#: airtime_mvc/application/forms/AddShowWhen.php:111 #: airtime_mvc/application/forms/AddShowWhen.php:111
msgid "Cannot modify start date/time of the show that is already started" msgid "Cannot modify start date/time of the show that is already started"
msgstr "Não é possível alterar o início de um programa já em execução" msgstr "Não é possível alterar o início de um programa que está em execução"
#: airtime_mvc/application/forms/AddShowWhen.php:130 #: airtime_mvc/application/forms/AddShowWhen.php:130
msgid "Cannot have duration 00h 00m" msgid "Cannot have duration 00h 00m"
@ -1326,7 +1326,7 @@ msgstr "é menor que"
#: airtime_mvc/application/forms/SmartBlockCriteria.php:99 #: airtime_mvc/application/forms/SmartBlockCriteria.php:99
#: airtime_mvc/application/controllers/LocaleController.php:151 #: airtime_mvc/application/controllers/LocaleController.php:151
msgid "is in the range" msgid "is in the range"
msgstr "está compreendido" msgstr "está no intervalo"
#: airtime_mvc/application/forms/SmartBlockCriteria.php:109 #: airtime_mvc/application/forms/SmartBlockCriteria.php:109
msgid "hours" msgid "hours"
@ -1342,7 +1342,7 @@ msgstr "itens"
#: airtime_mvc/application/forms/SmartBlockCriteria.php:133 #: airtime_mvc/application/forms/SmartBlockCriteria.php:133
msgid "Set smart block type:" msgid "Set smart block type:"
msgstr "Definir tipo de bloco inteligente:" msgstr "Definir tipo de bloco:"
#: airtime_mvc/application/forms/SmartBlockCriteria.php:136 #: airtime_mvc/application/forms/SmartBlockCriteria.php:136
#: airtime_mvc/application/controllers/LibraryController.php:501 #: airtime_mvc/application/controllers/LibraryController.php:501
@ -1364,7 +1364,7 @@ msgstr "Limitar em"
#: airtime_mvc/application/forms/SmartBlockCriteria.php:287 #: airtime_mvc/application/forms/SmartBlockCriteria.php:287
msgid "Generate playlist content and save criteria" msgid "Generate playlist content and save criteria"
msgstr "Gerar conteúdo da lista de reprodução e salvar critério" msgstr "Gerar conteúdo da lista e salvar critério"
#: airtime_mvc/application/forms/SmartBlockCriteria.php:289 #: airtime_mvc/application/forms/SmartBlockCriteria.php:289
msgid "Generate" msgid "Generate"
@ -1372,7 +1372,7 @@ msgstr "Gerar"
#: airtime_mvc/application/forms/SmartBlockCriteria.php:295 #: airtime_mvc/application/forms/SmartBlockCriteria.php:295
msgid "Shuffle playlist content" msgid "Shuffle playlist content"
msgstr "Embaralhar conteúdo da lista de reprodução" msgstr "Embaralhar conteúdo da lista"
#: airtime_mvc/application/forms/SmartBlockCriteria.php:297 #: airtime_mvc/application/forms/SmartBlockCriteria.php:297
#: airtime_mvc/application/views/scripts/playlist/playlist.phtml:20 #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:20
@ -1394,7 +1394,7 @@ msgstr "O valor deve ser um número inteiro"
#: airtime_mvc/application/forms/SmartBlockCriteria.php:479 #: airtime_mvc/application/forms/SmartBlockCriteria.php:479
msgid "500 is the max item limit value you can set" msgid "500 is the max item limit value you can set"
msgstr "500 é o número máximo de itens que você pode definir" msgstr "O número máximo de itens é 500"
#: airtime_mvc/application/forms/SmartBlockCriteria.php:490 #: airtime_mvc/application/forms/SmartBlockCriteria.php:490
msgid "You must select Criteria and Modifier" msgid "You must select Criteria and Modifier"
@ -1402,7 +1402,7 @@ msgstr "Você precisa selecionar Critério e Modificador "
#: airtime_mvc/application/forms/SmartBlockCriteria.php:497 #: airtime_mvc/application/forms/SmartBlockCriteria.php:497
msgid "'Length' should be in '00:00:00' format" msgid "'Length' should be in '00:00:00' format"
msgstr "A duração precisa ser informada no formato '00:00:00'" msgstr "A duração deve ser informada no formato '00:00:00'"
#: airtime_mvc/application/forms/SmartBlockCriteria.php:502 #: airtime_mvc/application/forms/SmartBlockCriteria.php:502
#: airtime_mvc/application/forms/SmartBlockCriteria.php:515 #: airtime_mvc/application/forms/SmartBlockCriteria.php:515
@ -1432,7 +1432,7 @@ msgstr "Programa:"
#: airtime_mvc/application/forms/ShowBuilder.php:80 #: airtime_mvc/application/forms/ShowBuilder.php:80
msgid "All My Shows:" msgid "All My Shows:"
msgstr "Todos os Meus Programas:" msgstr "Meus Programas:"
#: airtime_mvc/application/forms/EditUser.php:118 #: airtime_mvc/application/forms/EditUser.php:118
msgid "Timezone:" msgid "Timezone:"
@ -1448,19 +1448,19 @@ msgstr "Usar Autenticação Personalizada:"
#: airtime_mvc/application/forms/AddShowLiveStream.php:26 #: airtime_mvc/application/forms/AddShowLiveStream.php:26
msgid "Custom Username" msgid "Custom Username"
msgstr "Usuário Personalizado:" msgstr "Definir Usuário:"
#: airtime_mvc/application/forms/AddShowLiveStream.php:39 #: airtime_mvc/application/forms/AddShowLiveStream.php:39
msgid "Custom Password" msgid "Custom Password"
msgstr "Senha Personalizada:" msgstr "Definir Senha:"
#: airtime_mvc/application/forms/AddShowLiveStream.php:63 #: airtime_mvc/application/forms/AddShowLiveStream.php:63
msgid "Username field cannot be empty." msgid "Username field cannot be empty."
msgstr "O Usuário não pode estar em branco." msgstr "O usuário não pode estar em branco."
#: airtime_mvc/application/forms/AddShowLiveStream.php:68 #: airtime_mvc/application/forms/AddShowLiveStream.php:68
msgid "Password field cannot be empty." msgid "Password field cannot be empty."
msgstr "A Senha não pode estar em branco." msgstr "A senha não pode estar em branco."
#: airtime_mvc/application/forms/GeneralPreferences.php:34 #: airtime_mvc/application/forms/GeneralPreferences.php:34
msgid "Default Fade (s):" msgid "Default Fade (s):"
@ -1473,7 +1473,7 @@ msgstr "informe o tempo em segundos 0{.0}"
#: airtime_mvc/application/forms/GeneralPreferences.php:48 #: airtime_mvc/application/forms/GeneralPreferences.php:48
#, php-format #, php-format
msgid "Allow Remote Websites To Access \"Schedule\" Info?%s (Enable this to make front-end widgets work.)" msgid "Allow Remote Websites To Access \"Schedule\" Info?%s (Enable this to make front-end widgets work.)"
msgstr "Permitir que sites remotos acessem as informações \"Schedule \"%s? (Habilite para fazer com que widgets funcionem.)" msgstr "Permitir que sites remotos acessem as informações sobre \"Programação\"?%s (Habilite para fazer com que widgets externos funcionem.)"
#: airtime_mvc/application/forms/GeneralPreferences.php:49 #: airtime_mvc/application/forms/GeneralPreferences.php:49
msgid "Disabled" msgid "Disabled"
@ -1532,15 +1532,15 @@ msgstr "Sábado"
#: airtime_mvc/application/forms/SoundcloudPreferences.php:16 #: airtime_mvc/application/forms/SoundcloudPreferences.php:16
msgid "Automatically Upload Recorded Shows" msgid "Automatically Upload Recorded Shows"
msgstr "Programas Gravador Adicionados Automaticamente" msgstr "Enviar programas gravados automaticamente"
#: airtime_mvc/application/forms/SoundcloudPreferences.php:26 #: airtime_mvc/application/forms/SoundcloudPreferences.php:26
msgid "Enable SoundCloud Upload" msgid "Enable SoundCloud Upload"
msgstr "Habilitar Envio para SoundCloud" msgstr "Habilitar envio para SoundCloud"
#: airtime_mvc/application/forms/SoundcloudPreferences.php:36 #: airtime_mvc/application/forms/SoundcloudPreferences.php:36
msgid "Automatically Mark Files \"Downloadable\" on SoundCloud" msgid "Automatically Mark Files \"Downloadable\" on SoundCloud"
msgstr "Definir Arquivos como \"Downloadable\" no SoundCloud" msgstr "Permitir download dos arquivos no SoundCloud"
#: airtime_mvc/application/forms/SoundcloudPreferences.php:47 #: airtime_mvc/application/forms/SoundcloudPreferences.php:47
msgid "SoundCloud Email" msgid "SoundCloud Email"
@ -1711,7 +1711,7 @@ msgstr "Erro na aplicação"
#: airtime_mvc/application/controllers/UserController.php:55 #: airtime_mvc/application/controllers/UserController.php:55
#: airtime_mvc/application/controllers/UserController.php:137 #: airtime_mvc/application/controllers/UserController.php:137
msgid "Specific action is not allowed in demo version!" msgid "Specific action is not allowed in demo version!"
msgstr "Ação específica não permitida na versão de demonstração!" msgstr "Esta ação não é permitida na versão de demonstração!"
#: airtime_mvc/application/controllers/UserController.php:87 #: airtime_mvc/application/controllers/UserController.php:87
msgid "User added successfully!" msgid "User added successfully!"
@ -1747,11 +1747,11 @@ msgstr "Programa em Exibição:"
#: airtime_mvc/application/controllers/LocaleController.php:41 #: airtime_mvc/application/controllers/LocaleController.php:41
msgid "Current" msgid "Current"
msgstr "Em Exibição" msgstr "Agora"
#: airtime_mvc/application/controllers/LocaleController.php:43 #: airtime_mvc/application/controllers/LocaleController.php:43
msgid "You are running the latest version" msgid "You are running the latest version"
msgstr "Você está executando a última versão" msgstr "Você está executando a versão mais recente"
#: airtime_mvc/application/controllers/LocaleController.php:44 #: airtime_mvc/application/controllers/LocaleController.php:44
msgid "New version available: " msgid "New version available: "
@ -1775,7 +1775,7 @@ msgstr "Adicionar a esta lista de reprodução"
#: airtime_mvc/application/controllers/LocaleController.php:50 #: airtime_mvc/application/controllers/LocaleController.php:50
msgid "Add to current smart block" msgid "Add to current smart block"
msgstr "Adiconar a este bloco inteligente" msgstr "Adiconar a este bloco"
#: airtime_mvc/application/controllers/LocaleController.php:51 #: airtime_mvc/application/controllers/LocaleController.php:51
msgid "Adding 1 Item" msgid "Adding 1 Item"
@ -1793,11 +1793,11 @@ msgstr "Você pode adicionar somente faixas a um bloco inteligente."
#: airtime_mvc/application/controllers/LocaleController.php:54 #: airtime_mvc/application/controllers/LocaleController.php:54
#: airtime_mvc/application/controllers/PlaylistController.php:160 #: airtime_mvc/application/controllers/PlaylistController.php:160
msgid "You can only add tracks, smart blocks, and webstreams to playlists." msgid "You can only add tracks, smart blocks, and webstreams to playlists."
msgstr "Você pode adicionar somente faixas, blocos inteligentes e fluxos às listas de reprodução" msgstr "Você pode adicionar apenas faixas, blocos e fluxos às listas de reprodução"
#: airtime_mvc/application/controllers/LocaleController.php:57 #: airtime_mvc/application/controllers/LocaleController.php:57
msgid "Please select a cursor position on timeline." msgid "Please select a cursor position on timeline."
msgstr "Por favor seleccione um posição do cursor na linha do tempo." msgstr "Por favor selecione um posição do cursor na linha do tempo."
#: airtime_mvc/application/controllers/LocaleController.php:61 #: airtime_mvc/application/controllers/LocaleController.php:61
#: airtime_mvc/application/controllers/LibraryController.php:190 #: airtime_mvc/application/controllers/LibraryController.php:190
@ -1851,11 +1851,11 @@ msgstr "Arquivos"
#: airtime_mvc/application/controllers/LocaleController.php:96 #: airtime_mvc/application/controllers/LocaleController.php:96
msgid "Playlists" msgid "Playlists"
msgstr "Listas de Reprodução" msgstr "Listas"
#: airtime_mvc/application/controllers/LocaleController.php:97 #: airtime_mvc/application/controllers/LocaleController.php:97
msgid "Smart Blocks" msgid "Smart Blocks"
msgstr "Blocos Inteligentes" msgstr "Blocos"
#: airtime_mvc/application/controllers/LocaleController.php:98 #: airtime_mvc/application/controllers/LocaleController.php:98
msgid "Web Streams" msgid "Web Streams"
@ -1880,7 +1880,7 @@ msgstr "Obtendo dados do servidor..."
#: airtime_mvc/application/controllers/LocaleController.php:103 #: airtime_mvc/application/controllers/LocaleController.php:103
msgid "The soundcloud id for this file is: " msgid "The soundcloud id for this file is: "
msgstr "O id do SoundCloud para este arquivo é:" msgstr "O id no SoundCloud para este arquivo é:"
#: airtime_mvc/application/controllers/LocaleController.php:104 #: airtime_mvc/application/controllers/LocaleController.php:104
msgid "There was an error while uploading to soundcloud." msgid "There was an error while uploading to soundcloud."
@ -1913,7 +1913,7 @@ msgstr "A entrada deve estar no formato hh:mm:ss.t"
#: airtime_mvc/application/controllers/LocaleController.php:113 #: airtime_mvc/application/controllers/LocaleController.php:113
#, php-format #, php-format
msgid "You are currently uploading files. %sGoing to another screen will cancel the upload process. %sAre you sure you want to leave the page?" msgid "You are currently uploading files. %sGoing to another screen will cancel the upload process. %sAre you sure you want to leave the page?"
msgstr "Você está fazendo upload de arquivos neste momento. %sIr a outra tela cancelará o processo de upload. %sTem certeza de que deseja sair desta página?" msgstr "Você está fazendo upload de arquivos neste momento. %s Ir a outra tela cancelará o processo de upload. %sTem certeza de que deseja sair desta página?"
#: airtime_mvc/application/controllers/LocaleController.php:115 #: airtime_mvc/application/controllers/LocaleController.php:115
msgid "please put in a time '00:00:00 (.0)'" msgid "please put in a time '00:00:00 (.0)'"
@ -1925,7 +1925,7 @@ msgstr "por favor informe o tempo em segundos '00 (.0)'"
#: airtime_mvc/application/controllers/LocaleController.php:117 #: airtime_mvc/application/controllers/LocaleController.php:117
msgid "Your browser does not support playing this file type: " msgid "Your browser does not support playing this file type: "
msgstr "Seu navegador não suporta a execução deste formato de arquivo:" msgstr "Seu navegador não suporta a execução deste tipo de arquivo:"
#: airtime_mvc/application/controllers/LocaleController.php:118 #: airtime_mvc/application/controllers/LocaleController.php:118
msgid "Dynamic block is not previewable" msgid "Dynamic block is not previewable"
@ -1937,11 +1937,11 @@ msgstr "Limitar em:"
#: airtime_mvc/application/controllers/LocaleController.php:120 #: airtime_mvc/application/controllers/LocaleController.php:120
msgid "Playlist saved" msgid "Playlist saved"
msgstr "Lista de Reprodução salva" msgstr "A lista foi salva"
#: airtime_mvc/application/controllers/LocaleController.php:121 #: airtime_mvc/application/controllers/LocaleController.php:121
msgid "Playlist shuffled" msgid "Playlist shuffled"
msgstr "Lista de Reprodução embaralhada" msgstr "A lista foi embaralhada"
#: airtime_mvc/application/controllers/LocaleController.php:123 #: airtime_mvc/application/controllers/LocaleController.php:123
msgid "Airtime is unsure about the status of this file. This can happen when the file is on a remote drive that is unaccessible or the file is in a directory that isn't 'watched' anymore." msgid "Airtime is unsure about the status of this file. This can happen when the file is on a remote drive that is unaccessible or the file is in a directory that isn't 'watched' anymore."
@ -1967,15 +1967,15 @@ msgstr "Sim, quero colaborar com o Airtime"
#: airtime_mvc/application/controllers/LocaleController.php:130 #: airtime_mvc/application/controllers/LocaleController.php:130
#: airtime_mvc/application/controllers/LocaleController.php:188 #: airtime_mvc/application/controllers/LocaleController.php:188
msgid "Image must be one of jpg, jpeg, png, or gif" msgid "Image must be one of jpg, jpeg, png, or gif"
msgstr "A imagem precisa ter extensão a jpg, jpeg, png ou gif" msgstr "A imagem precisa conter extensão jpg, jpeg, png ou gif"
#: airtime_mvc/application/controllers/LocaleController.php:133 #: airtime_mvc/application/controllers/LocaleController.php:133
msgid "A static smart block will save the criteria and generate the block content immediately. This allows you to edit and view it in the Library before adding it to a show." msgid "A static smart block will save the criteria and generate the block content immediately. This allows you to edit and view it in the Library before adding it to a show."
msgstr "Um bloco inteligente estático salvará os critérios e gerará o conteúdo imediatamente. Isso permite que você edite e visualize-o na Biblioteca antes de adicioná-lo a um programa." msgstr "Um bloco estático salvará os critérios e gerará o conteúdo imediatamente. Isso permite que você edite e visualize-o na Biblioteca antes de adicioná-lo a um programa."
#: airtime_mvc/application/controllers/LocaleController.php:135 #: airtime_mvc/application/controllers/LocaleController.php:135
msgid "A dynamic smart block will only save the criteria. The block content will get generated upon adding it to a show. You will not be able to view and edit the content in the Library." msgid "A dynamic smart block will only save the criteria. The block content will get generated upon adding it to a show. You will not be able to view and edit the content in the Library."
msgstr "Um bloco inteligente dinâmico apenas conterá critérios. O conteúdo do bloco será gerado após adicioná-lo a um programa. Você não será capaz de ver ou editar o conteúdo na Biblioteca." msgstr "Um bloco dinâmico apenas conterá critérios. O conteúdo do bloco será gerado após adicioná-lo a um programa. Você não será capaz de ver ou editar o conteúdo na Biblioteca."
#: airtime_mvc/application/controllers/LocaleController.php:137 #: airtime_mvc/application/controllers/LocaleController.php:137
msgid "The desired block length will not be reached if Airtime cannot find enough unique tracks to match your criteria. Enable this option if you wish to allow tracks to be added multiple times to the smart block." msgid "The desired block length will not be reached if Airtime cannot find enough unique tracks to match your criteria. Enable this option if you wish to allow tracks to be added multiple times to the smart block."
@ -1983,15 +1983,15 @@ msgstr "A duração desejada do bloco não será completada se o Airtime não lo
#: airtime_mvc/application/controllers/LocaleController.php:138 #: airtime_mvc/application/controllers/LocaleController.php:138
msgid "Smart block shuffled" msgid "Smart block shuffled"
msgstr "Bloco inteligente embaralhado" msgstr "O bloco foi embaralhado"
#: airtime_mvc/application/controllers/LocaleController.php:139 #: airtime_mvc/application/controllers/LocaleController.php:139
msgid "Smart block generated and criteria saved" msgid "Smart block generated and criteria saved"
msgstr "Bloco inteligente gerado e criterio salvo" msgstr "O bloco foi gerado e o criterio foi salvo"
#: airtime_mvc/application/controllers/LocaleController.php:140 #: airtime_mvc/application/controllers/LocaleController.php:140
msgid "Smart block saved" msgid "Smart block saved"
msgstr "Bloco inteligente salvo" msgstr "O bloco foi salvo"
#: airtime_mvc/application/controllers/LocaleController.php:141 #: airtime_mvc/application/controllers/LocaleController.php:141
msgid "Processing..." msgid "Processing..."
@ -2050,7 +2050,7 @@ msgstr "O fluxo está desabilitado"
#: airtime_mvc/application/controllers/LocaleController.php:174 #: airtime_mvc/application/controllers/LocaleController.php:174
msgid "Can not connect to the streaming server" msgid "Can not connect to the streaming server"
msgstr "Não é possível conectar ao servidor de fluxo" msgstr "Não é possível conectar ao servidor de streaming"
#: airtime_mvc/application/controllers/LocaleController.php:176 #: airtime_mvc/application/controllers/LocaleController.php:176
msgid "If Airtime is behind a router or firewall, you may need to configure port forwarding and this field information will be incorrect. In this case you will need to manually update this field so it shows the correct host/port/mount that your DJ's need to connect to. The allowed range is between 1024 and 49151." msgid "If Airtime is behind a router or firewall, you may need to configure port forwarding and this field information will be incorrect. In this case you will need to manually update this field so it shows the correct host/port/mount that your DJ's need to connect to. The allowed range is between 1024 and 49151."
@ -2075,7 +2075,7 @@ msgstr "Marque esta caixa para ligar automaticamente as fontes Mestre / Programa
#: airtime_mvc/application/controllers/LocaleController.php:182 #: airtime_mvc/application/controllers/LocaleController.php:182
msgid "If your Icecast server expects a username of 'source', this field can be left blank." msgid "If your Icecast server expects a username of 'source', this field can be left blank."
msgstr "Se o servidor Icecast esperar por um usuário de 'source', este campo poderá permanecer em branco." msgstr "Se o servidor Icecast esperar por um usuário 'source', este campo poderá permanecer em branco."
#: airtime_mvc/application/controllers/LocaleController.php:183 #: airtime_mvc/application/controllers/LocaleController.php:183
#: airtime_mvc/application/controllers/LocaleController.php:193 #: airtime_mvc/application/controllers/LocaleController.php:193
@ -2088,7 +2088,7 @@ msgstr "Se você alterar os campos de usuário ou senha de um fluxo ativo, o mec
#: airtime_mvc/application/controllers/LocaleController.php:186 #: airtime_mvc/application/controllers/LocaleController.php:186
msgid "This is the admin username and password for Icecast/SHOUTcast to get listener statistics." msgid "This is the admin username and password for Icecast/SHOUTcast to get listener statistics."
msgstr "Este é o usuário e senha de servidores Icecast / SHOUTcast, para obter estatísticas de ouvinte." msgstr "Este é o usuário e senha de servidores Icecast / SHOUTcast, para obter estatísticas de ouvintes."
#: airtime_mvc/application/controllers/LocaleController.php:190 #: airtime_mvc/application/controllers/LocaleController.php:190
msgid "No result found" msgid "No result found"
@ -2100,7 +2100,7 @@ msgstr "Este segue o mesmo padrão de segurança para os programas: apenas usuá
#: airtime_mvc/application/controllers/LocaleController.php:192 #: airtime_mvc/application/controllers/LocaleController.php:192
msgid "Specify custom authentication which will work only for this show." msgid "Specify custom authentication which will work only for this show."
msgstr "Especifique a autenticação personalizada que funcionará apenas para este programa." msgstr "Defina uma autenticação personalizada que funcionará apenas neste programa."
#: airtime_mvc/application/controllers/LocaleController.php:194 #: airtime_mvc/application/controllers/LocaleController.php:194
msgid "The show instance doesn't exist anymore!" msgid "The show instance doesn't exist anymore!"
@ -2112,7 +2112,7 @@ msgstr "Programa"
#: airtime_mvc/application/controllers/LocaleController.php:199 #: airtime_mvc/application/controllers/LocaleController.php:199
msgid "Show is empty" msgid "Show is empty"
msgstr "O Programa está sem conteúdo" msgstr "O programa está vazio"
#: airtime_mvc/application/controllers/LocaleController.php:200 #: airtime_mvc/application/controllers/LocaleController.php:200
msgid "1m" msgid "1m"
@ -2261,7 +2261,7 @@ msgstr "mês"
#: airtime_mvc/application/controllers/LocaleController.php:260 #: airtime_mvc/application/controllers/LocaleController.php:260
msgid "Shows longer than their scheduled time will be cut off by a following show." msgid "Shows longer than their scheduled time will be cut off by a following show."
msgstr "Um programa com duração maior que o tempo programado será cortado pelo programa seguinte." msgstr "Um programa com tempo maior que a duração programada será cortado pelo programa seguinte."
#: airtime_mvc/application/controllers/LocaleController.php:261 #: airtime_mvc/application/controllers/LocaleController.php:261
msgid "Cancel Current Show?" msgid "Cancel Current Show?"
@ -2319,11 +2319,11 @@ msgstr "Fade Saída"
#: airtime_mvc/application/controllers/LocaleController.php:282 #: airtime_mvc/application/controllers/LocaleController.php:282
msgid "Show Empty" msgid "Show Empty"
msgstr "Programa sem conteúdo" msgstr "Programa vazio"
#: airtime_mvc/application/controllers/LocaleController.php:283 #: airtime_mvc/application/controllers/LocaleController.php:283
msgid "Recording From Line In" msgid "Recording From Line In"
msgstr "Gravando a partir de Line In" msgstr "Gravando a partir do Line In"
#: airtime_mvc/application/controllers/LocaleController.php:288 #: airtime_mvc/application/controllers/LocaleController.php:288
msgid "Cannot schedule outside a show." msgid "Cannot schedule outside a show."
@ -2390,7 +2390,7 @@ msgstr "Abrir"
#: airtime_mvc/application/controllers/LocaleController.php:317 #: airtime_mvc/application/controllers/LocaleController.php:317
msgid "Guests can do the following:" msgid "Guests can do the following:"
msgstr "Visitantes poderm fazer o seguinte:" msgstr "Visitantes podem fazer o seguinte:"
#: airtime_mvc/application/controllers/LocaleController.php:318 #: airtime_mvc/application/controllers/LocaleController.php:318
msgid "View schedule" msgid "View schedule"
@ -2406,7 +2406,7 @@ msgstr "DJs podem fazer o seguinte:"
#: airtime_mvc/application/controllers/LocaleController.php:321 #: airtime_mvc/application/controllers/LocaleController.php:321
msgid "Manage assigned show content" msgid "Manage assigned show content"
msgstr "Gerenciar o conteúdo de programas a ele delegados" msgstr "Gerenciar o conteúdo de programas delegados a ele"
#: airtime_mvc/application/controllers/LocaleController.php:322 #: airtime_mvc/application/controllers/LocaleController.php:322
msgid "Import media files" msgid "Import media files"
@ -2454,11 +2454,11 @@ msgstr "Gerenciar diretórios monitorados"
#: airtime_mvc/application/controllers/LocaleController.php:334 #: airtime_mvc/application/controllers/LocaleController.php:334
msgid "View system status" msgid "View system status"
msgstr "Visualizar estado so sistema" msgstr "Visualizar estado do sistema"
#: airtime_mvc/application/controllers/LocaleController.php:335 #: airtime_mvc/application/controllers/LocaleController.php:335
msgid "Access playout history" msgid "Access playout history"
msgstr "Acessar histórico de programação" msgstr "Acessar o histórico da programação"
#: airtime_mvc/application/controllers/LocaleController.php:336 #: airtime_mvc/application/controllers/LocaleController.php:336
msgid "View listener stats" msgid "View listener stats"
@ -2470,7 +2470,7 @@ msgstr "Exibir / ocultar colunas"
#: airtime_mvc/application/controllers/LocaleController.php:340 #: airtime_mvc/application/controllers/LocaleController.php:340
msgid "From {from} to {to}" msgid "From {from} to {to}"
msgstr "De {from} para {to}" msgstr "De {from} até {to}"
#: airtime_mvc/application/controllers/LocaleController.php:341 #: airtime_mvc/application/controllers/LocaleController.php:341
msgid "kbps" msgid "kbps"
@ -2478,7 +2478,7 @@ msgstr "kbps"
#: airtime_mvc/application/controllers/LocaleController.php:342 #: airtime_mvc/application/controllers/LocaleController.php:342
msgid "yyyy-mm-dd" msgid "yyyy-mm-dd"
msgstr "dd-mm-yyyy" msgstr "yyy-mm-dd"
#: airtime_mvc/application/controllers/LocaleController.php:343 #: airtime_mvc/application/controllers/LocaleController.php:343
msgid "hh:mm:ss.t" msgid "hh:mm:ss.t"
@ -2532,7 +2532,7 @@ msgstr "Minuto"
#: airtime_mvc/application/controllers/LocaleController.php:358 #: airtime_mvc/application/controllers/LocaleController.php:358
msgid "Done" msgid "Done"
msgstr "Feito" msgstr "Concluído"
#: airtime_mvc/application/controllers/LocaleController.php:361 #: airtime_mvc/application/controllers/LocaleController.php:361
msgid "Select files" msgid "Select files"
@ -2553,7 +2553,7 @@ msgstr "Parar Upload"
#: airtime_mvc/application/controllers/LocaleController.php:368 #: airtime_mvc/application/controllers/LocaleController.php:368
msgid "Start upload" msgid "Start upload"
msgstr "In iciar Upload" msgstr "Iniciar Upload"
#: airtime_mvc/application/controllers/LocaleController.php:369 #: airtime_mvc/application/controllers/LocaleController.php:369
msgid "Add files" msgid "Add files"
@ -2570,7 +2570,7 @@ msgstr "N/A"
#: airtime_mvc/application/controllers/LocaleController.php:372 #: airtime_mvc/application/controllers/LocaleController.php:372
msgid "Drag files here." msgid "Drag files here."
msgstr "Arraste arquivos aqui." msgstr "Arraste arquivos nesta área."
#: airtime_mvc/application/controllers/LocaleController.php:373 #: airtime_mvc/application/controllers/LocaleController.php:373
msgid "File extension error." msgid "File extension error."
@ -2602,7 +2602,7 @@ msgstr "Erro genérico."
#: airtime_mvc/application/controllers/LocaleController.php:380 #: airtime_mvc/application/controllers/LocaleController.php:380
msgid "IO error." msgid "IO error."
msgstr "Erro de IO." msgstr "Erro de I/O."
#: airtime_mvc/application/controllers/LocaleController.php:381 #: airtime_mvc/application/controllers/LocaleController.php:381
#, php-format #, php-format
@ -2620,7 +2620,7 @@ msgstr "Arquivo: %f, tamanho: %s, tamanho máximo: %m"
#: airtime_mvc/application/controllers/LocaleController.php:385 #: airtime_mvc/application/controllers/LocaleController.php:385
msgid "Upload URL might be wrong or doesn't exist" msgid "Upload URL might be wrong or doesn't exist"
msgstr "URL de upload pode estar errada ou não existe." msgstr "URL de upload pode estar incorreta ou inexiste."
#: airtime_mvc/application/controllers/LocaleController.php:386 #: airtime_mvc/application/controllers/LocaleController.php:386
msgid "Error: File too large: " msgid "Error: File too large: "
@ -2657,7 +2657,7 @@ msgstr "Excluir"
#: airtime_mvc/application/controllers/ShowbuilderController.php:212 #: airtime_mvc/application/controllers/ShowbuilderController.php:212
msgid "show does not exist" msgid "show does not exist"
msgstr "programa não existe" msgstr "programa inexistente"
#: airtime_mvc/application/controllers/ListenerstatController.php:56 #: airtime_mvc/application/controllers/ListenerstatController.php:56
msgid "Please make sure admin user/password is correct on System->Streams page." msgid "Please make sure admin user/password is correct on System->Streams page."
@ -2702,17 +2702,17 @@ msgstr "%s não encontrado"
#: airtime_mvc/application/controllers/LibraryController.php:104 #: airtime_mvc/application/controllers/LibraryController.php:104
#: airtime_mvc/application/controllers/PlaylistController.php:148 #: airtime_mvc/application/controllers/PlaylistController.php:148
msgid "Something went wrong." msgid "Something went wrong."
msgstr "Algum errado ocorreu." msgstr "Ocorreu algo errado."
#: airtime_mvc/application/controllers/LibraryController.php:182 #: airtime_mvc/application/controllers/LibraryController.php:182
#: airtime_mvc/application/controllers/LibraryController.php:206 #: airtime_mvc/application/controllers/LibraryController.php:206
#: airtime_mvc/application/controllers/LibraryController.php:229 #: airtime_mvc/application/controllers/LibraryController.php:229
msgid "Add to Playlist" msgid "Add to Playlist"
msgstr "Adicionar a Lista de Reprodução" msgstr "Adicionar à Lista"
#: airtime_mvc/application/controllers/LibraryController.php:184 #: airtime_mvc/application/controllers/LibraryController.php:184
msgid "Add to Smart Block" msgid "Add to Smart Block"
msgstr "Adicionar a Bloco Inteligente" msgstr "Adicionar ao Bloco"
#: airtime_mvc/application/controllers/LibraryController.php:194 #: airtime_mvc/application/controllers/LibraryController.php:194
#: airtime_mvc/application/controllers/ScheduleController.php:897 #: airtime_mvc/application/controllers/ScheduleController.php:897
@ -2721,7 +2721,7 @@ msgstr "Download"
#: airtime_mvc/application/controllers/LibraryController.php:198 #: airtime_mvc/application/controllers/LibraryController.php:198
msgid "Duplicate Playlist" msgid "Duplicate Playlist"
msgstr "Duplicar Lista de Reprodução" msgstr "Duplicar Lista"
#: airtime_mvc/application/controllers/LibraryController.php:213 #: airtime_mvc/application/controllers/LibraryController.php:213
#: airtime_mvc/application/controllers/LibraryController.php:235 #: airtime_mvc/application/controllers/LibraryController.php:235
@ -2836,7 +2836,7 @@ msgstr "Fluxo Sem Título"
#: airtime_mvc/application/controllers/WebstreamController.php:138 #: airtime_mvc/application/controllers/WebstreamController.php:138
msgid "Webstream saved." msgid "Webstream saved."
msgstr "Fluxo salvo." msgstr "Fluxo gravado."
#: airtime_mvc/application/controllers/WebstreamController.php:146 #: airtime_mvc/application/controllers/WebstreamController.php:146
msgid "Invalid form values." msgid "Invalid form values."
@ -2844,7 +2844,7 @@ msgstr "Valores do formulário inválidos."
#: airtime_mvc/application/views/scripts/listenerstat/index.phtml:2 #: airtime_mvc/application/views/scripts/listenerstat/index.phtml:2
msgid "Listener Count Over Time" msgid "Listener Count Over Time"
msgstr "Número de Ouvintes ao Longo da Exibição" msgstr "Número de ouvintes durante a exibição"
#: airtime_mvc/application/views/scripts/partialviews/header.phtml:3 #: airtime_mvc/application/views/scripts/partialviews/header.phtml:3
msgid "Previous:" msgid "Previous:"
@ -2860,15 +2860,15 @@ msgstr "Fontes de Fluxo"
#: airtime_mvc/application/views/scripts/partialviews/header.phtml:29 #: airtime_mvc/application/views/scripts/partialviews/header.phtml:29
msgid "Master Source" msgid "Master Source"
msgstr "Fonte Master" msgstr "Master"
#: airtime_mvc/application/views/scripts/partialviews/header.phtml:38 #: airtime_mvc/application/views/scripts/partialviews/header.phtml:38
msgid "Show Source" msgid "Show Source"
msgstr "Fonte Programa" msgstr "Programa"
#: airtime_mvc/application/views/scripts/partialviews/header.phtml:45 #: airtime_mvc/application/views/scripts/partialviews/header.phtml:45
msgid "Scheduled Play" msgid "Scheduled Play"
msgstr "Reprodução Agendada" msgstr "Programação"
#: airtime_mvc/application/views/scripts/partialviews/header.phtml:54 #: airtime_mvc/application/views/scripts/partialviews/header.phtml:54
msgid "ON AIR" msgid "ON AIR"
@ -2880,15 +2880,15 @@ msgstr "Ouvir"
#: airtime_mvc/application/views/scripts/partialviews/header.phtml:59 #: airtime_mvc/application/views/scripts/partialviews/header.phtml:59
msgid "Station time" msgid "Station time"
msgstr "Horário da Estação" msgstr "Hora Local"
#: airtime_mvc/application/views/scripts/partialviews/trialBox.phtml:3 #: airtime_mvc/application/views/scripts/partialviews/trialBox.phtml:3
msgid "Your trial expires in" msgid "Your trial expires in"
msgstr "Seu período de teste expira em" msgstr "Seu período de teste termina em"
#: airtime_mvc/application/views/scripts/partialviews/trialBox.phtml:9 #: airtime_mvc/application/views/scripts/partialviews/trialBox.phtml:9
msgid "Purchase your copy of Airtime" msgid "Purchase your copy of Airtime"
msgstr "Compre sua cópia do Airtime" msgstr "Adquira sua cópia do Airtime"
#: airtime_mvc/application/views/scripts/partialviews/trialBox.phtml:9 #: airtime_mvc/application/views/scripts/partialviews/trialBox.phtml:9
msgid "My Account" msgid "My Account"
@ -2904,7 +2904,7 @@ msgstr "Novo Usuário"
#: airtime_mvc/application/views/scripts/user/add-user.phtml:17 #: airtime_mvc/application/views/scripts/user/add-user.phtml:17
msgid "id" msgid "id"
msgstr "is" msgstr "id"
#: airtime_mvc/application/views/scripts/user/add-user.phtml:19 #: airtime_mvc/application/views/scripts/user/add-user.phtml:19
msgid "First Name" msgid "First Name"
@ -2921,7 +2921,7 @@ msgstr "Tipo de Usuário"
#: airtime_mvc/application/views/scripts/dashboard/about.phtml:5 #: airtime_mvc/application/views/scripts/dashboard/about.phtml:5
#, php-format #, php-format
msgid "%sAirtime%s %s, the open radio software for scheduling and remote station management. %s" msgid "%sAirtime%s %s, the open radio software for scheduling and remote station management. %s"
msgstr "%sAirtime%s %s, um software de rádio aberto para programação e gestão remota de estação. % s" msgstr "%sAirtime%s %s, um software livre para automação e gestão remota de estação de rádio. % s"
#: airtime_mvc/application/views/scripts/dashboard/about.phtml:13 #: airtime_mvc/application/views/scripts/dashboard/about.phtml:13
#, php-format #, php-format
@ -2934,7 +2934,7 @@ msgstr "Compartilhar"
#: airtime_mvc/application/views/scripts/dashboard/stream-player.phtml:64 #: airtime_mvc/application/views/scripts/dashboard/stream-player.phtml:64
msgid "Select stream:" msgid "Select stream:"
msgstr "Selecione o fluxo:" msgstr "Selecionar fluxo:"
#: airtime_mvc/application/views/scripts/dashboard/stream-player.phtml:90 #: airtime_mvc/application/views/scripts/dashboard/stream-player.phtml:90
#: airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml:50 #: airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml:50
@ -2952,27 +2952,27 @@ msgstr "Benvindo ao Airtime!"
#: airtime_mvc/application/views/scripts/dashboard/help.phtml:4 #: airtime_mvc/application/views/scripts/dashboard/help.phtml:4
msgid "Here's how you can get started using Airtime to automate your broadcasts: " msgid "Here's how you can get started using Airtime to automate your broadcasts: "
msgstr "Veja aqui como você pode começar a usar o Airtime para automatizar suas transmissões:" msgstr "Saiba como utilizar o Airtime para automatizar suas transmissões:"
#: airtime_mvc/application/views/scripts/dashboard/help.phtml:7 #: airtime_mvc/application/views/scripts/dashboard/help.phtml:7
msgid "Begin by adding your files to the library using the 'Add Media' menu button. You can drag and drop your files to this window too." msgid "Begin by adding your files to the library using the 'Add Media' menu button. You can drag and drop your files to this window too."
msgstr "Comece adicionando seus arquivos À biblioteca usando o botão \"Adicionar Mídia\" no menu. Você pode arrastar e soltar os arquivos para esta janela também." msgstr "Comece adicionando seus arquivos à biblioteca usando o botão \"Adicionar Mídia\" . Você também pode arrastar e soltar os arquivos dentro da página."
#: airtime_mvc/application/views/scripts/dashboard/help.phtml:8 #: airtime_mvc/application/views/scripts/dashboard/help.phtml:8
msgid "Create a show by going to 'Calendar' in the menu bar, and then clicking the '+ Show' icon. This can be either a one-time or repeating show. Only admins and program managers can add shows." msgid "Create a show by going to 'Calendar' in the menu bar, and then clicking the '+ Show' icon. This can be either a one-time or repeating show. Only admins and program managers can add shows."
msgstr "Crie um programa, indo até 'Calendário' na barra de menu e, em seguida, clicando no ícone '+Programa'. Este pode ser um programa inédito ou retransmitido. Apenas administradores e gerentes de programação podem adicionar programas." msgstr "Crie um programa, através do 'Calendário' , clicando no ícone '+Programa'. Este pode ser um programa inédito ou retransmitido. Apenas administradores e gerentes de programação podem adicionar programas."
#: airtime_mvc/application/views/scripts/dashboard/help.phtml:9 #: airtime_mvc/application/views/scripts/dashboard/help.phtml:9
msgid "Add media to the show by going to your show in the Schedule calendar, left-clicking on it and selecting 'Add / Remove Content'" msgid "Add media to the show by going to your show in the Schedule calendar, left-clicking on it and selecting 'Add / Remove Content'"
msgstr "Adicione conteúdo ao programa, indo para o seu programa no calendário, clique com o botão esquerdo do mouse sobre o programa e selecione \"Adicionar / Remover Conteúdo\"" msgstr "Adicione conteúdos ao seu programa, através do link Calendário, clique com o botão esquerdo do mouse sobre o programa e selecione \"Adicionar / Remover Conteúdo\""
#: airtime_mvc/application/views/scripts/dashboard/help.phtml:10 #: airtime_mvc/application/views/scripts/dashboard/help.phtml:10
msgid "Select your media from the left pane and drag them to your show in the right pane." msgid "Select your media from the left pane and drag them to your show in the right pane."
msgstr "Selecione seu conteúdo a partir do painel esquerdo e arraste-o para o seu programa no painel da direita." msgstr "Selecione seu conteúdo a partir da lista , no painel esquerdo, e arraste-o para o seu programa, no painel da direita."
#: airtime_mvc/application/views/scripts/dashboard/help.phtml:12 #: airtime_mvc/application/views/scripts/dashboard/help.phtml:12
msgid "Then you're good to go!" msgid "Then you're good to go!"
msgstr "Então você está pronto para começar!" msgstr "Você já está pronto para começar!"
#: airtime_mvc/application/views/scripts/dashboard/help.phtml:13 #: airtime_mvc/application/views/scripts/dashboard/help.phtml:13
#, php-format #, php-format
@ -2989,11 +2989,11 @@ msgstr "Expandir Bloco Dinâmico"
#: airtime_mvc/application/views/scripts/playlist/update.phtml:98 #: airtime_mvc/application/views/scripts/playlist/update.phtml:98
msgid "Empty smart block" msgid "Empty smart block"
msgstr "Bloco inteligente vazio" msgstr "Bloco vazio"
#: airtime_mvc/application/views/scripts/playlist/update.phtml:100 #: airtime_mvc/application/views/scripts/playlist/update.phtml:100
msgid "Empty playlist" msgid "Empty playlist"
msgstr "Lista de reprodução vazia" msgstr "Lista vazia"
#: 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/playlist.phtml:66 #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:66
@ -3024,27 +3024,27 @@ msgstr "Novo"
#: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:13 #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:13
#: airtime_mvc/application/views/scripts/webstream/webstream.phtml:7 #: airtime_mvc/application/views/scripts/webstream/webstream.phtml:7
msgid "New Playlist" msgid "New Playlist"
msgstr "Nova Lista de Reprodução" msgstr "Nova Lista"
#: airtime_mvc/application/views/scripts/playlist/playlist.phtml:14 #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:14
#: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:14 #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:14
#: airtime_mvc/application/views/scripts/webstream/webstream.phtml:8 #: airtime_mvc/application/views/scripts/webstream/webstream.phtml:8
msgid "New Smart Block" msgid "New Smart Block"
msgstr "Novo Bloco Inteligente" msgstr "Novo Bloco"
#: airtime_mvc/application/views/scripts/playlist/playlist.phtml:15 #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:15
#: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:15 #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:15
#: airtime_mvc/application/views/scripts/webstream/webstream.phtml:9 #: airtime_mvc/application/views/scripts/webstream/webstream.phtml:9
msgid "New Webstream" msgid "New Webstream"
msgstr "Novo Fluxo" msgstr "Novo Fluxo Web"
#: airtime_mvc/application/views/scripts/playlist/playlist.phtml:20 #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:20
msgid "Shuffle playlist" msgid "Shuffle playlist"
msgstr "Embaralhar Lista de Reprodução" msgstr "Embaralhar Lista"
#: airtime_mvc/application/views/scripts/playlist/playlist.phtml:23 #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:23
msgid "Save playlist" msgid "Save playlist"
msgstr "Salvar Lista de Reprodução" msgstr "Salvar Lista"
#: airtime_mvc/application/views/scripts/playlist/playlist.phtml:30 #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:30
#: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:27 #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:27
@ -3114,7 +3114,7 @@ msgstr "Quem"
#: airtime_mvc/application/views/scripts/schedule/add-show-form.phtml:33 #: airtime_mvc/application/views/scripts/schedule/add-show-form.phtml:33
msgid "Style" msgid "Style"
msgstr "Estilo" msgstr "Aparência"
#: airtime_mvc/application/views/scripts/login/password-restore-after.phtml:3 #: airtime_mvc/application/views/scripts/login/password-restore-after.phtml:3
msgid "Email sent" msgid "Email sent"
@ -3130,7 +3130,7 @@ msgstr "Voltar à tela de login"
#: airtime_mvc/application/views/scripts/login/index.phtml:7 #: airtime_mvc/application/views/scripts/login/index.phtml:7
msgid "Welcome to the online Airtime demo! You can log in using the username 'admin' and the password 'admin'." msgid "Welcome to the online Airtime demo! You can log in using the username 'admin' and the password 'admin'."
msgstr "Bem-vindo à demonstração online do Airtime! Você pode fazer login com usuário usando 'admin' e senha \"admin\"." msgstr "Bem-vindo à demonstração online do Airtime! Autentique-se com usuário 'admin' e senha \"admin\"."
#: airtime_mvc/application/views/scripts/login/password-restore.phtml:3 #: airtime_mvc/application/views/scripts/login/password-restore.phtml:3
#: airtime_mvc/application/views/scripts/form/login.phtml:34 #: airtime_mvc/application/views/scripts/form/login.phtml:34
@ -3216,7 +3216,7 @@ msgstr "Duração Padrão:"
#: airtime_mvc/application/views/scripts/webstream/webstream.phtml:63 #: airtime_mvc/application/views/scripts/webstream/webstream.phtml:63
msgid "No webstream" msgid "No webstream"
msgstr "Nenhum fluxo" msgstr "Nenhum fluxo web"
#: airtime_mvc/application/views/scripts/error/error.phtml:6 #: airtime_mvc/application/views/scripts/error/error.phtml:6
msgid "Zend Framework Default Application" msgid "Zend Framework Default Application"
@ -3274,7 +3274,7 @@ msgstr "Definir"
#: airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml:19 #: airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml:19
msgid "Current Import Folder:" msgid "Current Import Folder:"
msgstr "Diretório Import Atual:" msgstr "Diretório de Importação Atual:"
#: airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml:28 #: airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml:28
#: airtime_mvc/application/views/scripts/form/add-show-rebroadcast-absolute.phtml:40 #: airtime_mvc/application/views/scripts/form/add-show-rebroadcast-absolute.phtml:40
@ -3292,7 +3292,7 @@ msgstr "Remover diretório monitorado"
#: airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml:50 #: airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml:50
msgid "You are not watching any media folders." msgid "You are not watching any media folders."
msgstr "Você não está monitorando nenhum diretório de mídia." msgstr "Você não está monitorando nenhum diretório."
#: airtime_mvc/application/views/scripts/form/add-show-rebroadcast-absolute.phtml:4 #: airtime_mvc/application/views/scripts/form/add-show-rebroadcast-absolute.phtml:4
msgid "Choose Days:" msgid "Choose Days:"
@ -3332,7 +3332,7 @@ msgstr "Nota: qualquer arquivo maior que 600x600 será redimensionado"
#: airtime_mvc/application/views/scripts/form/register-dialog.phtml:164 #: airtime_mvc/application/views/scripts/form/register-dialog.phtml:164
#: airtime_mvc/application/views/scripts/form/support-setting.phtml:164 #: airtime_mvc/application/views/scripts/form/support-setting.phtml:164
msgid "Show me what I am sending " msgid "Show me what I am sending "
msgstr "Mostrar o que estou enviando" msgstr "Mostrar quais informações estou enviando"
#: airtime_mvc/application/views/scripts/form/register-dialog.phtml:178 #: airtime_mvc/application/views/scripts/form/register-dialog.phtml:178
msgid "Terms and Conditions" msgid "Terms and Conditions"
@ -3380,7 +3380,7 @@ msgstr "Configurações de %s"
#: airtime_mvc/application/views/scripts/form/add-show-rebroadcast.phtml:4 #: airtime_mvc/application/views/scripts/form/add-show-rebroadcast.phtml:4
msgid "Repeat Days:" msgid "Repeat Days:"
msgstr "Dias para repetir:" msgstr "Dias para reexibir:"
#: airtime_mvc/application/views/scripts/form/daterange.phtml:6 #: airtime_mvc/application/views/scripts/form/daterange.phtml:6
msgid "Filter History" msgid "Filter History"
@ -3418,7 +3418,7 @@ msgstr "URL de Conexão:"
#: airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml:3 #: airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml:3
msgid "Smart Block Options" msgid "Smart Block Options"
msgstr "Opções de Bloco Inteligente" msgstr "Opções de Bloco"
#: airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml:63 #: airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml:63
msgid " to " msgid " to "
@ -3453,7 +3453,7 @@ msgstr "Configurações Globais"
#: airtime_mvc/application/views/scripts/preference/stream-setting.phtml:88 #: airtime_mvc/application/views/scripts/preference/stream-setting.phtml:88
msgid "dB" msgid "dB"
msgstr "db" msgstr "dB"
#: airtime_mvc/application/views/scripts/preference/stream-setting.phtml:107 #: airtime_mvc/application/views/scripts/preference/stream-setting.phtml:107
msgid "Output Stream Settings" msgid "Output Stream Settings"
@ -3472,7 +3472,7 @@ msgstr "Taxa de Amostragem:"
#: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:18 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:18
msgid "Isrc Number:" msgid "Isrc Number:"
msgstr "Número do Isrc:" msgstr "Número Isrc:"
#: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:21 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:21
msgid "File Path:" msgid "File Path:"
@ -3480,7 +3480,7 @@ msgstr "Caminho do Arquivo:"
#: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:39 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:39
msgid "Web Stream" msgid "Web Stream"
msgstr "Fluxo" msgstr "Fluxo Web"
#: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:40 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:40
msgid "Dynamic Smart Block" msgid "Dynamic Smart Block"
@ -3508,7 +3508,7 @@ msgstr "Critério para Bloco Inteligente Dinâmico:"
#: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:118 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:118
msgid "Limit to " msgid "Limit to "
msgstr "Limite em" msgstr "Limitar em"
#: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:512 #: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:512
msgid "Please selection an option" msgid "Please selection an option"
@ -3516,5 +3516,5 @@ msgstr "Por favor selecione uma opção"
#: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:531 #: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:531
msgid "No Records" msgid "No Records"
msgstr "Nenhum programa gravado" msgstr "Não há gravações"

View File

@ -1999,7 +1999,7 @@ span.errors.sp-errors{
.small-icon.show-empty { .small-icon.show-empty {
background:url(images/icon_alert_cal_alt.png) no-repeat 0 0; background:url(images/icon_alert_cal_alt.png) no-repeat 0 0;
} }
.small-icon.show-partial-filled { .small-icon.show-partial-filled, .small-icon.media-item-in-use {
background:url(images/icon_alert_cal_alt2.png) no-repeat 0 0; background:url(images/icon_alert_cal_alt2.png) no-repeat 0 0;
} }
.medium-icon { .medium-icon {

View File

@ -24,7 +24,7 @@ $(document).ready(function(){
cssSelectorAncestor: "#jp_container_1" cssSelectorAncestor: "#jp_container_1"
},[], //array of songs will be filled with below's json call },[], //array of songs will be filled with below's json call
{ {
swfPath: "/js/jplayer", swfPath: baseUrl+"js/jplayer",
supplied:"oga, mp3, m4v, m4a, wav", supplied:"oga, mp3, m4v, m4a, wav",
size: { size: {
width: "0px", width: "0px",

View File

@ -360,13 +360,15 @@ function controlSwitchLight(){
} }
function getScheduleFromServer(){ function getScheduleFromServer(){
$.ajax({ url: baseUrl+"Schedule/get-current-playlist/format/json", dataType:"json", success:function(data){ $.ajax({ url: baseUrl+"Schedule/get-current-playlist/format/json",
dataType:"json",
success:function(data){
parseItems(data.entries); parseItems(data.entries);
parseSourceStatus(data.source_status); parseSourceStatus(data.source_status);
parseSwitchStatus(data.switch_status); parseSwitchStatus(data.switch_status);
showName = data.show_name; showName = data.show_name;
setTimeout(getScheduleFromServer, serverUpdateInterval);
}, error:function(jqXHR, textStatus, errorThrown){}}); }, error:function(jqXHR, textStatus, errorThrown){}});
setTimeout(getScheduleFromServer, serverUpdateInterval);
} }
function setupQtip(){ function setupQtip(){

View File

@ -7,8 +7,13 @@ var AIRTIME = (function(AIRTIME) {
LIB_SELECTED_CLASS = "lib-selected", LIB_SELECTED_CLASS = "lib-selected",
chosenItems = {}, chosenItems = {},
visibleChosenItems = {}; visibleChosenItems = {};
var criteriaTypes = { // we need to know whether the criteria value is string or
// numeric in order to provide a single textbox or range textboxes
// in the advanced search
// s => string
// n => numberic
var libraryColumnTypes = {
0 : "", 0 : "",
"album_title" : "s", "album_title" : "s",
"artist_name" : "s", "artist_name" : "s",
@ -18,6 +23,8 @@ var AIRTIME = (function(AIRTIME) {
"composer" : "s", "composer" : "s",
"conductor" : "s", "conductor" : "s",
"copyright" : "s", "copyright" : "s",
"cuein" : "n",
"cueout" : "n",
"utime" : "n", "utime" : "n",
"mtime" : "n", "mtime" : "n",
"lptime" : "n", "lptime" : "n",
@ -322,22 +329,40 @@ var AIRTIME = (function(AIRTIME) {
}; };
mod.fnDeleteSelectedItems = function() { mod.fnDeleteSelectedItems = function() {
if (confirm($.i18n._('Are you sure you want to delete the selected item(s)?'))) { if (confirm($.i18n._('Are you sure you want to delete the selected item(s)?'))) {
var aData = AIRTIME.library.getSelectedData(), var aData = AIRTIME.library.getSelectedData(),
item, item,
temp, temp,
aMedia = []; aMedia = [],
currentObjId = $("#side_playlist").find("#obj_id").val(),
// process selected files/playlists. currentObjType = $("#side_playlist").find("#obj_type").val(),
for (item in aData) { closeObj = false;
temp = aData[item];
if (temp !== null && temp.hasOwnProperty('id') ) { // process selected files/playlists.
aMedia.push({"id": temp.id, "type": temp.ftype}); for (item in aData) {
} temp = aData[item];
} if (temp !== null && temp.hasOwnProperty('id') ) {
aMedia.push({"id": temp.id, "type": temp.ftype});
AIRTIME.library.fnDeleteItems(aMedia); if ( (temp.id == currentObjId && temp.ftype === currentObjType) ||
} temp.id == currentObjId && temp.ftype === "stream" && currentObjType === "webstream") {
closeObj = true;
}
}
}
AIRTIME.library.fnDeleteItems(aMedia);
// close the object (playlist/block/webstream)
// on the right side if it was just deleted
// from the library
if (closeObj) {
$.post(baseUrl+"playlist/close-playlist",
{"format": "json", "type": currentObjType},
function(json) {
$("#side_playlist").empty().append(json.html);
});
}
}
}; };
libraryInit = function() { libraryInit = function() {
@ -381,7 +406,7 @@ var AIRTIME = (function(AIRTIME) {
var inputClass = 'filter_column filter_number_text'; var inputClass = 'filter_column filter_number_text';
var labelStyle = "style='margin-right:35px;'"; var labelStyle = "style='margin-right:35px;'";
if (criteriaTypes[ele.mDataProp] != "s") { if (libraryColumnTypes[ele.mDataProp] != "s") {
inputClass = 'filterColumn filter_number_range'; inputClass = 'filterColumn filter_number_range';
labelStyle = ""; labelStyle = "";
} }
@ -400,7 +425,7 @@ var AIRTIME = (function(AIRTIME) {
"</div>"); "</div>");
} }
if (criteriaTypes[ele.mDataProp] == "s") { if (libraryColumnTypes[ele.mDataProp] == "s") {
var obj = { sSelector: "#"+ele.mDataProp } var obj = { sSelector: "#"+ele.mDataProp }
} else { } else {
var obj = { sSelector: "#"+ele.mDataProp, type: "number-range" } var obj = { sSelector: "#"+ele.mDataProp, type: "number-range" }
@ -435,10 +460,15 @@ var AIRTIME = (function(AIRTIME) {
// put hidden columns at the top to insure they can never be visible // put hidden columns at the top to insure they can never be visible
// on the table through column reordering. // on the table through column reordering.
//IMPORTANT: WHEN ADDING A NEW COLUMN PLEASE CONSULT WITH THE WIKI
// https://wiki.sourcefabric.org/display/CC/Adding+a+new+library+datatable+column
"aoColumns": [ "aoColumns": [
/* ftype */ { "sTitle" : "" , "mDataProp" : "ftype" , "bSearchable" : false , "bVisible" : false } , /* ftype */ { "sTitle" : "" , "mDataProp" : "ftype" , "bSearchable" : false , "bVisible" : false } ,
/* Checkbox */ { "sTitle" : "" , "mDataProp" : "checkbox" , "bSortable" : false , "bSearchable" : false , "sWidth" : "25px" , "sClass" : "library_checkbox" } , /* Checkbox */ { "sTitle" : "" , "mDataProp" : "checkbox" , "bSortable" : false , "bSearchable" : false , "sWidth" : "25px" , "sClass" : "library_checkbox" } ,
/* Type */ { "sTitle" : "" , "mDataProp" : "image" , "bSearchable" : false , "sWidth" : "25px" , "sClass" : "library_type" , "iDataSort" : 0 } , /* Type */ { "sTitle" : "" , "mDataProp" : "image" , "bSearchable" : false , "sWidth" : "25px" , "sClass" : "library_type" , "iDataSort" : 0 } ,
/* Is Scheduled */ { "sTitle" : $.i18n._("Scheduled") , "mDataProp" : "is_scheduled" , "bSearchable" : false , "sWidth" : "90px" , "sClass" : "library_is_scheduled"} ,
/* Is Playlist */ { "sTitle" : $.i18n._("Playlist") , "mDataProp" : "is_playlist" , "bSearchable" : false , "sWidth" : "70px" , "sClass" : "library_is_playlist"} ,
/* Title */ { "sTitle" : $.i18n._("Title") , "mDataProp" : "track_title" , "sClass" : "library_title" , "sWidth" : "170px" } , /* Title */ { "sTitle" : $.i18n._("Title") , "mDataProp" : "track_title" , "sClass" : "library_title" , "sWidth" : "170px" } ,
/* Creator */ { "sTitle" : $.i18n._("Creator") , "mDataProp" : "artist_name" , "sClass" : "library_creator" , "sWidth" : "160px" } , /* Creator */ { "sTitle" : $.i18n._("Creator") , "mDataProp" : "artist_name" , "sClass" : "library_creator" , "sWidth" : "160px" } ,
/* Album */ { "sTitle" : $.i18n._("Album") , "mDataProp" : "album_title" , "sClass" : "library_album" , "sWidth" : "150px" } , /* Album */ { "sTitle" : $.i18n._("Album") , "mDataProp" : "album_title" , "sClass" : "library_album" , "sWidth" : "150px" } ,
@ -447,6 +477,8 @@ var AIRTIME = (function(AIRTIME) {
/* Composer */ { "sTitle" : $.i18n._("Composer") , "mDataProp" : "composer" , "bVisible" : false , "sClass" : "library_composer" , "sWidth" : "150px" }, /* Composer */ { "sTitle" : $.i18n._("Composer") , "mDataProp" : "composer" , "bVisible" : false , "sClass" : "library_composer" , "sWidth" : "150px" },
/* Conductor */ { "sTitle" : $.i18n._("Conductor") , "mDataProp" : "conductor" , "bVisible" : false , "sClass" : "library_conductor" , "sWidth" : "125px" }, /* Conductor */ { "sTitle" : $.i18n._("Conductor") , "mDataProp" : "conductor" , "bVisible" : false , "sClass" : "library_conductor" , "sWidth" : "125px" },
/* Copyright */ { "sTitle" : $.i18n._("Copyright") , "mDataProp" : "copyright" , "bVisible" : false , "sClass" : "library_copyright" , "sWidth" : "125px" }, /* Copyright */ { "sTitle" : $.i18n._("Copyright") , "mDataProp" : "copyright" , "bVisible" : false , "sClass" : "library_copyright" , "sWidth" : "125px" },
/* Cue In */ { "sTitle" : $.i18n._("Cue In") , "mDataProp" : "cuein" , "bVisible" : false , "sClass" : "library_length" , "sWidth" : "80px" },
/* Cue Out */ { "sTitle" : $.i18n._("Cue Out") , "mDataProp" : "cueout" , "bVisible" : false , "sClass" : "library_length" , "sWidth" : "80px" },
/* Encoded */ { "sTitle" : $.i18n._("Encoded By") , "mDataProp" : "encoded_by" , "bVisible" : false , "sClass" : "library_encoded" , "sWidth" : "150px" }, /* Encoded */ { "sTitle" : $.i18n._("Encoded By") , "mDataProp" : "encoded_by" , "bVisible" : false , "sClass" : "library_encoded" , "sWidth" : "150px" },
/* Genre */ { "sTitle" : $.i18n._("Genre") , "mDataProp" : "genre" , "bVisible" : false , "sClass" : "library_genre" , "sWidth" : "100px" }, /* Genre */ { "sTitle" : $.i18n._("Genre") , "mDataProp" : "genre" , "bVisible" : false , "sClass" : "library_genre" , "sWidth" : "100px" },
/* ISRC Number */ { "sTitle" : $.i18n._("ISRC") , "mDataProp" : "isrc_number" , "bVisible" : false , "sClass" : "library_isrc" , "sWidth" : "150px" }, /* ISRC Number */ { "sTitle" : $.i18n._("ISRC") , "mDataProp" : "isrc_number" , "bVisible" : false , "sClass" : "library_isrc" , "sWidth" : "150px" },
@ -491,9 +523,11 @@ var AIRTIME = (function(AIRTIME) {
}, },
"fnStateLoad": function fnLibStateLoad(oSettings) { "fnStateLoad": function fnLibStateLoad(oSettings) {
var settings = localStorage.getItem('datatables-library'); var settings = localStorage.getItem('datatables-library');
if (settings !== "") { try {
return JSON.parse(settings); return JSON.parse(settings);
} catch (e) {
return null;
} }
}, },
"fnStateLoadParams": function (oSettings, oData) { "fnStateLoadParams": function (oSettings, oData) {
@ -501,18 +535,22 @@ var AIRTIME = (function(AIRTIME) {
length, length,
a = oData.abVisCols; a = oData.abVisCols;
// putting serialized data back into the correct js type to make if (a) {
// sure everything works properly. // putting serialized data back into the correct js type to make
for (i = 0, length = a.length; i < length; i++) { // sure everything works properly.
if (typeof(a[i]) === "string") { for (i = 0, length = a.length; i < length; i++) {
a[i] = (a[i] === "true") ? true : false; if (typeof(a[i]) === "string") {
} a[i] = (a[i] === "true") ? true : false;
}
}
} }
a = oData.ColReorder; a = oData.ColReorder;
for (i = 0, length = a.length; i < length; i++) { if (a) {
if (typeof(a[i]) === "string") { for (i = 0, length = a.length; i < length; i++) {
a[i] = parseInt(a[i], 10); if (typeof(a[i]) === "string") {
a[i] = parseInt(a[i], 10);
}
} }
} }
@ -554,12 +592,46 @@ var AIRTIME = (function(AIRTIME) {
}, },
"fnRowCallback": AIRTIME.library.fnRowCallback, "fnRowCallback": AIRTIME.library.fnRowCallback,
"fnCreatedRow": function( nRow, aData, iDataIndex ) { "fnCreatedRow": function( nRow, aData, iDataIndex ) {
//add soundcloud icon
if (aData.soundcloud_status !== undefined) {
if (aData.soundcloud_status === "-2") {
$(nRow).find("td.library_title").append('<span class="small-icon progress"/>');
} else if (aData.soundcloud_status === "-3") {
$(nRow).find("td.library_title").append('<span class="small-icon sc-error"/>');
} else if (aData.soundcloud_status !== null) {
$(nRow).find("td.library_title").append('<span class="small-icon soundcloud"/>');
}
}
// add checkbox
$(nRow).find('td.library_checkbox').html("<input type='checkbox' name='cb_"+aData.id+"'>");
// add audio preview image/button
if (aData.ftype === "audioclip") {
$(nRow).find('td.library_type').html('<img title="'+$.i18n._("Track preview")+'" src="'+baseUrl+'css/images/icon_audioclip.png">');
} else if (aData.ftype === "playlist") {
$(nRow).find('td.library_type').html('<img title="'+$.i18n._("Playlist preview")+'" src="'+baseUrl+'css/images/icon_playlist.png">');
} else if (aData.ftype === "block") {
$(nRow).find('td.library_type').html('<img title="'+$.i18n._("Smart Block")+'" src="'+baseUrl+'css/images/icon_smart-block.png">');
} else if (aData.ftype === "stream") {
$(nRow).find('td.library_type').html('<img title="'+$.i18n._("Webstream preview")+'" src="'+baseUrl+'css/images/icon_webstream.png">');
}
if (aData.is_scheduled) {
$(nRow).find("td.library_is_scheduled").html('<span class="small-icon media-item-in-use"></span>');
} else if (!aData.is_scheduled) {
$(nRow).find("td.library_is_scheduled").html('');
}
if (aData.is_playlist) {
$(nRow).find("td.library_is_playlist").html('<span class="small-icon media-item-in-use"></span>');
} else if (!aData.is_playlist) {
$(nRow).find("td.library_is_playlist").html('');
}
// add the play function to the library_type td // add the play function to the library_type td
$(nRow).find('td.library_type').click(function(){ $(nRow).find('td.library_type').click(function(){
if (aData.ftype === 'playlist' && aData.length !== '0.0'){ if (aData.ftype === 'playlist' && aData.length !== '0.0'){
playlistIndex = $(this).parent().attr('id').substring(3); open_playlist_preview(aData.audioFile, 0);
open_playlist_preview(playlistIndex, 0);
} else if (aData.ftype === 'audioclip') { } else if (aData.ftype === 'audioclip') {
if (isAudioSupported(aData.mime)) { if (isAudioSupported(aData.mime)) {
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name); open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
@ -569,8 +641,7 @@ var AIRTIME = (function(AIRTIME) {
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name); open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
} }
} else if (aData.ftype == 'block' && aData.bl_type == 'static') { } else if (aData.ftype == 'block' && aData.bl_type == 'static') {
blockIndex = $(this).parent().attr('id').substring(3); open_block_preview(aData.audioFile, 0);
open_block_preview(blockIndex, 0);
} }
return false; return false;
}); });
@ -605,7 +676,28 @@ var AIRTIME = (function(AIRTIME) {
} }
return false; return false;
}); });
/*$(nRow).find(".media-item-in-use").qtip({
content: {
text: aData.status_msg
},
hide: {
delay: 500,
fixed: true
},
style: {
border: {
width: 0,
radius: 4
},
classes: "ui-tooltip-dark ui-tooltip-rounded"
},
position: {
my: "left bottom",
at: "right center"
},
});*/
// add a tool tip to appear when the user clicks on the type // add a tool tip to appear when the user clicks on the type
// icon. // icon.
$(nRow).find("td:not(.library_checkbox, .library_type)").qtip({ $(nRow).find("td:not(.library_checkbox, .library_type)").qtip({
@ -702,8 +794,19 @@ var AIRTIME = (function(AIRTIME) {
$simpleSearch.addClass("sp-invisible"); $simpleSearch.addClass("sp-invisible");
} }
else { else {
//clear the advanced search fields and reset datatable // clear the advanced search fields
$(".filter_column input").val("").keyup(); var divs = $("div#advanced_search").children(':visible');
$.each(divs, function(i, div){
fields = $(div).children().find('input');
$.each(fields, function(i, field){
if ($(field).val() !== "") {
$(field).val("");
// we need to reset the results when removing
// an advanced search field
$(field).keyup();
}
});
});
//reset datatable with previous simple search results (if any) //reset datatable with previous simple search results (if any)
$(".dataTables_filter input").val(simpleSearchText).keyup(); $(".dataTables_filter input").val(simpleSearchText).keyup();
@ -757,8 +860,7 @@ var AIRTIME = (function(AIRTIME) {
}); });
checkImportStatus(); checkImportStatus();
setInterval(checkImportStatus, 5000); checkLibrarySCUploadStatus();
setInterval(checkLibrarySCUploadStatus, 5000);
addQtipToSCIcons(); addQtipToSCIcons();
@ -986,6 +1088,7 @@ function checkImportStatus() {
} }
div.hide(); div.hide();
} }
setTimeout(checkImportStatus, 5000);
}); });
} }
@ -1019,6 +1122,7 @@ function checkLibrarySCUploadStatus(){
else if (json.sc_id == "-3") { else if (json.sc_id == "-3") {
span.removeClass("progress").addClass("sc-error"); span.removeClass("progress").addClass("sc-error");
} }
setTimeout(checkLibrarySCUploadStatus, 5000);
} }
function checkSCUploadStatusRequest() { function checkSCUploadStatusRequest() {
@ -1252,6 +1356,8 @@ var validationTypes = {
"composer" : "s", "composer" : "s",
"conductor" : "s", "conductor" : "s",
"copyright" : "s", "copyright" : "s",
"cuein" : "l",
"cueout" : "l",
"encoded_by" : "s", "encoded_by" : "s",
"utime" : "t", "utime" : "t",
"mtime" : "t", "mtime" : "t",
@ -1283,12 +1389,23 @@ $(document).ready(function() {
data = $("#edit-md-dialog form").serializeArray(); data = $("#edit-md-dialog form").serializeArray();
$.post(baseUrl+'library/edit-file-md', {format: "json", id: file_id, data: data}, function() { $.post(baseUrl+'library/edit-file-md', {format: "json", id: file_id, data: data}, function() {
$("#edit-md-dialog").dialog().remove(); $("#edit-md-dialog").dialog().remove();
oTable.fnStandingRedraw();
// don't redraw the library table if we are on calendar page
// we would be on calendar if viewing recorded file metadata
if ($("#schedule_calendar").length === 0) {
oTable.fnStandingRedraw();
}
}); });
}); });
$('#editmdcancel').live("click", function() { $('#editmdcancel').live("click", function() {
$("#edit-md-dialog").dialog().remove(); $("#edit-md-dialog").dialog().remove();
}); });
$('#edit-md-dialog').live("keyup", function(event) {
if (event.keyCode === 13) {
$('#editmdsave').click();
}
});
}); });

View File

@ -30,8 +30,7 @@ $(document).ready(function() {
var tempFileName = j.tempfilepath; var tempFileName = j.tempfilepath;
$.get(baseUrl+'Plupload/copyfile/format/json/name/'+ $.get(baseUrl+'Plupload/copyfile/format/json/name/'+
encodeURIComponent(file.name)+'/tempname/' + encodeURIComponent(file.name)+'/tempname/' +
encodeURIComponent(tempFileName), function(json){ encodeURIComponent(tempFileName), function(jr){
var jr = jQuery.parseJSON(json);
if(jr.error !== undefined) { if(jr.error !== undefined) {
var row = $("<tr/>") var row = $("<tr/>")
.append('<td>' + file.name +'</td>') .append('<td>' + file.name +'</td>')

View File

@ -12,6 +12,7 @@ var AIRTIME = (function(AIRTIME){
viewport, viewport,
$lib, $lib,
$pl, $pl,
$togglePl = $("<button id='pl_edit' class='btn btn-small' href='#' title='"+$.i18n._("Open Playlist Editor")+"'>"+$.i18n._("Open Playlist Editor")+"</button>"),
widgetHeight, widgetHeight,
resizeTimeout, resizeTimeout,
width; width;
@ -363,6 +364,17 @@ var AIRTIME = (function(AIRTIME){
removeButtonCheck(); removeButtonCheck();
} }
function openPlaylistPanel() {
var screenWidth = Math.floor(viewport.width - 40);
viewport = AIRTIME.utilities.findViewportDimensions();
widgetHeight = viewport.height - 185;
$lib.width(Math.floor(screenWidth * 0.53));
$pl.show().width(Math.floor(screenWidth * 0.44));
$pl.height(widgetHeight);
$("#pl_edit").hide();
}
//Purpose of this function is to iterate over all playlist elements //Purpose of this function is to iterate over all playlist elements
//and verify whether they can be previewed by the browser or not. If not //and verify whether they can be previewed by the browser or not. If not
//then the playlist element is greyed out //then the playlist element is greyed out
@ -450,9 +462,8 @@ var AIRTIME = (function(AIRTIME){
if ($(this).hasClass('close')) { if ($(this).hasClass('close')) {
var sUrl = baseUrl+"playlist/get-block-info"; var sUrl = baseUrl+"playlist/get-block-info";
mod.disableUI(); mod.disableUI();
$.post(sUrl, {format:"json", id:blockId}, function(json){ $.post(sUrl, {format:"json", id:blockId}, function(data){
$html = ""; $html = "";
var data = $.parseJSON(json);
var isStatic = data.isStatic; var isStatic = data.isStatic;
delete data.type; delete data.type;
if (isStatic) { if (isStatic) {
@ -643,8 +654,7 @@ var AIRTIME = (function(AIRTIME){
obj_id = $('input[id="obj_id"]').val(); obj_id = $('input[id="obj_id"]').val();
url = baseUrl+"Playlist/shuffle"; url = baseUrl+"Playlist/shuffle";
enableLoadingIcon(); enableLoadingIcon();
$.post(url, {format: "json", obj_id: obj_id}, function(data){ $.post(url, {format: "json", obj_id: obj_id}, function(json){
var json = $.parseJSON(data)
if (json.error !== undefined) { if (json.error !== undefined) {
alert(json.error); alert(json.error);
@ -711,7 +721,40 @@ var AIRTIME = (function(AIRTIME){
}); });
$lib.on("click", "#pl_edit", function() {
openPlaylistPanel();
$.ajax( {
url : baseUrl+"usersettings/set-library-screen-settings",
type : "POST",
data : {
settings : {
playlist : true
},
format : "json"
},
dataType : "json"
});
});
$pl.on("click", "#lib_pl_close", function() {
var screenWidth = Math.floor(viewport.width - 40);
$pl.hide();
$lib.width(screenWidth).find("#library_display_length").append($togglePl.show());
$.ajax( {
url : baseUrl+"usersettings/set-library-screen-settings",
type : "POST",
data : {
settings : {
playlist : false
},
format : "json"
},
dataType : "json"
});
});
$('#save_button').live("click", function(event){ $('#save_button').live("click", function(event){
/* Smart blocks: get name, description, and criteria /* Smart blocks: get name, description, and criteria
* Playlists: get name, description * Playlists: get name, description
@ -727,8 +770,7 @@ var AIRTIME = (function(AIRTIME){
enableLoadingIcon(); enableLoadingIcon();
$.post(save_action, $.post(save_action,
{format: "json", data: criteria, name: block_name, description: block_desc, obj_id: obj_id, type: obj_type, modified: lastMod}, {format: "json", data: criteria, name: block_name, description: block_desc, obj_id: obj_id, type: obj_type, modified: lastMod},
function(data){ function(json){
var json = $.parseJSON(data);
if (json.error !== undefined) { if (json.error !== undefined) {
alert(json.error); alert(json.error);
} }
@ -737,7 +779,7 @@ var AIRTIME = (function(AIRTIME){
} }
setModified(json.modified); setModified(json.modified);
if (obj_type == "block") { if (obj_type == "block") {
callback(data, "save"); callback(json, "save");
} else { } else {
$('.success').text($.i18n._('Playlist saved')); $('.success').text($.i18n._('Playlist saved'));
$('.success').show(); $('.success').show();
@ -749,6 +791,12 @@ var AIRTIME = (function(AIRTIME){
} }
); );
}); });
$("#pl-bl-clear-content").live("click", function(event) {
var sUrl = baseUrl+"playlist/empty-content",
oData = {};
playlistRequest(sUrl, oData);
});
} }
function setUpPlaylist() { function setUpPlaylist() {
@ -884,7 +932,9 @@ var AIRTIME = (function(AIRTIME){
}; };
mod.fnEdit = function(id, type, url) { mod.fnEdit = function(id, type, url) {
if ($pl.is(":hidden")) {
openPlaylistPanel();
}
stopAudioPreview(); stopAudioPreview();
$.post(url, $.post(url,
@ -1049,31 +1099,45 @@ var AIRTIME = (function(AIRTIME){
}; };
function setWidgetSize() { function setWidgetSize() {
viewport = AIRTIME.utilities.findViewportDimensions(); viewport = AIRTIME.utilities.findViewportDimensions();
widgetHeight = viewport.height - 185; widgetHeight = viewport.height - 185;
width = Math.floor(viewport.width - 80); width = Math.floor(viewport.width - 80);
var libTableHeight = widgetHeight - 130;
$lib.height(widgetHeight) var libTableHeight = widgetHeight - 130;
.find(".dataTables_scrolling")
.css("max-height", libTableHeight) if (!$pl.is(':hidden')) {
.end() $lib.height(widgetHeight)
.width(Math.floor(width * 0.55)); .find(".dataTables_scrolling")
.css("max-height", libTableHeight)
$pl.height(widgetHeight) .end()
.width(Math.floor(width * 0.45)); .width(Math.floor(width * 0.55));
$pl.height(widgetHeight)
.width(Math.floor(width * 0.45));
} else {
$lib.height(widgetHeight)
.find(".dataTables_scrolling")
.css("max-height", libTableHeight)
.end()
.width(width + 40);
}
} }
mod.onReady = function() { mod.onReady = function() {
$lib = $("#library_content"); $lib = $("#library_content");
$pl = $("#side_playlist"); $pl = $("#side_playlist");
setWidgetSize(); setWidgetSize();
AIRTIME.library.libraryInit(); AIRTIME.library.libraryInit();
AIRTIME.playlist.init(); AIRTIME.playlist.init();
if ($pl.is(':hidden')) {
$lib.find("#library_display_length").append($togglePl.show());
}
$pl.find(".ui-icon-alert").qtip({ $pl.find(".ui-icon-alert").qtip({
content: { content: {
text: $.i18n._("Airtime is unsure about the status of this file. This can happen when the file is on a remote drive that is unaccessible or the file is in a directory that isn't 'watched' anymore.") text: $.i18n._("Airtime is unsure about the status of this file. This can happen when the file is on a remote drive that is unaccessible or the file is in a directory that isn't 'watched' anymore.")

View File

@ -23,7 +23,6 @@ $(document).ready(function() {
function getDataAndPlot(startTimestamp, endTimestamp){ function getDataAndPlot(startTimestamp, endTimestamp){
// get data // get data
$.get(baseUrl+'Listenerstat/get-data', {startTimestamp: startTimestamp, endTimestamp: endTimestamp}, function(data){ $.get(baseUrl+'Listenerstat/get-data', {startTimestamp: startTimestamp, endTimestamp: endTimestamp}, function(data){
data = JSON.parse(data);
out = new Object(); out = new Object();
$.each(data, function(mpName, v){ $.each(data, function(mpName, v){
plotData = new Object(); plotData = new Object();

View File

@ -1,6 +1,6 @@
$(window).load(function(){ $(window).load(function(){
$("#username").focus(); $("#username").focus();
$("#locale").val($.cookie("airtime_locale")!== null?$.cookie("airtime_locale"):'en_CA'); $("#locale").val($.cookie("airtime_locale")!== null?$.cookie("airtime_locale"):$.cookie("default_airtime_locale"));
}); });
$(document).ready(function() { $(document).ready(function() {

View File

@ -1,3 +1,3 @@
function redirectToLogin(){ function redirectToLogin(){
window.location = baseUrl+"/Login" window.location = baseUrl+"Login"
} }

View File

@ -351,7 +351,7 @@ function setupUI() {
* It is only active if playlist is not empty * It is only active if playlist is not empty
*/ */
var plContents = $('#spl_sortable').children(); var plContents = $('#spl_sortable').children();
var shuffleButton = $('button[id="shuffle_button"], button[id="playlist_shuffle_button"]'); var shuffleButton = $('button[id="shuffle_button"], button[id="playlist_shuffle_button"], button[id="pl-bl-clear-content"]');
if (!plContents.hasClass('spl_empty')) { if (!plContents.hasClass('spl_empty')) {
if (shuffleButton.hasClass('ui-state-disabled')) { if (shuffleButton.hasClass('ui-state-disabled')) {
@ -480,9 +480,8 @@ function getCriteriaOptionType(e) {
return criteriaTypes[criteria]; return criteriaTypes[criteria];
} }
function callback(data, type) { function callback(json, type) {
var json = $.parseJSON(data), var dt = $('table[id="library_display"]').dataTable();
dt = $('table[id="library_display"]').dataTable();
if (type == 'shuffle' || type == 'generate') { if (type == 'shuffle' || type == 'generate') {
if (json.error !== undefined) { if (json.error !== undefined) {
@ -560,7 +559,9 @@ function enableLoadingIcon() {
function disableLoadingIcon() { function disableLoadingIcon() {
$("#side_playlist").unblock() $("#side_playlist").unblock()
} }
// We need to know if the criteria value will be a string
// or numeric value in order to populate the modifier
// select list
var criteriaTypes = { var criteriaTypes = {
0 : "", 0 : "",
"album_title" : "s", "album_title" : "s",
@ -569,6 +570,8 @@ var criteriaTypes = {
"composer" : "s", "composer" : "s",
"conductor" : "s", "conductor" : "s",
"copyright" : "s", "copyright" : "s",
"cuein" : "n",
"cueout" : "n",
"artist_name" : "s", "artist_name" : "s",
"encoded_by" : "s", "encoded_by" : "s",
"utime" : "n", "utime" : "n",

View File

@ -108,9 +108,9 @@ $(document).ready(function() {
var data = $('#pref_form').serialize(); var data = $('#pref_form').serialize();
var url = baseUrl+'Preference/index'; var url = baseUrl+'Preference/index';
$.post(url, {format: "json", data: data}, function(data){ $.post(url, {format: "json", data: data}, function(json){
var json = $.parseJSON(data);
$('#content').empty().append(json.html); $('#content').empty().append(json.html);
$.cookie("default_airtime_locale", $('#locale').val(), {path: '/'});
setTimeout(removeSuccessMsg, 5000); setTimeout(removeSuccessMsg, 5000);
showErrorSections(); showErrorSections();
}); });

View File

@ -28,7 +28,7 @@ function rebuildStreamURL(ele){
}else{ }else{
streamurl = "http://"+host+":"+port+"/" streamurl = "http://"+host+":"+port+"/"
} }
div.find("#stream_url").html(streamurl) div.find("#stream_url").text(streamurl)
} }
function restrictOggBitrate(ele, on){ function restrictOggBitrate(ele, on){
var div = ele.closest("div") var div = ele.closest("div")
@ -71,14 +71,13 @@ function showForIcecast(ele){
div.find("#outputMountpoint-element").show() div.find("#outputMountpoint-element").show()
div.find("#outputUser-label").show() div.find("#outputUser-label").show()
div.find("#outputUser-element").show() div.find("#outputUser-element").show()
div.find("select[id$=data-type]").find("option[value='ogg']").attr("disabled",""); div.find("select[id$=data-type]").find("option[value='ogg']").removeAttr("disabled");
} }
function checkLiquidsoapStatus(){ function checkLiquidsoapStatus(){
var url = baseUrl+'Preference/get-liquidsoap-status/format/json'; var url = baseUrl+'Preference/get-liquidsoap-status/format/json';
var id = $(this).attr("id"); var id = $(this).attr("id");
$.post(url, function(json){ $.post(url, function(json_obj){
var json_obj = jQuery.parseJSON(json);
for(var i=0;i<json_obj.length;i++){ for(var i=0;i<json_obj.length;i++){
var obj = json_obj[i]; var obj = json_obj[i];
var id; var id;
@ -103,6 +102,8 @@ function checkLiquidsoapStatus(){
} }
$("#s"+id+"Liquidsoap-error-msg-element").html(html); $("#s"+id+"Liquidsoap-error-msg-element").html(html);
} }
setTimeout(checkLiquidsoapStatus, 2000);
}); });
} }
@ -242,10 +243,10 @@ function setupEventListeners() {
return false; return false;
}) })
setLiveSourceConnectionOverrideListener() setLiveSourceConnectionOverrideListener();
showErrorSections() showErrorSections();
setInterval('checkLiquidsoapStatus()', 1000) checkLiquidsoapStatus();
// qtip for help text // qtip for help text
$(".override_help_icon").qtip({ $(".override_help_icon").qtip({
@ -441,8 +442,7 @@ $(document).ready(function() {
var data = $('#stream_form').serialize(); var data = $('#stream_form').serialize();
var url = baseUrl+'Preference/stream-setting'; var url = baseUrl+'Preference/stream-setting';
$.post(url, {format:"json", data: data}, function(data){ $.post(url, {format:"json", data: data}, function(json){
var json = $.parseJSON(data);
$('#content').empty().append(json.html); $('#content').empty().append(json.html);
setupEventListeners(); setupEventListeners();
setSliderForReplayGain(); setSliderForReplayGain();

View File

@ -37,7 +37,7 @@ function createDateInput(el, onSelect) {
dayNamesMin: i18n_days_short, dayNamesMin: i18n_days_short,
closeText: $.i18n._('Close'), closeText: $.i18n._('Close'),
//showButtonPanel: true, //showButtonPanel: true,
firstDay: weekStart firstDay: calendarPref.weekStart
}); });
} }
@ -324,7 +324,7 @@ function setAddShowEvents() {
dayNamesMin: i18n_days_short, dayNamesMin: i18n_days_short,
closeText: 'Close', closeText: 'Close',
showButtonPanel: true, showButtonPanel: true,
firstDay: weekStart firstDay: calendarPref.weekStart
}); });
form.find('input[name^="add_show_rebroadcast_time"]').timepicker({ form.find('input[name^="add_show_rebroadcast_time"]').timepicker({
amPmText: ['', ''], amPmText: ['', ''],
@ -406,10 +406,9 @@ function setAddShowEvents() {
event.stopPropagation(); event.stopPropagation();
event.preventDefault(); event.preventDefault();
$("#schedule_calendar").removeAttr("style")
.fullCalendar('render');
$("#add-show-form").hide(); $("#add-show-form").hide();
windowResize();
$.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json){ $.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json){
$("#add-show-form") $("#add-show-form")
.empty() .empty()
@ -652,13 +651,14 @@ function windowResize() {
var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 4))/windowWidth*100); var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 4))/windowWidth*100);
var widthPercent = parseInt(calendarWidth)+"%"; var widthPercent = parseInt(calendarWidth)+"%";
$("#schedule_calendar").css("width", widthPercent); $("#schedule_calendar").css("width", widthPercent);
} else {
$("#schedule_calendar").css("width", 98.5+"%");
} }
// 200 px for top dashboard and 50 for padding on main content // 200 px for top dashboard and 50 for padding on main content
// this calculation was copied from schedule.js line 326 // this calculation was copied from schedule.js line 326
var mainHeight = document.documentElement.clientHeight - 200 - 50; var mainHeight = document.documentElement.clientHeight - 200 - 50;
$('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight) $('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight);
$("#schedule_calendar").fullCalendar('render');
} }

View File

@ -28,7 +28,11 @@ function openAddShowForm() {
var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 4))/windowWidth*100); var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 4))/windowWidth*100);
var widthPercent = parseInt(calendarWidth)+"%"; var widthPercent = parseInt(calendarWidth)+"%";
$("#schedule_calendar").css("width", widthPercent); $("#schedule_calendar").css("width", widthPercent);
$("#schedule_calendar").fullCalendar('render');
// 200 px for top dashboard and 50 for padding on main content
// this calculation was copied from schedule.js line 326
var mainHeight = document.documentElement.clientHeight - 200 - 50;
$('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight);
} }
$("#schedule-show-what").show(0, function(){ $("#schedule-show-what").show(0, function(){
$add_show_name = $("#add_show_name"); $add_show_name = $("#add_show_name");
@ -233,55 +237,61 @@ function eventRender(event, element, view) {
} }
//add the record/rebroadcast/soundcloud icons if needed //add the record/rebroadcast/soundcloud icons if needed
if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 1 && event.soundcloud_id === -1) { if (event.record === 1) {
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span>'); if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
} else if ((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 1 && event.soundcloud_id > 0) { if (event.soundcloud_id === -1) {
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon soundcloud"></span>'); $(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span>');
} else if ((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 1 && event.soundcloud_id === -2) { } else if ( event.soundcloud_id > 0) {
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon progress"></span>'); $(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon soundcloud"></span>');
} else if ((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 1 && event.soundcloud_id === -3) { } else if (event.soundcloud_id === -2) {
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon sc-error"></span>'); $(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon progress"></span>');
} } else if (event.soundcloud_id === -3) {
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon sc-error"></span>');
if(view.name === 'month' && event.record === 1 && event.soundcloud_id === -1) { }
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span>'); } else if (view.name === 'month') {
} else if (view.name === 'month' && event.record === 1 && event.soundcloud_id > 0) { if(event.soundcloud_id === -1) {
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon soundcloud"></span>'); $(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span>');
} else if (view.name === 'month' && event.record === 1 && event.soundcloud_id === -2) { } else if (event.soundcloud_id > 0) {
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon progress"></span>'); $(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon soundcloud"></span>');
} else if (view.name === 'month' && event.record === 1 && event.soundcloud_id === -3) { } else if (event.soundcloud_id === -2) {
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon sc-error"></span>'); $(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon progress"></span>');
} } else if (event.soundcloud_id === -3) {
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon sc-error"></span>');
if (view.name === 'agendaDay' || view.name === 'agendaWeek') { }
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
$(element)
.find(".fc-event-time")
.before('<span id="'+event.id+'" class="small-icon show-empty"></span>');
} else if (event.show_partial_filled === true) {
$(element)
.find(".fc-event-time")
.before('<span id="'+event.id+'" class="small-icon show-partial-filled"></span>');
} }
} else if (view.name === 'month') { }
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
$(element) if (event.record === 0 && event.rebroadcast === 0) {
.find(".fc-event-title") if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>'); if (event.show_empty === 1) {
} else if (event.show_partial_filled === true) { $(element)
$(element) .find(".fc-event-time")
.find(".fc-event-title") .before('<span id="'+event.id+'" class="small-icon show-empty"></span>');
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is partially filled")+'" class="small-icon show-partial-filled"></span>'); } else if (event.show_partial_filled === true) {
$(element)
.find(".fc-event-time")
.before('<span id="'+event.id+'" class="small-icon show-partial-filled"></span>');
}
} else if (view.name === 'month') {
if (event.show_empty === 1) {
$(element)
.find(".fc-event-title")
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
} else if (event.show_partial_filled === true) {
$(element)
.find(".fc-event-title")
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is partially filled")+'" class="small-icon show-partial-filled"></span>');
}
} }
} }
//rebroadcast icon //rebroadcast icon
if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.rebroadcast === 1) { if (event.rebroadcast === 1) {
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon rebroadcast"></span>'); if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
} $(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon rebroadcast"></span>');
} else if (view.name === 'month') {
if(view.name === 'month' && event.rebroadcast === 1) { $(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon rebroadcast"></span>');
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon rebroadcast"></span>'); }
} }
} }
@ -326,21 +336,36 @@ function eventResize( event, dayDelta, minuteDelta, revertFunc, jsEvent, ui, vie
}); });
} }
function getFullCalendarEvents(start, end, callback) { function preloadEventFeed () {
var url, start_date, end_date; var url = baseUrl+'Schedule/event-feed-preload';
start_date = makeTimeStamp(start);
end_date = makeTimeStamp(end);
url = baseUrl+'Schedule/event-feed';
var d = new Date(); var d = new Date();
$.post(url, {format: "json", start: start_date, end: end_date, cachep: d.getTime()}, function(json){ $.post(url, {format: "json", cachep: d.getTime()}, function(json){
callback(json.events); calendarEvents = json.events;
createFullCalendar({calendarInit: calendarPref});
}); });
} }
var initialLoad = true;
function getFullCalendarEvents(start, end, callback) {
if (initialLoad) {
initialLoad = false;
callback(calendarEvents);
} else {
var url, start_date, end_date;
start_date = makeTimeStamp(start);
end_date = makeTimeStamp(end);
url = baseUrl+'Schedule/event-feed';
var d = new Date();
$.post(url, {format: "json", start: start_date, end: end_date, cachep: d.getTime()}, function(json){
callback(json.events);
});
}
}
function checkSCUploadStatus(){ function checkSCUploadStatus(){
var url = baseUrl+'Library/get-upload-to-soundcloud-status/format/json'; var url = baseUrl+'Library/get-upload-to-soundcloud-status/format/json';
$("span[class*=progress]").each(function(){ $("span[class*=progress]").each(function(){
@ -351,6 +376,7 @@ function checkSCUploadStatus(){
}else if(json.sc_id == "-3"){ }else if(json.sc_id == "-3"){
$("span[id="+id+"]:not(.recording)").removeClass("progress").addClass("sc-error"); $("span[id="+id+"]:not(.recording)").removeClass("progress").addClass("sc-error");
} }
setTimeout(checkSCUploadStatus, 5000);
}); });
}); });
} }
@ -403,6 +429,7 @@ function getCurrentShow(){
$(this).remove("span[small-icon now-playing]"); $(this).remove("span[small-icon now-playing]");
} }
}); });
setTimeout(getCurrentShow, 5000);
}); });
} }
@ -541,9 +568,10 @@ function alertShowErrorAndReload(){
window.location.reload(); window.location.reload();
} }
preloadEventFeed();
$(document).ready(function(){ $(document).ready(function(){
setInterval( "checkSCUploadStatus()", 5000 ); checkSCUploadStatus();
setInterval( "getCurrentShow()", 5000 ); getCurrentShow();
}); });
var view_name; var view_name;

View File

@ -93,6 +93,8 @@ function checkCalendarSCUploadStatus(){
else if (json.sc_id == "-3") { else if (json.sc_id == "-3") {
span.removeClass("progress").addClass("sc-error"); span.removeClass("progress").addClass("sc-error");
} }
setTimeout(checkCalendarSCUploadStatus, 5000);
} }
function checkSCUploadStatusRequest() { function checkSCUploadStatusRequest() {
@ -328,10 +330,7 @@ function alertShowErrorAndReload(){
} }
$(document).ready(function() { $(document).ready(function() {
$.ajax({ url: baseUrl+"Api/calendar-init/format/json", dataType:"json", success:createFullCalendar checkCalendarSCUploadStatus();
, error:function(jqXHR, textStatus, errorThrown){}});
setInterval(checkCalendarSCUploadStatus, 5000);
$.contextMenu({ $.contextMenu({
selector: 'div.fc-event', selector: 'div.fc-event',
@ -402,7 +401,7 @@ $(document).ready(function() {
oItems.edit.callback = callback; oItems.edit.callback = callback;
} }
} }
//define a content callback. //define a content callback.
if (oItems.content !== undefined) { if (oItems.content !== undefined) {
@ -443,9 +442,11 @@ $(document).ready(function() {
//define a view recorded callback. //define a view recorded callback.
if (oItems.view_recorded !== undefined) { if (oItems.view_recorded !== undefined) {
callback = function() { callback = function() {
document.location.href = oItems.view_recorded.url; $.get(oItems.view_recorded.url, {format: "json"}, function(json){
//in library.js
buildEditMetadataDialog(json);
});
}; };
oItems.view_recorded.callback = callback; oItems.view_recorded.callback = callback;
} }

View File

@ -81,9 +81,20 @@ var AIRTIME = (function(AIRTIME){
return mod.showInstances; return mod.showInstances;
}; };
mod.refresh = function() { mod.refresh = function(schedId) {
mod.resetTimestamp(); mod.resetTimestamp();
oSchedTable.fnDraw();
// once a track plays out we need to check if we can update
// the is_scheduled flag in cc_files
if (schedId > 0) {
$.post(baseUrl+"schedule/update-future-is-scheduled",
{"format": "json", "schedId": schedId}, function(data) {
if (data.redrawLibTable !== undefined && data.redrawLibTable) {
$("#library_content").find("#library_display").dataTable().fnStandingRedraw();
}
});
oSchedTable.fnDraw();
}
}; };
mod.checkSelectButton = function() { mod.checkSelectButton = function() {
@ -251,10 +262,11 @@ var AIRTIME = (function(AIRTIME){
mod.fnItemCallback = function(json) { mod.fnItemCallback = function(json) {
checkError(json); checkError(json);
mod.getSelectedCursors(); mod.getSelectedCursors();
oSchedTable.fnDraw(); oSchedTable.fnDraw();
mod.enableUI(); mod.enableUI();
$("#library_content").find("#library_display").dataTable().fnStandingRedraw();
}; };
mod.getSelectedCursors = function() { mod.getSelectedCursors = function() {
@ -796,7 +808,7 @@ var AIRTIME = (function(AIRTIME){
if(refreshInterval > maxRefreshInterval){ if(refreshInterval > maxRefreshInterval){
refreshInterval = maxRefreshInterval; refreshInterval = maxRefreshInterval;
} }
mod.timeout = setTimeout(mod.refresh, refreshInterval); //need refresh in milliseconds mod.timeout = setTimeout(function() {mod.refresh(aData.id)}, refreshInterval); //need refresh in milliseconds
break; break;
} }
} }
@ -1066,6 +1078,7 @@ var AIRTIME = (function(AIRTIME){
url: url, url: url,
data: {format: "json", id: data.instance}, data: {format: "json", id: data.instance},
success: function(data){ success: function(data){
$("#library_content").find("#library_display").dataTable().fnStandingRedraw();
var oTable = $sbTable.dataTable(); var oTable = $sbTable.dataTable();
oTable.fnDraw(); oTable.fnDraw();
} }

View File

@ -86,7 +86,7 @@ AIRTIME = (function(AIRTIME) {
.end(); .end();
oTable = $('#show_builder_table').dataTable(); oTable = $('#show_builder_table').dataTable();
oTable.fnDraw(); //oTable.fnDraw();
} }
} }
@ -277,12 +277,13 @@ AIRTIME = (function(AIRTIME) {
if (json.update === true) { if (json.update === true) {
oTable.fnDraw(); oTable.fnDraw();
} }
setTimeout(checkScheduleUpdates, 5000);
} }
}); });
} }
//check if the timeline view needs updating. //check if the timeline view needs updating.
setInterval(checkScheduleUpdates, 5 * 1000); //need refresh in milliseconds checkScheduleUpdates();
}; };
mod.onResize = function() { mod.onResize = function() {

View File

@ -66,6 +66,7 @@ function success(data, textStatus, jqXHR){
if (data.status.partitions){ if (data.status.partitions){
generatePartitions(data.status.partitions); generatePartitions(data.status.partitions);
} }
setTimeout(function(){updateStatus(false);}, 5000);
} }
function updateStatus(getDiskInfo){ function updateStatus(getDiskInfo){
@ -75,5 +76,4 @@ function updateStatus(getDiskInfo){
$(document).ready(function() { $(document).ready(function() {
updateStatus(true); updateStatus(true);
setInterval(function(){updateStatus(false);}, 5000);
}); });

View File

@ -189,8 +189,7 @@ $(document).ready(function() {
var data = $('#user_form').serialize(); var data = $('#user_form').serialize();
var url = baseUrl+'User/add-user'; var url = baseUrl+'User/add-user';
$.post(url, {format: "json", data: data}, function(data){ $.post(url, {format: "json", data: data}, function(json){
var json = $.parseJSON(data);
if (json.valid === "true") { if (json.valid === "true") {
$('#content').empty().append(json.html); $('#content').empty().append(json.html);
populateUserTable(); populateUserTable();

View File

@ -0,0 +1,18 @@
// Greek
{
"sProcessing": "Επεξεργασία...",
"sLengthMenu": "Δείξε _MENU_ εγγραφές",
"sZeroRecords": "Δεν βρέθηκαν εγγραφές που να ταιριάζουν",
"sInfo": "Δείχνοντας _START_ εως _END_ από _TOTAL_ εγγραφές",
"sInfoEmpty": "Δείχνοντας 0 εως 0 από 0 εγγραφές",
"sInfoFiltered": "(φιλτραρισμένες από _MAX_ συνολικά εγγραφές)",
"sInfoPostFix": "",
"sSearch": "",
"sUrl": "",
"oPaginate": {
"sFirst": "Πρώτη",
"sPrevious": "Προηγούμενη",
"sNext": "Επόμενη",
"sLast": "Τελευταία"
}
}

View File

@ -0,0 +1,18 @@
//Polish
{
"sProcessing": "Proszę czekać...",
"sLengthMenu": "Pokaż _MENU_ pozycji",
"sZeroRecords": "Nie znaleziono żadnych pasujących indeksów",
"sInfo": "Pozycje od _START_ do _END_ z _TOTAL_ łącznie",
"sInfoEmpty": "Pozycji 0 z 0 dostępnych",
"sInfoFiltered": "(filtrowanie spośród _MAX_ dostępnych pozycji)",
"sInfoPostFix": "",
"sSearch": "",
"sUrl": "",
"oPaginate": {
"sFirst": "Pierwsza",
"sPrevious": "Poprzednia",
"sNext": "Następna",
"sLast": "Ostatnia"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
/* /*
* File: ColReorder.js * File: ColReorder.js
* Version: 1.0.5 * Version: 1.0.8
* CVS: $Id$ * CVS: $Id$
* Description: Controls for column visiblity in DataTables * Description: Allow columns to be reordered in a DataTable
* Author: Allan Jardine (www.sprymedia.co.uk) * Author: Allan Jardine (www.sprymedia.co.uk)
* Created: Wed Sep 15 18:23:29 BST 2010 * Created: Wed Sep 15 18:23:29 BST 2010
* Modified: $Date$ by $Author$ * Modified: $Date$ by $Author$
@ -174,10 +174,10 @@ $.fn.dataTableExt.oApi.fnColReorder = function ( oSettings, iFrom, iTo )
for ( i=0, iLen=iCols ; i<iLen ; i++ ) for ( i=0, iLen=iCols ; i<iLen ; i++ )
{ {
oCol = oSettings.aoColumns[i]; oCol = oSettings.aoColumns[i];
if ( typeof oCol.mDataProp == 'number' ) { if ( typeof oCol.mData == 'number' ) {
oCol.mDataProp = aiInvertMapping[ oCol.mDataProp ]; oCol.mData = aiInvertMapping[ oCol.mData ];
oCol.fnGetData = oSettings.oApi._fnGetObjectDataFn( oCol.mDataProp ); oCol.fnGetData = oSettings.oApi._fnGetObjectDataFn( oCol.mData );
oCol.fnSetData = oSettings.oApi._fnSetObjectDataFn( oCol.mDataProp ); oCol.fnSetData = oSettings.oApi._fnSetObjectDataFn( oCol.mData );
} }
} }
@ -274,13 +274,12 @@ $.fn.dataTableExt.oApi.fnColReorder = function ( oSettings, iFrom, iTo )
} }
/* /* Fire an event so other plug-ins can update */
* Any extra operations for the other plug-ins $(oSettings.oInstance).trigger( 'column-reorder', [ oSettings, {
*/ "iFrom": iFrom,
if ( typeof ColVis != 'undefined' ) "iTo": iTo,
{ "aiInvertMapping": aiInvertMapping
ColVis.fnRebuild( oSettings.oInstance ); } ] );
}
if ( typeof oSettings.oInstance._oPluginFixedHeader != 'undefined' ) if ( typeof oSettings.oInstance._oPluginFixedHeader != 'undefined' )
{ {
@ -295,10 +294,10 @@ $.fn.dataTableExt.oApi.fnColReorder = function ( oSettings, iFrom, iTo )
* ColReorder provides column visiblity control for DataTables * ColReorder provides column visiblity control for DataTables
* @class ColReorder * @class ColReorder
* @constructor * @constructor
* @param {object} DataTables object * @param {object} DataTables settings object
* @param {object} ColReorder options * @param {object} ColReorder options
*/ */
ColReorder = function( oTable, oOpts ) ColReorder = function( oDTSettings, oOpts )
{ {
/* Santiy check that we are a new instance */ /* Santiy check that we are a new instance */
if ( !this.CLASS || this.CLASS != "ColReorder" ) if ( !this.CLASS || this.CLASS != "ColReorder" )
@ -401,9 +400,12 @@ ColReorder = function( oTable, oOpts )
/* Constructor logic */ /* Constructor logic */
this.s.dt = oTable.fnSettings(); this.s.dt = oDTSettings.oInstance.fnSettings();
this._fnConstruct(); this._fnConstruct();
/* Add destroy callback */
oDTSettings.oApi._fnCallbackReg(oDTSettings, 'aoDestroyCallback', jQuery.proxy(this._fnDestroy, this), 'ColReorder');
/* Store the instance for later use */ /* Store the instance for later use */
ColReorder.aoInstances.push( this ); ColReorder.aoInstances.push( this );
return this; return this;
@ -527,7 +529,7 @@ ColReorder.prototype = {
{ {
if ( a.length != this.s.dt.aoColumns.length ) if ( a.length != this.s.dt.aoColumns.length )
{ {
this.s.dt.oInstance.oApi._fnLog( oDTSettings, 1, "ColReorder - array reorder does not "+ this.s.dt.oInstance.oApi._fnLog( this.s.dt, 1, "ColReorder - array reorder does not "+
"match known number of columns. Skipping." ); "match known number of columns. Skipping." );
return; return;
} }
@ -611,8 +613,8 @@ ColReorder.prototype = {
{ {
var that = this; var that = this;
$(nTh).bind( 'mousedown.ColReorder', function (e) { $(nTh).bind( 'mousedown.ColReorder', function (e) {
e.preventDefault();
that._fnMouseDown.call( that, e, nTh ); that._fnMouseDown.call( that, e, nTh );
return false;
} ); } );
}, },
@ -812,7 +814,7 @@ ColReorder.prototype = {
} }
$('thead tr:eq(0)', this.dom.drag).each( function () { $('thead tr:eq(0)', this.dom.drag).each( function () {
$('th:not(:eq('+that.s.mouse.targetIndex+'))', this).remove(); $('th', this).eq(that.s.mouse.targetIndex).siblings().remove();
} ); } );
$('tr', this.dom.drag).height( $('tr:eq(0)', that.s.dt.nTHead).height() ); $('tr', this.dom.drag).height( $('tr:eq(0)', that.s.dt.nTHead).height() );
@ -845,6 +847,29 @@ ColReorder.prototype = {
document.body.appendChild( this.dom.pointer ); document.body.appendChild( this.dom.pointer );
document.body.appendChild( this.dom.drag ); document.body.appendChild( this.dom.drag );
},
/**
* Clean up ColReorder memory references and event handlers
* @method _fnDestroy
* @returns void
* @private
*/
"_fnDestroy": function ()
{
for ( var i=0, iLen=ColReorder.aoInstances.length ; i<iLen ; i++ )
{
if ( ColReorder.aoInstances[i] === this )
{
ColReorder.aoInstances.splice( i, 1 );
break;
}
}
$(this.s.dt.nTHead).find( '*' ).unbind( '.ColReorder' );
this.s.dt.oInstance._oPluginColReorder = null;
this.s = null;
} }
}; };
@ -914,7 +939,7 @@ ColReorder.prototype.CLASS = "ColReorder";
* @type String * @type String
* @default As code * @default As code
*/ */
ColReorder.VERSION = "1.0.5"; ColReorder.VERSION = "1.0.8";
ColReorder.prototype.VERSION = ColReorder.VERSION; ColReorder.prototype.VERSION = ColReorder.VERSION;
@ -930,7 +955,7 @@ ColReorder.prototype.VERSION = ColReorder.VERSION;
*/ */
if ( typeof $.fn.dataTable == "function" && if ( typeof $.fn.dataTable == "function" &&
typeof $.fn.dataTableExt.fnVersionCheck == "function" && typeof $.fn.dataTableExt.fnVersionCheck == "function" &&
$.fn.dataTableExt.fnVersionCheck('1.9.0') ) $.fn.dataTableExt.fnVersionCheck('1.9.3') )
{ {
$.fn.dataTableExt.aoFeatures.push( { $.fn.dataTableExt.aoFeatures.push( {
"fnInit": function( oDTSettings ) { "fnInit": function( oDTSettings ) {
@ -938,7 +963,7 @@ if ( typeof $.fn.dataTable == "function" &&
if ( typeof oTable._oPluginColReorder == 'undefined' ) { if ( typeof oTable._oPluginColReorder == 'undefined' ) {
var opts = typeof oDTSettings.oInit.oColReorder != 'undefined' ? var opts = typeof oDTSettings.oInit.oColReorder != 'undefined' ?
oDTSettings.oInit.oColReorder : {}; oDTSettings.oInit.oColReorder : {};
oTable._oPluginColReorder = new ColReorder( oDTSettings.oInstance, opts ); oTable._oPluginColReorder = new ColReorder( oDTSettings, opts );
} else { } else {
oTable.oApi._fnLog( oDTSettings, 1, "ColReorder attempted to initialise twice. Ignoring second" ); oTable.oApi._fnLog( oDTSettings, 1, "ColReorder attempted to initialise twice. Ignoring second" );
} }
@ -951,7 +976,7 @@ if ( typeof $.fn.dataTable == "function" &&
} }
else else
{ {
alert( "Warning: ColReorder requires DataTables 1.9.0 or greater - www.datatables.net/download"); alert( "Warning: ColReorder requires DataTables 1.9.3 or greater - www.datatables.net/download");
} }
})(jQuery, window, document); })(jQuery, window, document);

View File

@ -187,7 +187,7 @@
label = $.i18n._("kbps"); label = $.i18n._("kbps");
} else if (th.attr('id') == "utime" || th.attr('id') == "mtime" || th.attr('id') == "lptime") { } else if (th.attr('id') == "utime" || th.attr('id') == "mtime" || th.attr('id') == "lptime") {
label = $.i18n._("yyyy-mm-dd"); label = $.i18n._("yyyy-mm-dd");
} else if (th.attr('id') == "length") { } else if (th.attr('id') == "length" || th.attr('id') == "cuein" || th.attr('id') == "cueout") {
label = $.i18n._("hh:mm:ss.t"); label = $.i18n._("hh:mm:ss.t");
} else if (th.attr('id') == "sample_rate") { } else if (th.attr('id') == "sample_rate") {
label = $.i18n._("kHz"); label = $.i18n._("kHz");

View File

@ -0,0 +1,27 @@
//Greek
plupload.addI18n({
'Select files' : $.i18n._('Select files'),
'Add files to the upload queue and click the start button.' : $.i18n._('Add files to the upload queue and click the start button.'),
'Filename' : $.i18n._('Filename'),
'Status' : $.i18n._('Status'),
'Size' : $.i18n._('Size'),
'Add files' : $.i18n._('Add files'),
'Stop current upload' : $.i18n._('Stop current upload'),
'Start uploading queue' : $.i18n._('Start uploading queue'),
'Uploaded %d/%d files': $.i18n._('Uploaded %d/%d files'),
'N/A' : $.i18n._('N/A'),
'Drag files here.' : $.i18n._('Drag files here.'),
'File extension error.': $.i18n._('File extension error.'),
'File size error.': $.i18n._('File size error.'),
'Init error.': $.i18n._('Init error.'),
'HTTP Error.': $.i18n._('HTTP Error.'),
'Security error.': $.i18n._('Security error.'),
'Generic error.': $.i18n._('Generic error.'),
'IO error.': $.i18n._('IO error.'),
'Stop Upload': $.i18n._('Stop Upload'),
'Add Files': $.i18n._('Add Files'),
'Start Upload': $.i18n._('Start Upload'),
'Start upload': $.i18n._('Start upload'),
'%d files queued': $.i18n._('%d files queued'),
"Error: Invalid file extension: " : $.i18n._("Error: Invalid file extension: ")
});

View File

@ -0,0 +1,27 @@
//Polish
plupload.addI18n({
'Select files' : $.i18n._('Select files'),
'Add files to the upload queue and click the start button.' : $.i18n._('Add files to the upload queue and click the start button.'),
'Filename' : $.i18n._('Filename'),
'Status' : $.i18n._('Status'),
'Size' : $.i18n._('Size'),
'Add files' : $.i18n._('Add files'),
'Stop current upload' : $.i18n._('Stop current upload'),
'Start uploading queue' : $.i18n._('Start uploading queue'),
'Uploaded %d/%d files': $.i18n._('Uploaded %d/%d files'),
'N/A' : $.i18n._('N/A'),
'Drag files here.' : $.i18n._('Drag files here.'),
'File extension error.': $.i18n._('File extension error.'),
'File size error.': $.i18n._('File size error.'),
'Init error.': $.i18n._('Init error.'),
'HTTP Error.': $.i18n._('HTTP Error.'),
'Security error.': $.i18n._('Security error.'),
'Generic error.': $.i18n._('Generic error.'),
'IO error.': $.i18n._('IO error.'),
'Stop Upload': $.i18n._('Stop Upload'),
'Add Files': $.i18n._('Add Files'),
'Start Upload': $.i18n._('Start Upload'),
'Start upload': $.i18n._('Start upload'),
'%d files queued': $.i18n._('%d files queued'),
"Error: Invalid file extension: " : $.i18n._("Error: Invalid file extension: ")
});

View File

@ -1,6 +1,20 @@
2.3.1 - March 19th, 2013
* Bug fixes
* Security fixes with running unescaped shell commands
* Fix backend services not coming back online if RabbitMQ crashed and
then restarted
* Fix uninstall not properly cleaning system
* Improved Services watchdog (test whether Services are running and
responding, not just running)
* Much faster library import (Silan analyzer runs in background)
* Fixed zombie process sometimes being created
* Other
* Upgrade to Mutagen (tag reader) 1.21
2.3.0 - Jan 21st, 2013 2.3.0 - Jan 21st, 2013
* New features * New features
* Localization (Brazilian, Chinese, Czech, English, French, German, Italian, Korean, Portugese, Russian, Spanish) * Localization (Chinese, Czech, English, French, German, Italian, Korean,
Portuguese, Russian, Spanish)
* User management page for non-admin users * User management page for non-admin users
* Listener statistics (Icecast/Shoutcast) * Listener statistics (Icecast/Shoutcast)
* Airtime no longer requires Apache document root * Airtime no longer requires Apache document root

17
debian/changelog vendored
View File

@ -1,8 +1,21 @@
airtime (2.4.0-1) unstable; urgency=low
* Nightly development snapshot of Airtime 2.4.x series
-- Daniel James <daniel@64studio.com> Tue, 19 Mar 2013 16:39:23 +0000
airtime (2.3.0-2) unstable; urgency=low
* Don't run the airtime-install script if the user has chosen not to
set up Apache
-- Daniel James <daniel@64studio.com> Tue, 19 Mar 2013 16:39:23 +0000
airtime (2.3.0-1) unstable; urgency=low airtime (2.3.0-1) unstable; urgency=low
* Nightly development snapshot of Airtime 2.3.x * Upstream 2.3.0 release
-- Daniel James <daniel@64studio.com> Tue, 22 Jan 2013 11:44:57 +0000 -- Daniel James <daniel@64studio.com> Tue, 12 Feb 2013 11:44:57 +0000
airtime (2.2.1-1) unstable; urgency=low airtime (2.2.1-1) unstable; urgency=low

4
debian/control vendored
View File

@ -41,7 +41,7 @@ Depends: apache2,
pwgen, pwgen,
python, python,
rabbitmq-server, rabbitmq-server,
silan, silan (>= 0.3.1~),
sudo, sudo,
sysv-rc, sysv-rc,
tar (>= 1.22), tar (>= 1.22),
@ -49,7 +49,7 @@ Depends: apache2,
vorbis-tools, vorbis-tools,
zendframework | libzend-framework-php, zendframework | libzend-framework-php,
${misc:Depends} ${misc:Depends}
Recommends: icecast2 Recommends: icecast2, php-apc
Suggests: airtime-audio-samples, Suggests: airtime-audio-samples,
alsa-utils alsa-utils
Description: open radio software for scheduling and remote station management. Description: open radio software for scheduling and remote station management.

119
debian/postinst vendored
View File

@ -1,10 +1,14 @@
#!/bin/bash #!/bin/bash
#postinst script for airtime #postinst script for airtime
set -x set -e
. /usr/share/debconf/confmodule . /usr/share/debconf/confmodule
if [ "$DPKG_DEBUG" = "developer" ]; then
set -x
fi
wwwdir="/usr/share/airtime" wwwdir="/usr/share/airtime"
tmpdir="/var/lib/airtime/tmp" tmpdir="/var/lib/airtime/tmp"
configdir="/etc/airtime" configdir="/etc/airtime"
@ -12,7 +16,7 @@ includefile="${configdir}/apache.conf"
a2tplfile="${configdir}/apache.vhost.tpl" a2tplfile="${configdir}/apache.vhost.tpl"
phpinifile="${configdir}/airtime.ini" phpinifile="${configdir}/airtime.ini"
OLDVERSION="$2" OLDVERSION="$2"
NEWVERSION="2.3.0" NEWVERSION="2.4.0"
case "$1" in case "$1" in
configure|reconfigure) configure|reconfigure)
@ -20,39 +24,30 @@ case "$1" in
webserver="apache2" webserver="apache2"
php="php5" php="php5"
# clean up previous configurations
if [ -L /etc/$webserver/conf.d/airtime.conf ]; then
rm -f /etc/$webserver/conf.d/airtime.conf
fi
if [ -f /etc/$webserver/sites-available/airtime-vhost ]; then
a2dissite airtime-vhost
fi
# this file in 1.8.2 is a directory path in 1.9.3 # this file in 1.8.2 is a directory path in 1.9.3
if [ -f /var/www/airtime/utils/airtime-import ]; then if [ -f /var/www/airtime/utils/airtime-import ]; then
rm -f /var/www/airtime/utils/airtime-import rm -f /var/www/airtime/utils/airtime-import
fi fi
# APACHE config # do we set up a virtual host?
echo "Setting up apache2..."
# create the document root if it doesn't exist
if [ ! -d $wwwdir/public/ ]; then
install -d -m755 $wwwdir/public/
fi
# set up the virtual host
db_get airtime/apache-setup db_get airtime/apache-setup
if [ "$RET" == "system-wide (all vhosts)" ]; then APACHESETUP=$RET
if [ ! -d /etc/$webserver/conf.d/ ]; then if [ "${APACHESETUP}" == "no thanks" ]; then
install -d -m755 /etc/$webserver/conf.d/ echo "Not setting up ${webserver} and ${php}..."
fi
if [ ! -e /etc/$webserver/conf.d/airtime.conf ]; then elif [ "${APACHESETUP}" == "dedicated v-host" ]; then
ln -s ${includefile} /etc/$webserver/conf.d/airtime.conf echo "Setting up ${webserver}..."
# create the document root if it doesn't exist
if [ ! -d $wwwdir/public/ ]; then
install -d -m755 $wwwdir/public/
fi
# temporarily disable an existing virtual host
if [ -f /etc/$webserver/sites-available/airtime-vhost ]; then
a2dissite airtime-vhost
fi fi
elif [ "$RET" == "dedicated v-host" ]; then
db_get airtime/apache-servername db_get airtime/apache-servername
SN=$RET SN=$RET
db_get airtime/apache-serveradmin db_get airtime/apache-serveradmin
@ -69,30 +64,49 @@ case "$1" in
if [ $RETVAL -eq 0 ]; then if [ $RETVAL -eq 0 ]; then
a2ensite airtime-vhost a2ensite airtime-vhost
fi fi
fi
# enable the rewrite module # insert a specific hostname, if provided, into API configuration
command -v a2enmod > /dev/null if [ "${SN}" != "localhost" ]; then
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
a2enmod rewrite
fi
# remove the default site, if requested to # new installs
db_get airtime/apache-deldefault if [ -f /var/lib/airtime/tmp/airtime_mvc/build/airtime.conf -a -f /var/lib/airtime/tmp/python_apps/api_clients/api_client.cfg ]; then
if [ "$RET" == "remove default" ]; then sed -i "s/base_url = localhost/base_url = ${SN}/" /var/lib/airtime/tmp/airtime_mvc/build/airtime.conf
if [ -f /etc/apache2/sites-available/default ]; then sed -i "s/host = 'localhost'/host = '${SN}'/" /var/lib/airtime/tmp/python_apps/api_clients/api_client.cfg
a2dissite default fi
# upgrades
if [ -f /etc/airtime/airtime.conf -a -f /etc/airtime/api_client.cfg ]; then
sed -i "s/base_url = localhost/base_url = ${SN}/" /etc/airtime/airtime.conf
sed -i "s/host = 'localhost'/host = '${SN}'/" /etc/airtime/api_client.cfg
fi
fi fi
fi
# PHP config # enable the rewrite module
echo "Configuring php5..." command -v a2enmod > /dev/null
if [ ! -d /etc/$php/conf.d/ ]; then RETVAL=$?
install -d -m755 /etc/$php/conf.d/ if [ $RETVAL -eq 0 ]; then
fi a2enmod rewrite
if [ ! -e /etc/$php/conf.d/airtime.ini ]; then fi
ln -s ${phpinifile} /etc/$php/conf.d/airtime.ini
# remove the default site, if requested to
db_get airtime/apache-deldefault
if [ "$RET" == "remove default" ]; then
if [ -f /etc/apache2/sites-available/default ]; then
a2dissite default
fi
fi
# PHP config
echo "Configuring php5..."
if [ ! -d /etc/$php/conf.d/ ]; then
install -d -m755 /etc/$php/conf.d/
fi
if [ ! -e /etc/$php/conf.d/airtime.ini ]; then
ln -s ${phpinifile} /etc/$php/conf.d/airtime.ini
fi
# restart apache
invoke-rc.d apache2 restart
fi fi
# XXX ICECAST XXX # XXX ICECAST XXX
@ -186,9 +200,6 @@ case "$1" in
echo "The rabbitmq-server package does not appear to be installed on this server." echo "The rabbitmq-server package does not appear to be installed on this server."
fi fi
# restart apache
invoke-rc.d apache2 restart
# fix the Liquidsoap symlink if it doesn't point to standard location # fix the Liquidsoap symlink if it doesn't point to standard location
if [ -h /usr/bin/airtime-liquidsoap ]; then if [ -h /usr/bin/airtime-liquidsoap ]; then
SYMLINK_TARGET=`readlink /usr/bin/airtime-liquidsoap` SYMLINK_TARGET=`readlink /usr/bin/airtime-liquidsoap`
@ -214,8 +225,12 @@ case "$1" in
echo "Reconfiguration complete." echo "Reconfiguration complete."
else else
if [ -n "$OLDVERSION" ] && [[ "${OLDVERSION:0:3}" < "1.9" ]]; then if [ -n "$OLDVERSION" ] && [[ "${OLDVERSION:0:3}" < "2.1" ]]; then
echo "Upgrades from Airtime versions before 1.9.0 are not supported. Please back up your files and perform a clean install." echo "Upgrades from Airtime versions before 2.1.0 are not supported. Please back up your files and perform a clean install."
elif [ "${APACHESETUP}" == "no thanks" ]; then
echo "Please run the ${tmpdir}/install_minimal/airtime-install script after you have set up the web server."
else else
mkdir -p /var/log/airtime mkdir -p /var/log/airtime

View File

@ -2,6 +2,9 @@
# #
# Auto install script for airtime on Ubuntu # Auto install script for airtime on Ubuntu
# #
# NGINX changes are contributed by Eugene MechanisM
# Link to the post:
# http://forum.sourcefabric.org/discussion/13563/first-step-to-run-airtime-via-nginx-based-on-airtime-2.0-beta-files
exec > >(tee install_log.txt) exec > >(tee install_log.txt)
exec 2>&1 exec 2>&1
@ -11,6 +14,8 @@ if [ "$(id -u)" != "0" ]; then
exit 1 exit 1
fi fi
server="$1"
#Current dir #Current dir
# Absolute path to this script, e.g. /home/user/bin/foo.sh # Absolute path to this script, e.g. /home/user/bin/foo.sh
SCRIPT=`readlink -f $0` SCRIPT=`readlink -f $0`
@ -48,7 +53,7 @@ fi
apt-get update apt-get update
# Updated package list # Updated package list
apt-get -y --force-yes install tar gzip curl apache2 php5-pgsql libapache2-mod-php5 \ apt-get -y --force-yes install tar gzip curl php5-pgsql \
php-pear php5-gd postgresql odbc-postgresql python libsoundtouch-ocaml \ php-pear php5-gd postgresql odbc-postgresql python libsoundtouch-ocaml \
libtaglib-ocaml libao-ocaml libmad-ocaml ecasound \ libtaglib-ocaml libao-ocaml libmad-ocaml ecasound \
libesd0 libportaudio2 libsamplerate0 rabbitmq-server patch \ libesd0 libportaudio2 libsamplerate0 rabbitmq-server patch \
@ -56,11 +61,11 @@ php5-curl mpg123 monit python-virtualenv multitail libcamomile-ocaml-data \
libpulse0 vorbis-tools lsb-release lsof sudo mp3gain vorbisgain flac vorbis-tools \ libpulse0 vorbis-tools lsb-release lsof sudo mp3gain vorbisgain flac vorbis-tools \
pwgen libfaad2 pwgen libfaad2
#install packages with --force-yes option (this is useful in the case #install packages with --force-yes option (this is useful in the case
#of Debian, where these packages are unauthorized) #of Debian, where these packages are unauthorized)
apt-get -y --force-yes install libmp3lame-dev lame icecast2 apt-get -y --force-yes install libmp3lame-dev lame icecast2
#Debian Squeeze only has zendframework package. Newer versions of Ubuntu have zend-framework package. #Debian Squeeze only has zendframework package. Newer versions of Ubuntu have zend-framework package.
#Ubuntu Lucid has both zendframework and zend-framework. Difference appears to be that zendframework is for #Ubuntu Lucid has both zendframework and zend-framework. Difference appears to be that zendframework is for
#1.10 and zend-framework is 1.11 #1.10 and zend-framework is 1.11
@ -70,32 +75,61 @@ else
apt-get -y --force-yes install libzend-framework-php apt-get -y --force-yes install libzend-framework-php
fi fi
#get the "timeout" unix command
if [ "$code" = "lucid" ]; then if [ "$code" = "lucid" ]; then
apt-get -y --force-yes install timeout apt-get -y --force-yes install timeout
else else
apt-get -y --force-yes install coreutils apt-get -y --force-yes install coreutils
fi fi
#Install Sourcefabric's custom Liquidsoap debian package #Install Sourcefabric's custom Liquidsoap debian package
apt-get -y --force-yes install sourcefabric-keyring apt-get -y --force-yes install sourcefabric-keyring
apt-get -y --force-yes install liquidsoap apt-get -y --force-yes install liquidsoap
apt-get -y --force-yes install silan
if [ "$server" = "nginx" ]; then
apt-get -y --force-yes install nginx php5-fpm
# NGINX Config File
echo "----------------------------------------------------"
echo "2.1 NGINX Config File"
echo "----------------------------------------------------"
if [ ! -f /etc/nginx/sites-available/airtime ]; then
cp $SCRIPTPATH/../nginx/airtime-vhost /etc/nginx/sites-available/airtime
ln -s /etc/nginx/sites-available/airtime /etc/nginx/sites-enabled/airtime
service nginx reload
else
echo "NGINX config for Airtime already exists..."
fi
# Apache Config File # php-fpm Airtime pool file
echo "----------------------------------------------------" echo "----------------------------------------------------"
echo "2. Apache Config File" echo "2.2 Airtime php pool file"
echo "----------------------------------------------------" echo "----------------------------------------------------"
if [ ! -f /etc/apache2/sites-available/airtime ]; then if [ ! -f /etc/php5/fpm/pool.d/airtime.conf ]; then
cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/airtime cp $SCRIPTPATH/../php5-fpm/airtime.conf /etc/php5/fpm/pool.d/airtime.conf
a2dissite default service php5-fpm reload
a2ensite airtime else
a2enmod rewrite php5 echo "Airtime php pool file already exists..."
service apache2 restart fi
else else
echo "Apache config for Airtime already exists..." apt-get -y --force-yes install apache2 libapache2-mod-php5
# Apache Config File
echo "----------------------------------------------------"
echo "2. Apache Config File"
echo "----------------------------------------------------"
if [ ! -f /etc/apache2/sites-available/airtime ]; then
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
fi fi
# Enable Icecast # Enable Icecast
echo "----------------------------------------------------" echo "----------------------------------------------------"
echo "3. Enable Icecast" echo "3. Enable Icecast"

View File

@ -1,130 +1,10 @@
#!/bin/bash -e #!/bin/bash
# # Auto install script for airtime + nginx
# Auto install script for airtime on Ubuntu
#
# NGINX changes are contributed by Eugene MechanisM
# Link to the post:
# http://forum.sourcefabric.org/discussion/13563/first-step-to-run-airtime-via-nginx-based-on-airtime-2.0-beta-files
exec > >(tee install_log.txt)
exec 2>&1
if [ "$(id -u)" != "0" ]; then
echo "Please run as root user."
exit 1
fi
#Current dir
# Absolute path to this script, e.g. /home/user/bin/foo.sh # Absolute path to this script, e.g. /home/user/bin/foo.sh
SCRIPT=`readlink -f $0` SCRIPT=`readlink -f $0`
# Absolute path this script is in, thus /home/user/bin # Absolute path this script is in, thus /home/user/bin
SCRIPTPATH=`dirname $SCRIPT` SCRIPTPATH=`dirname $SCRIPT`
#Prerequisite $SCRIPTPATH/airtime-full-install nginx
echo "----------------------------------------------------"
echo " 1. Install Packages"
echo "----------------------------------------------------"
dist=`lsb_release -is`
code=`lsb_release -cs`
#enable squeeze backports to get lame packages
if [ "$dist" = "Debian" -a "$code" = "squeeze" ]; then
grep "deb http://backports.debian.org/debian-backports squeeze-backports main" /etc/apt/sources.list
if [ "$?" -ne "0" ]; then
echo "deb http://backports.debian.org/debian-backports squeeze-backports main" >> /etc/apt/sources.list
fi
fi
apt-get update
# Updated package list
apt-get -y --force-yes install tar gzip curl nginx php5-pgsql php5-fpm \
php-pear php5-gd postgresql odbc-postgresql python libsoundtouch-ocaml \
libtaglib-ocaml libao-ocaml libmad-ocaml ecasound \
libesd0 libportaudio2 libsamplerate0 rabbitmq-server patch \
php5-curl mpg123 monit python-virtualenv multitail libcamomile-ocaml-data \
libpulse0 vorbis-tools lsb-release lsof sudo mp3gain vorbisgain flac vorbis-tools \
pwgen libfaad2
#install packages with --force-yes option (this is useful in the case
#of Debian, where these packages are unauthorized)
apt-get -y --force-yes install libmp3lame-dev lame icecast2
#Debian Squeeze only has zendframework package. Newer versions of Ubuntu have zend-framework package.
#Ubuntu Lucid has both zendframework and zend-framework. Difference appears to be that zendframework is for
#1.10 and zend-framework is 1.11
if [ "$dist" = "Debian" ]; then
apt-get -y install --force-yes zendframework
else
apt-get -y install --force-yes libzend-framework-php
fi
if [ "$code" = "lucid" ]; then
apt-get -y install --force-yes timeout
else
apt-get -y install --force-yes coreutils
fi
# NGINX Config File
echo "----------------------------------------------------"
echo "2.1 NGINX Config File"
echo "----------------------------------------------------"
if [ ! -f /etc/nginx/sites-available/airtime ]; then
cp $SCRIPTPATH/../nginx/airtime-vhost /etc/nginx/sites-available/airtime
ln -s /etc/nginx/sites-available/airtime /etc/nginx/sites-enabled/airtime
service nginx reload
else
echo "NGINX config for Airtime already exists..."
fi
#Install Sourcefabric's custom Liquidsoap debian package
apt-get -y --force-yes install sourcefabric-keyring
apt-get -y --force-yes install liquidsoap
# php-fpm Airtime pool file
echo "----------------------------------------------------"
echo "2.2 Airtime php pool file"
echo "----------------------------------------------------"
if [ ! -f /etc/php5/fpm/pool.d/airtime.conf ]; then
cp $SCRIPTPATH/../php5-fpm/airtime.conf /etc/php5/fpm/pool.d/airtime.conf
service php5-fpm reload
else
echo "Airtime php pool file already exists..."
fi
# Enable Icecast
echo "----------------------------------------------------"
echo "3. Enable Icecast"
echo "----------------------------------------------------"
cd /etc/default/
sed -i 's/ENABLE=false/ENABLE=true/g' icecast2
set +e
service icecast2 start
set -e
echo ""
# Enable Monit
echo "----------------------------------------------------"
echo "4. Enable Monit"
echo "----------------------------------------------------"
cd /etc/default/
sed -i 's/startup=0/startup=1/g' monit
set +e
grep -q "include /etc/monit/conf.d" /etc/monit/monitrc
RETVAL=$?
set -e
if [ $RETVAL -ne 0 ] ; then
mkdir -p /etc/monit/conf.d
echo "include /etc/monit/conf.d/*" >> /etc/monit/monitrc
fi
# Run Airtime Install
echo "----------------------------------------------------"
echo "5. Run Airtime Install"
echo "----------------------------------------------------"
cd $SCRIPTPATH/../../install_minimal
./airtime-install

Some files were not shown because too many files have changed in this diff Show More