Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
3ecbab3259
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
define('UTYPE_HOST', 'H');
|
define('UTYPE_HOST' , 'H');
|
||||||
define('UTYPE_ADMIN', 'A');
|
define('UTYPE_ADMIN' , 'A');
|
||||||
define('UTYPE_GUEST', 'G');
|
define('UTYPE_GUEST' , 'G');
|
||||||
define('UTYPE_PROGRAM_MANAGER', 'P');
|
define('UTYPE_PROGRAM_MANAGER' , 'P');
|
||||||
|
|
||||||
class Application_Model_User
|
class Application_Model_User
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,12 +17,12 @@ class BitrateFormatter
|
||||||
|
|
||||||
public function format()
|
public function format()
|
||||||
{
|
{
|
||||||
$Kbps = bcdiv($this->_bitrate, 1000, 0);
|
$kbps = bcdiv($this->_bitrate, 1000, 0);
|
||||||
|
|
||||||
if ($Kbps == 0) {
|
if ($kbps == 0) {
|
||||||
return "";
|
return "";
|
||||||
} else {
|
} else {
|
||||||
return "{$Kbps} Kbps";
|
return "$kbps Kbps";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -366,7 +366,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
//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
|
||||||
mod.validatePlaylistElements = function(){
|
mod.validatePlaylistElements = function(){
|
||||||
$.each($(".big_play"), function(index, value){
|
$.each($(".big_play ui-icon-play"), function(index, value){
|
||||||
if ($(value).attr('blockId') === undefined) {
|
if ($(value).attr('blockId') === undefined) {
|
||||||
var mime = $(value).attr("data-mime-type");
|
var mime = $(value).attr("data-mime-type");
|
||||||
if (isAudioSupported(mime)) {
|
if (isAudioSupported(mime)) {
|
||||||
|
|
|
@ -255,8 +255,8 @@ function eventRender(event, element, view) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//add scheduled show content empty icon
|
//add scheduled show content empty icon
|
||||||
addIcon = checkEmptyShowStatus(event);
|
//addIcon = checkEmptyShowStatus(event);
|
||||||
if (!addIcon) {
|
//if (!addIcon) {
|
||||||
if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
|
if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
|
||||||
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
|
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
|
||||||
if (event.soundcloud_id === -1) {
|
if (event.soundcloud_id === -1) {
|
||||||
|
@ -282,7 +282,7 @@ function eventRender(event, element, view) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
//}
|
||||||
|
|
||||||
//rebroadcast icon
|
//rebroadcast icon
|
||||||
if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.rebroadcast === 1) {
|
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
|
* This gets checked when we are deciding if the show-empty icon should be added
|
||||||
* at the beginning of an event render callback.
|
* at the beginning of an event render callback.
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
function checkEmptyShowStatus(e) {
|
function checkEmptyShowStatus(e) {
|
||||||
var currDate = new Date();
|
var currDate = new Date();
|
||||||
var endTime;
|
var endTime;
|
||||||
|
@ -541,6 +542,7 @@ function checkEmptyShowStatus(e) {
|
||||||
return showOver;
|
return showOver;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
//Alert the error and reload the page
|
//Alert the error and reload the page
|
||||||
//this function is used to resolve concurrency issue
|
//this function is used to resolve concurrency issue
|
||||||
|
|
|
@ -257,6 +257,8 @@ def normalized_metadata(md, original_path):
|
||||||
'MDATA_KEY_FILEPATH' : lambda x: os.path.normpath(x),
|
'MDATA_KEY_FILEPATH' : lambda x: os.path.normpath(x),
|
||||||
'MDATA_KEY_BPM' : lambda x: x[0:8],
|
'MDATA_KEY_BPM' : lambda x: x[0:8],
|
||||||
'MDATA_KEY_MIME' : lambda x: x.replace('audio/vorbis','audio/ogg'),
|
'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
|
new_md = remove_whitespace(new_md) # remove whitespace fields
|
||||||
|
|
Loading…
Reference in New Issue