Merge branch 'devel' into cc-1960-internationalize-airtime
Conflicts: airtime_mvc/public/js/airtime/playlist/smart_blockbuilder.js
This commit is contained in:
commit
10b6dd202e
24 changed files with 370 additions and 393 deletions
|
@ -467,9 +467,9 @@ SQL;
|
|||
Logging::info("Adding to block");
|
||||
Logging::info("at position {$pos}");
|
||||
}
|
||||
|
||||
|
||||
foreach ($p_items as $ac) {
|
||||
Logging::info("Adding audio file {$ac}");
|
||||
Logging::info("Adding audio file {$ac[0]}");
|
||||
try {
|
||||
if (is_array($ac) && $ac[1] == 'audioclip') {
|
||||
$res = $this->insertBlockElement($this->buildEntry($ac[0], $pos));
|
||||
|
|
|
@ -450,8 +450,12 @@ SQL;
|
|||
public function unhideFiles()
|
||||
{
|
||||
$files = $this->_dir->getCcFiless();
|
||||
$hid = 0;
|
||||
foreach ($files as $file) {
|
||||
$hid++;
|
||||
$file->setDbHidden(false);
|
||||
$file->save();
|
||||
}
|
||||
Logging::info("unhide '$hid' files");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -206,7 +206,7 @@ class Application_Model_Preference
|
|||
|
||||
$fade = number_format($fade, 2);
|
||||
//fades need 2 leading zeros for DateTime conversion
|
||||
$fade = rtrim(str_pad($fade, 5, "0", STR_PAD_LEFT), "0");
|
||||
$fade = str_pad($fade, 5, "0", STR_PAD_LEFT);
|
||||
|
||||
return $fade;
|
||||
}
|
||||
|
@ -1116,7 +1116,6 @@ class Application_Model_Preference
|
|||
} else {
|
||||
/*For now we just have this hack for debugging. We should not
|
||||
rely on this crappy behaviour in case of failure*/
|
||||
Logging::info("Pref: $pref_param");
|
||||
Logging::warn("Index $x does not exist preferences");
|
||||
Logging::warn("Defaulting to identity and printing preferences");
|
||||
Logging::warn($ds);
|
||||
|
|
|
@ -321,7 +321,7 @@ SQL;
|
|||
ws.description AS file_album_title,
|
||||
ws.length AS file_length,
|
||||
't'::BOOL AS file_exists,
|
||||
NULL as file_mime
|
||||
ws.mime as file_mime
|
||||
SQL;
|
||||
$streamJoin = <<<SQL
|
||||
cc_schedule AS sched
|
||||
|
@ -674,6 +674,12 @@ SQL;
|
|||
$start = self::AirtimeTimeToPypoTime($item["start"]);
|
||||
$end = self::AirtimeTimeToPypoTime($item["end"]);
|
||||
|
||||
list(,,,$start_hour,,) = explode("-", $start);
|
||||
list(,,,$end_hour,,) = explode("-", $end);
|
||||
|
||||
$same_hour = $start_hour == $end_hour;
|
||||
$independent_event = !$same_hour;
|
||||
|
||||
$schedule_item = array(
|
||||
'id' => $media_id,
|
||||
'type' => 'file',
|
||||
|
@ -687,7 +693,7 @@ SQL;
|
|||
'end' => $end,
|
||||
'show_name' => $item["show_name"],
|
||||
'replay_gain' => is_null($item["replay_gain"]) ? "0": $item["replay_gain"],
|
||||
'independent_event' => false
|
||||
'independent_event' => $independent_event,
|
||||
);
|
||||
self::appendScheduleItem($data, $start, $schedule_item);
|
||||
}
|
||||
|
@ -859,6 +865,8 @@ SQL;
|
|||
$data = array();
|
||||
$data["media"] = array();
|
||||
|
||||
//Harbor kick times *MUST* be ahead of schedule events, so that pypo
|
||||
//executes them first.
|
||||
self::createInputHarborKickTimes($data, $range_start, $range_end);
|
||||
self::createScheduledEvents($data, $range_start, $range_end);
|
||||
|
||||
|
|
|
@ -360,7 +360,7 @@ SQL;
|
|||
}
|
||||
|
||||
|
||||
// set hidden falg to true
|
||||
// set hidden flag to true
|
||||
$this->_file->setDbHidden(true);
|
||||
$this->_file->save();
|
||||
|
||||
|
@ -726,7 +726,7 @@ SQL;
|
|||
|
||||
$plTable = "({$plSelect} FROM cc_playlist AS PL LEFT JOIN cc_subjs AS sub ON (sub.id = PL.creator_id))";
|
||||
$blTable = "({$blSelect} FROM cc_block AS BL LEFT JOIN cc_subjs AS sub ON (sub.id = BL.creator_id))";
|
||||
$fileTable = "({$fileSelect} FROM cc_files AS FILES LEFT JOIN cc_subjs AS sub ON (sub.id = FILES.owner_id) WHERE file_exists = 'TRUE')";
|
||||
$fileTable = "({$fileSelect} FROM cc_files AS FILES LEFT JOIN cc_subjs AS sub ON (sub.id = FILES.owner_id) WHERE file_exists = 'TRUE' AND hidden='FALSE')";
|
||||
//$fileTable = "({$fileSelect} FROM cc_files AS FILES WHERE file_exists = 'TRUE')";
|
||||
$streamTable = "({$streamSelect} FROM cc_webstream AS ws LEFT JOIN cc_subjs AS sub ON (sub.id = ws.creator_id))";
|
||||
$unionTable = "({$plTable} UNION {$blTable} UNION {$fileTable} UNION {$streamTable}) AS RESULTS";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue