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

This commit is contained in:
Naomi Aro 2012-05-02 11:15:20 +02:00
commit c5f9288aab
20 changed files with 80 additions and 69 deletions

View file

@ -909,7 +909,17 @@ class ScheduleController extends Zend_Controller_Action
$duration = $UTCEndDateTime->diff($UTCStartDateTime);
$result = $duration->format('%r%Hh %Im');
$day = intval($duration->format('%d'));
if($day > 0){
$hour = intval($duration->format('%h'));
$min = intval($duration->format('%i'));
$hour += $day * 24;
$hour = min($hour, 99);
$sign = $duration->format('%r');
$result = sprintf('%s%02dh %02dm', $sign, $hour, $min);
}else{
$result = $duration->format('%r%Hh %Im');
}
}catch (Exception $e){
$result = "Invalid Date";
}

View file

@ -45,7 +45,9 @@ class Application_Model_StoredFile {
"mime" => "DbMime",
"md5" => "DbMd5",
"ftype" => "DbFtype",
"language" => "DbLanguage"
"language" => "DbLanguage",
"filepath" => "DbFilepath",
"directory" => "DbDirectory"
);
public function __construct()
@ -223,7 +225,19 @@ class Application_Model_StoredFile {
foreach ($c['user'] as $constant => $value) {
if (preg_match('/^MDATA_KEY/', $constant)) {
if (isset($this->_dbMD[$value])) {
$md[$constant] = $this->getDbColMetadataValue($value);
if ($value == 'filepath') {
$directoryPK = $this->getDbColMetadataValue('directory');
if ($directoryPK == 1) {
$musicDir = Application_Model_MusicDir::getDirByPK($directoryPK);
$md[$constant] = $musicDir->getDirectory() . $this->getDbColMetadataValue($value);
}
else {
$md[$constant] = $this->getDbColMetadataValue($value);
}
}
else {
$md[$constant] = $this->getDbColMetadataValue($value);
}
}
}
}
@ -686,7 +700,7 @@ Logging::log("getting media! - 2");
if($type == "au"){//&& isset( $audioResults )) {
$row['audioFile'] = $row['gunid'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
$row['image'] = '<img src="/css/images/icon_audioclip.png">';
$row['image'] = '<img title="Track preview" src="/css/images/icon_audioclip.png">';
}
else {
$row['image'] = '<img src="/css/images/icon_playlist.png">';

View file

@ -17,6 +17,7 @@
<div><span>Isrc Number:</span><span><?php echo ($this->md["MDATA_KEY_ISRC"]);?></span></div>
<div><span>Website:</span><span><?php echo ($this->md["MDATA_KEY_URL"]);?></span></div>
<div><span>Language:</span><span><?php echo ($this->md["MDATA_KEY_LANGUAGE"]);?></span></div>
<div><span>File Path:</span><span><?php echo ($this->md["MDATA_KEY_FILEPATH"]);?></span></div>
<?php endif; ?>

View file

@ -91,7 +91,7 @@ function updateProgressBarValue(){
songPercentDone = 0;
currentSong = null;
} else {
if (currentSong.media_item_played == true && currentShow.length > 0){
if (currentShow.length > 0){
scheduled_play_line_to_switch.attr("class", "line-to-switch on");
scheduled_play_div.addClass("ready")
scheduled_play_source = true;

View file

@ -414,7 +414,7 @@ var AIRTIME = (function(AIRTIME){
$image = $(nRow).find('td.sb-image');
//check if the file exists.
if (aData.image === true) {
$image.html('<img src="/css/images/icon_audioclip.png"></img>')
$image.html('<img title="Track preview" src="/css/images/icon_audioclip.png"></img>')
.click(function() {
open_show_preview(aData.instance, aData.pos);
return false;