From 3def58ee2b1d867fc8fc4060c1312cb22d925414 Mon Sep 17 00:00:00 2001 From: Paul Baranowski Date: Wed, 14 Dec 2011 17:59:52 -0500 Subject: [PATCH 1/8] --- --- utils/airtime-user | 34 ---------- utils/airtime-user.php | 148 ----------------------------------------- 2 files changed, 182 deletions(-) delete mode 100755 utils/airtime-user delete mode 100644 utils/airtime-user.php diff --git a/utils/airtime-user b/utils/airtime-user deleted file mode 100755 index b6a30ac17..000000000 --- a/utils/airtime-user +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------------------- -# Copyright (c) 2010 Sourcefabric O.P.S. -# -# This file is part of the Airtime project. -# http://airtime.sourcefabric.org/ -# -# Airtime is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Airtime is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Airtime; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#------------------------------------------------------------------------------- -#------------------------------------------------------------------------------- -# This script creates users in Airtime. -# -# Absolute path to this script -SCRIPT=`readlink -f $0` -# Absolute directory this script is in -SCRIPTPATH=`dirname $SCRIPT` - -invokePwd=$PWD -cd $SCRIPTPATH - -php -q airtime-user.php "$@" || exit 1 diff --git a/utils/airtime-user.php b/utils/airtime-user.php deleted file mode 100644 index 2ac5d3bb5..000000000 --- a/utils/airtime-user.php +++ /dev/null @@ -1,148 +0,0 @@ -\n"; - echo " Add the user or update user information.\n"; - echo " --delete \n"; - echo " Remove the user.\n"; - echo "\n"; -} - -/** - * Ensures that the user is running this PHP script with root - * permissions. If not running with root permissions, causes the - * script to exit. - */ -function exitIfNotRoot() -{ - // Need to check that we are superuser before running this. - if(exec("whoami") != "root"){ - echo "Must be root user.\n"; - exit(1); - } -} - -if (count($argv) != 3) { - printUsage(); - exit; -} - - -$action = null; -switch ($argv[1]) { - case '--addupdate': - $action = "addupdate"; - break; - case '--delete': - $action = "delete"; - break; -} - -$username = $argv[2]; - -if (is_null($action)) { - printUsage(); - exit; -} - -PEAR::setErrorHandling(PEAR_ERROR_RETURN); -$CC_DBC = DB::connect($CC_CONFIG['dsn'], TRUE); -if (PEAR::isError($CC_DBC)) { - die($CC_DBC->getMessage()); -} -$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC); - - -// Check if the user exists -$id = Application_Model_User::GetUserID($username); - -if ($action == "addupdate") { - - if ($id < 0) { - echo "Creating user\n"; - $user = new Application_Model_User(""); - $user->setLogin($username); - } else { - echo "Updating user\n"; - $user = new Application_Model_User($id); - } - - do{ - echo "Enter password (min 6 characters): "; - $line = trim(fgets(fopen("php://stdin","r"))); - }while(strlen($line) < 6); - $user->setPassword($line); - - do{ - echo "Enter first name: "; - $line = trim(fgets(fopen("php://stdin","r"))); - }while(strlen($line) < 1); - $user->setFirstName($line); - - do{ - echo "Enter last name: "; - $line = trim(fgets(fopen("php://stdin","r"))); - }while(strlen($line) < 1); - $user->setLastName($line); - - do{ - echo "Enter user type [(A)dmin|(P)rogram Manager|(D)J|(G)uest]: "; - $line = trim(fgets(fopen("php://stdin","r"))); - } while($line != "A" && $line != "P" && $line != "D" && $line != "G"); - - $types = array("A"=>"A", "P"=>"P", "D"=>"H", "G"=>"G",); - $user->setType($types[$line]); - $user->save(); - -} elseif ($action == "delete") { - if ($id < 0){ - echo "Username not found!\n"; - exit; - } else { - echo "Deleting user\n"; - $user = new Application_Model_User($id); - $user->delete(); - } -} - -function GetAirtimeConf() -{ - $ini = parse_ini_file("/etc/airtime/airtime.conf", true); - - if ($ini === false){ - echo "Error reading /etc/airtime/airtime.conf.".PHP_EOL; - exit; - } - - return $ini; -} From a63d975fce1505d76e3d21930457ef41fbc91f7f Mon Sep 17 00:00:00 2001 From: Yuchen Wang Date: Wed, 4 Jan 2012 17:06:58 -0500 Subject: [PATCH 2/8] CC-2355: Repeating show should default to 'No End' Done --- airtime_mvc/application/forms/AddShowRepeats.php | 1 + 1 file changed, 1 insertion(+) diff --git a/airtime_mvc/application/forms/AddShowRepeats.php b/airtime_mvc/application/forms/AddShowRepeats.php index da8a0d306..ca20c5bae 100644 --- a/airtime_mvc/application/forms/AddShowRepeats.php +++ b/airtime_mvc/application/forms/AddShowRepeats.php @@ -52,6 +52,7 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm $this->addElement('checkbox', 'add_show_no_end', array( 'label' => 'No End?', 'required' => false, + 'checked' => true, )); } From 476484a269ac4fde7c7c153aefc44045c8d12c46 Mon Sep 17 00:00:00 2001 From: Yuchen Wang Date: Wed, 4 Jan 2012 17:08:38 -0500 Subject: [PATCH 3/8] CC-2985: Pop-up metadata box in Playlist Builder does not show Language field Done --- .../views/scripts/library/get-file-meta-data.ajax.phtml | 1 + 1 file changed, 1 insertion(+) diff --git a/airtime_mvc/application/views/scripts/library/get-file-meta-data.ajax.phtml b/airtime_mvc/application/views/scripts/library/get-file-meta-data.ajax.phtml index 2e0bd3864..43af9afcf 100644 --- a/airtime_mvc/application/views/scripts/library/get-file-meta-data.ajax.phtml +++ b/airtime_mvc/application/views/scripts/library/get-file-meta-data.ajax.phtml @@ -15,6 +15,7 @@
Copyright:md["MDATA_KEY_COPYRIGHT"]);?>
Isrc Number:md["MDATA_KEY_ISRC"]);?>
Website:md["MDATA_KEY_URL"]);?>
+
Language:md["MDATA_KEY_LANGUAGE"]);?>
From 0df23305a08006f0b068555b3c7266073a5dd13b Mon Sep 17 00:00:00 2001 From: Yuchen Wang Date: Wed, 4 Jan 2012 17:09:16 -0500 Subject: [PATCH 4/8] CC-2237: Default fade time should be non-zero number of seconds Done --- airtime_mvc/application/forms/GeneralPreferences.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/application/forms/GeneralPreferences.php b/airtime_mvc/application/forms/GeneralPreferences.php index 1514e1460..a3da6f30a 100644 --- a/airtime_mvc/application/forms/GeneralPreferences.php +++ b/airtime_mvc/application/forms/GeneralPreferences.php @@ -11,7 +11,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm $defaultFade = Application_Model_Preference::GetDefaultFade(); if($defaultFade == ""){ - $defaultFade = '00:00:00.000000'; + $defaultFade = '00:00:00.500000'; } //Station name From 1c9b134748caea699f882cb3f5a26966d583828a Mon Sep 17 00:00:00 2001 From: Yuchen Wang Date: Wed, 4 Jan 2012 17:10:14 -0500 Subject: [PATCH 5/8] CC-3183: recorder shows have extra 1ms which cause the now playing to report the show exceeding its time Done --- airtime_mvc/application/models/Nowplaying.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/Nowplaying.php b/airtime_mvc/application/models/Nowplaying.php index b59bb4e6a..95037cb00 100644 --- a/airtime_mvc/application/models/Nowplaying.php +++ b/airtime_mvc/application/models/Nowplaying.php @@ -23,8 +23,9 @@ class Application_Model_Nowplaying $showEnds = $showEndDateTime->format("Y-m-d H:i:s"); $itemStarts = $itemStartDateTime->format("Y-m-d H:i:s"); $itemEnds = $itemEndDateTime->format("Y-m-d H:i:s"); - - $status = ($dbRow['show_ends'] < $dbRow['item_ends']) ? "x" : ""; + + // Allow show to exceed 1 second per CC-3183 + $status = ($showEnds < $itemEnds) ? "x" : ""; $type = "a"; $type .= ($itemEndDateTime->getTimestamp() > $epochNow && $itemStartDateTime->getTimestamp() <= $epochNow) ? "c" : ""; From 722306928bd1fa2f9f5bf3899ecb625c3bcaa55e Mon Sep 17 00:00:00 2001 From: Yuchen Wang Date: Wed, 4 Jan 2012 17:15:15 -0500 Subject: [PATCH 6/8] CC-3114: Show Content Dialog doesn't display total time Done --- .../views/scripts/schedule/show-content-dialog.phtml | 6 ++++++ airtime_mvc/public/js/airtime/schedule/schedule.js | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/views/scripts/schedule/show-content-dialog.phtml b/airtime_mvc/application/views/scripts/schedule/show-content-dialog.phtml index 8fb4346d0..a48a41399 100644 --- a/airtime_mvc/application/views/scripts/schedule/show-content-dialog.phtml +++ b/airtime_mvc/application/views/scripts/schedule/show-content-dialog.phtml @@ -24,4 +24,10 @@ +
+
+ timeFilled; ?> +
+ showLength; ?> +
diff --git a/airtime_mvc/public/js/airtime/schedule/schedule.js b/airtime_mvc/public/js/airtime/schedule/schedule.js index 6cc8858bf..c1e3c1be1 100644 --- a/airtime_mvc/public/js/airtime/schedule/schedule.js +++ b/airtime_mvc/public/js/airtime/schedule/schedule.js @@ -219,7 +219,11 @@ function buildContentDialog(json){ alertShowErrorAndReload(); } var dialog = $(json.dialog); - + + dialog.find("#show_progressbar").progressbar({ + value: json.percentFilled + }); + var viewportwidth; var viewportheight; From 1044881666bce1d0c516763f11490a9461f45f7e Mon Sep 17 00:00:00 2001 From: Yuchen Wang Date: Thu, 5 Jan 2012 10:30:37 -0500 Subject: [PATCH 7/8] CC-3114: Show Content Dialog doesn't display total time Somehow this file didn't get committed... --- airtime_mvc/application/controllers/ScheduleController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index c4afb1622..9895b7d57 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -443,7 +443,10 @@ class ScheduleController extends Zend_Controller_Action "Rebroadcast of show \"$originalShowName\" from " .$originalDateTime->format("l, F jS")." at ".$originalDateTime->format("G:i"); } - $this->view->showContent = $show->getShowListContent(); + $this->view->showLength = $show->getShowLength(); + $this->view->timeFilled = $show->getTimeScheduled(); + $this->view->percentFilled = $show->getPercentScheduled(); + $this->view->showContent = $show->getShowListContent(); $this->view->dialog = $this->view->render('schedule/show-content-dialog.phtml'); unset($this->view->showContent); } From 10d48e86b4ea080638cc9b548e5fcbef16b25087 Mon Sep 17 00:00:00 2001 From: Paul Baranowski Date: Mon, 9 Jan 2012 16:28:46 -0500 Subject: [PATCH 8/8] Updated version number to 2.1.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index ffaf49cf9..1d75366eb 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ PRODUCT_ID=Airtime -PRODUCT_RELEASE=2.0.0 +PRODUCT_RELEASE=2.1.0