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

This commit is contained in:
James 2012-09-18 16:50:57 -04:00
commit 3ecbab3259
5 changed files with 15 additions and 11 deletions

View File

@ -1,9 +1,9 @@
<?php
define('UTYPE_HOST', 'H');
define('UTYPE_ADMIN', 'A');
define('UTYPE_GUEST', 'G');
define('UTYPE_PROGRAM_MANAGER', 'P');
define('UTYPE_HOST' , 'H');
define('UTYPE_ADMIN' , 'A');
define('UTYPE_GUEST' , 'G');
define('UTYPE_PROGRAM_MANAGER' , 'P');
class Application_Model_User
{

View File

@ -17,12 +17,12 @@ class BitrateFormatter
public function format()
{
$Kbps = bcdiv($this->_bitrate, 1000, 0);
$kbps = bcdiv($this->_bitrate, 1000, 0);
if ($Kbps == 0) {
if ($kbps == 0) {
return "";
} else {
return "{$Kbps} Kbps";
return "$kbps Kbps";
}
}
}

View File

@ -366,7 +366,7 @@ var AIRTIME = (function(AIRTIME){
//and verify whether they can be previewed by the browser or not. If not
//then the playlist element is greyed out
mod.validatePlaylistElements = function(){
$.each($(".big_play"), function(index, value){
$.each($(".big_play ui-icon-play"), function(index, value){
if ($(value).attr('blockId') === undefined) {
var mime = $(value).attr("data-mime-type");
if (isAudioSupported(mime)) {

View File

@ -255,8 +255,8 @@ function eventRender(event, element, view) {
}
//add scheduled show content empty icon
addIcon = checkEmptyShowStatus(event);
if (!addIcon) {
//addIcon = checkEmptyShowStatus(event);
//if (!addIcon) {
if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
if (event.soundcloud_id === -1) {
@ -282,7 +282,7 @@ function eventRender(event, element, view) {
}
}
}
}
//}
//rebroadcast icon
if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.rebroadcast === 1) {
@ -518,6 +518,7 @@ function addQtipToSCIcons(ele){
* This gets checked when we are deciding if the show-empty icon should be added
* at the beginning of an event render callback.
*/
/*
function checkEmptyShowStatus(e) {
var currDate = new Date();
var endTime;
@ -541,6 +542,7 @@ function checkEmptyShowStatus(e) {
return showOver;
}
}
*/
//Alert the error and reload the page
//this function is used to resolve concurrency issue

View File

@ -257,6 +257,8 @@ def normalized_metadata(md, original_path):
'MDATA_KEY_FILEPATH' : lambda x: os.path.normpath(x),
'MDATA_KEY_BPM' : lambda x: x[0:8],
'MDATA_KEY_MIME' : lambda x: x.replace('audio/vorbis','audio/ogg'),
# Whenever 0 is reported we change it to empty
#'MDATA_KEY_BITRATE' : lambda x: '' if str(x) == '0' else x
}
new_md = remove_whitespace(new_md) # remove whitespace fields