Merge branch '2.4.x' of dev.sourcefabric.org:airtime into 2.4.x
This commit is contained in:
commit
01d16348db
44 changed files with 34420 additions and 34571 deletions
|
@ -62,7 +62,7 @@ class LocaleController extends Zend_Controller_Action
|
||||||
"Deselect all" => _("Deselect all"),
|
"Deselect all" => _("Deselect all"),
|
||||||
"Are you sure you want to delete the selected item(s)?" => _("Are you sure you want to delete the selected item(s)?"),
|
"Are you sure you want to delete the selected item(s)?" => _("Are you sure you want to delete the selected item(s)?"),
|
||||||
"Scheduled" => _("Scheduled"),
|
"Scheduled" => _("Scheduled"),
|
||||||
"Playlist" => _("Playlist"),
|
"Playlist" => _("Playlist / Block"),
|
||||||
"Title" => _("Title"),
|
"Title" => _("Title"),
|
||||||
"Creator" => _("Creator"),
|
"Creator" => _("Creator"),
|
||||||
"Album" => _("Album"),
|
"Album" => _("Album"),
|
||||||
|
|
|
@ -29,24 +29,6 @@ WHERE ends > now() AT TIME ZONE 'UTC'
|
||||||
AND file_id is not null
|
AND file_id is not null
|
||||||
SQL;
|
SQL;
|
||||||
|
|
||||||
/* If an instance id gets passed into this function we need to check
|
|
||||||
* if it is a repeating show. If it is a repeating show, we need to
|
|
||||||
* check for any files scheduled in the future in the linked instances
|
|
||||||
* as well
|
|
||||||
*/
|
|
||||||
if (!is_null($instanceId)) {
|
|
||||||
$excludeIds = array();
|
|
||||||
$ccShow = CcShowInstancesQuery::create()
|
|
||||||
->findPk($instanceId)
|
|
||||||
->getCcShow();
|
|
||||||
if ($ccShow->isLinked()) {
|
|
||||||
foreach ($ccShow->getOtherInstances($instanceId) as $instance) {
|
|
||||||
$excludeIds[] = $instance->getDbId();
|
|
||||||
}
|
|
||||||
$sql .= " AND instance_id IN (".implode(",", $excludeIds).")";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$files = Application_Common_Database::prepareAndExecute( $sql, array());
|
$files = Application_Common_Database::prepareAndExecute( $sql, array());
|
||||||
|
|
||||||
$real_files = array();
|
$real_files = array();
|
||||||
|
|
|
@ -1323,7 +1323,7 @@ SQL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function setIsScheduled($p_scheduleItem, $p_status,
|
public static function setIsScheduled($p_scheduleItem, $p_status,
|
||||||
$p_fileId=null, $instanceId=null) {
|
$p_fileId=null) {
|
||||||
|
|
||||||
if (is_null($p_fileId)) {
|
if (is_null($p_fileId)) {
|
||||||
$fileId = Application_Model_Schedule::GetFileId($p_scheduleItem);
|
$fileId = Application_Model_Schedule::GetFileId($p_scheduleItem);
|
||||||
|
@ -1334,7 +1334,7 @@ SQL;
|
||||||
$updateIsScheduled = false;
|
$updateIsScheduled = false;
|
||||||
|
|
||||||
if (!is_null($fileId) && !in_array($fileId,
|
if (!is_null($fileId) && !in_array($fileId,
|
||||||
Application_Model_Schedule::getAllFutureScheduledFiles($instanceId))) {
|
Application_Model_Schedule::getAllFutureScheduledFiles())) {
|
||||||
$file->_file->setDbIsScheduled($p_status)->save();
|
$file->_file->setDbIsScheduled($p_status)->save();
|
||||||
$updateIsScheduled = true;
|
$updateIsScheduled = true;
|
||||||
}
|
}
|
||||||
|
@ -1344,26 +1344,25 @@ SQL;
|
||||||
|
|
||||||
public static function updatePastFilesIsScheduled()
|
public static function updatePastFilesIsScheduled()
|
||||||
{
|
{
|
||||||
/* Retrieve files that are scheduled in the past OR that belong
|
/* Set the is_scheduled flag to false where it was true in the
|
||||||
* to a show that has ended. We need to check if the show has
|
* past, and where tracks are not scheduled in the future and do
|
||||||
* ended incase a track is overbooked, since that alone will
|
* not belong to a show that has not ended yet. We need to check
|
||||||
* indicate the show is still scheduled in the future
|
* for show end times in case a track is overbooked, which would
|
||||||
|
* indicate it is still scheduled in the future
|
||||||
*/
|
*/
|
||||||
$sql = <<<SQL
|
$sql = <<<SQL
|
||||||
SELECT s.file_id, s.instance_id FROM cc_schedule AS s
|
UPDATE cc_files SET is_scheduled = false
|
||||||
LEFT JOIN cc_show_instances AS i
|
WHERE is_scheduled = true
|
||||||
ON s.instance_id = i.id
|
AND id NOT IN (
|
||||||
WHERE s.ends < now() at time zone 'UTC'
|
SELECT s.file_id FROM cc_schedule AS s
|
||||||
OR i.ends < now() at time zone 'UTC'
|
LEFT JOIN cc_show_instances AS i
|
||||||
|
ON s.instance_id = i.id
|
||||||
|
WHERE s.ends > now() at time zone 'UTC'
|
||||||
|
AND i.ends > now() at time zone 'UTC'
|
||||||
|
)
|
||||||
SQL;
|
SQL;
|
||||||
$files = Application_Common_Database::prepareAndExecute($sql);
|
Application_Common_Database::prepareAndExecute($sql, array(),
|
||||||
|
Application_Common_Database::EXECUTE);
|
||||||
foreach ($files as $file) {
|
|
||||||
if (!is_null($file['file_id'])) {
|
|
||||||
self::setIsScheduled(null, false, $file['file_id'], $file['instance_id']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRealClipLength($p_cuein, $p_cueout) {
|
public function getRealClipLength($p_cuein, $p_cueout) {
|
||||||
|
|
|
@ -194,7 +194,7 @@ class CcShow extends BaseCcShow {
|
||||||
{
|
{
|
||||||
return CcShowInstancesQuery::create()
|
return CcShowInstancesQuery::create()
|
||||||
->filterByCcShow($this)
|
->filterByCcShow($this)
|
||||||
->filterByDbId($instanceId, Criteria::NOT_IN)
|
->filterByDbId($instanceId, Criteria::NOT_EQUAL)
|
||||||
->find();
|
->find();
|
||||||
}
|
}
|
||||||
} // CcShow
|
} // CcShow
|
||||||
|
|
|
@ -569,6 +569,8 @@ SQL;
|
||||||
$this->deleteShowInstances($ccShowInstances, $ccShowInstance->getDbShowId());
|
$this->deleteShowInstances($ccShowInstances, $ccShowInstance->getDbShowId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Application_Model_StoredFile::updatePastFilesIsScheduled();
|
||||||
|
|
||||||
Application_Model_RabbitMq::PushSchedule();
|
Application_Model_RabbitMq::PushSchedule();
|
||||||
|
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
@ -876,10 +878,13 @@ SQL;
|
||||||
/*
|
/*
|
||||||
* Make sure start date is less than populate until date AND
|
* Make sure start date is less than populate until date AND
|
||||||
* last show date is null OR start date is less than last show date
|
* last show date is null OR start date is less than last show date
|
||||||
|
*
|
||||||
|
* (NOTE: We cannot call getTimestamp() to compare the dates because of
|
||||||
|
* a PHP 5.3.3 bug with DatePeriod objects - See CC-5159 for more details)
|
||||||
*/
|
*/
|
||||||
if ($utcStartDateTime->getTimestamp() <= $populateUntil->getTimestamp() &&
|
if ($utcStartDateTime->format("Y-m-d H:i:s") <= $populateUntil->format("Y-m-d H:i:s") &&
|
||||||
( is_null($utcLastShowDateTime) ||
|
( is_null($utcLastShowDateTime) ||
|
||||||
$utcStartDateTime->getTimestamp() < $utcLastShowDateTime->getTimestamp()) ) {
|
$utcStartDateTime->format("Y-m-d H:i:s") < $utcLastShowDateTime->format("Y-m-d H:i:s")) ) {
|
||||||
|
|
||||||
/* There may not always be an instance when editing a show
|
/* There may not always be an instance when editing a show
|
||||||
* This will be the case when we are adding a new show day to
|
* This will be the case when we are adding a new show day to
|
||||||
|
|
|
@ -330,8 +330,8 @@ INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('en_GB', 'English (Brit
|
||||||
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('en_US', 'English (USA)');
|
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('en_US', 'English (USA)');
|
||||||
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('cs_CZ', 'Český');
|
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('cs_CZ', 'Český');
|
||||||
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('de_DE', 'Deutsch');
|
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('de_DE', 'Deutsch');
|
||||||
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('hu_HU', 'hʌŋɡəri');
|
|
||||||
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('de_AT', 'Österreichisches Deutsch');
|
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('de_AT', 'Österreichisches Deutsch');
|
||||||
|
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('hu_HU', 'Magyar');
|
||||||
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('es_ES', 'Español');
|
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('es_ES', 'Español');
|
||||||
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('fr_FR', 'Français');
|
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('fr_FR', 'Français');
|
||||||
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('it_IT', 'Italiano');
|
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('it_IT', 'Italiano');
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -6,8 +6,8 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Airtime 2.3\n"
|
"Project-Id-Version: Airtime 2.3\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2013-05-16 12:46-0400\n"
|
"POT-Creation-Date: 2013-05-17 11:38-0400\n"
|
||||||
"PO-Revision-Date: 2013-05-16 12:46-0500\n"
|
"PO-Revision-Date: 2013-05-17 11:38-0500\n"
|
||||||
"Last-Translator: Denise Rigato <denise.rigato@sourcefabric.org>\n"
|
"Last-Translator: Denise Rigato <denise.rigato@sourcefabric.org>\n"
|
||||||
"Language-Team: Hungarian Localization <contact@sourcefabric.org>\n"
|
"Language-Team: Hungarian Localization <contact@sourcefabric.org>\n"
|
||||||
"Language: \n"
|
"Language: \n"
|
||||||
|
@ -1977,7 +1977,7 @@ msgid "Scheduled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: airtime_mvc/application/controllers/LocaleController.php:65
|
#: airtime_mvc/application/controllers/LocaleController.php:65
|
||||||
msgid "Playlist"
|
msgid "Playlist / Block"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: airtime_mvc/application/controllers/LocaleController.php:69
|
#: airtime_mvc/application/controllers/LocaleController.php:69
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
BIN
airtime_mvc/public/css/images/is_playlist.png
Normal file
BIN
airtime_mvc/public/css/images/is_playlist.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 801 B |
BIN
airtime_mvc/public/css/images/is_scheduled.png
Normal file
BIN
airtime_mvc/public/css/images/is_scheduled.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 543 B |
|
@ -2006,6 +2006,14 @@ span.errors.sp-errors{
|
||||||
.small-icon.show-partial-filled, .small-icon.media-item-in-use {
|
.small-icon.show-partial-filled, .small-icon.media-item-in-use {
|
||||||
background:url(images/icon_alert_cal_alt2.png) no-repeat 0 0;
|
background:url(images/icon_alert_cal_alt2.png) no-repeat 0 0;
|
||||||
}
|
}
|
||||||
|
.small-icon.is_scheduled {
|
||||||
|
background:url(images/is_scheduled.png) no-repeat 0 0;
|
||||||
|
height: 16px !important;
|
||||||
|
}
|
||||||
|
.small-icon.is_playlist {
|
||||||
|
background:url(images/is_playlist.png) no-repeat 0 0;
|
||||||
|
height: 16px !important;
|
||||||
|
}
|
||||||
.medium-icon {
|
.medium-icon {
|
||||||
display:block;
|
display:block;
|
||||||
width:25px;
|
width:25px;
|
||||||
|
|
|
@ -468,7 +468,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
/* Checkbox */ { "sTitle" : "" , "mDataProp" : "checkbox" , "bSortable" : false , "bSearchable" : false , "sWidth" : "25px" , "sClass" : "library_checkbox" } ,
|
/* Checkbox */ { "sTitle" : "" , "mDataProp" : "checkbox" , "bSortable" : false , "bSearchable" : false , "sWidth" : "25px" , "sClass" : "library_checkbox" } ,
|
||||||
/* Type */ { "sTitle" : "" , "mDataProp" : "image" , "bSearchable" : false , "sWidth" : "25px" , "sClass" : "library_type" , "iDataSort" : 0 } ,
|
/* Type */ { "sTitle" : "" , "mDataProp" : "image" , "bSearchable" : false , "sWidth" : "25px" , "sClass" : "library_type" , "iDataSort" : 0 } ,
|
||||||
/* Is Scheduled */ { "sTitle" : $.i18n._("Scheduled") , "mDataProp" : "is_scheduled" , "bSearchable" : false , "sWidth" : "90px" , "sClass" : "library_is_scheduled"} ,
|
/* Is Scheduled */ { "sTitle" : $.i18n._("Scheduled") , "mDataProp" : "is_scheduled" , "bSearchable" : false , "sWidth" : "90px" , "sClass" : "library_is_scheduled"} ,
|
||||||
/* Is Playlist */ { "sTitle" : $.i18n._("Playlist") , "mDataProp" : "is_playlist" , "bSearchable" : false , "sWidth" : "70px" , "sClass" : "library_is_playlist"} ,
|
/* Is Playlist */ { "sTitle" : $.i18n._("Playlist / Block") , "mDataProp" : "is_playlist" , "bSearchable" : false , "sWidth" : "110px" , "sClass" : "library_is_playlist"} ,
|
||||||
/* Title */ { "sTitle" : $.i18n._("Title") , "mDataProp" : "track_title" , "sClass" : "library_title" , "sWidth" : "170px" } ,
|
/* Title */ { "sTitle" : $.i18n._("Title") , "mDataProp" : "track_title" , "sClass" : "library_title" , "sWidth" : "170px" } ,
|
||||||
/* Creator */ { "sTitle" : $.i18n._("Creator") , "mDataProp" : "artist_name" , "sClass" : "library_creator" , "sWidth" : "160px" } ,
|
/* Creator */ { "sTitle" : $.i18n._("Creator") , "mDataProp" : "artist_name" , "sClass" : "library_creator" , "sWidth" : "160px" } ,
|
||||||
/* Album */ { "sTitle" : $.i18n._("Album") , "mDataProp" : "album_title" , "sClass" : "library_album" , "sWidth" : "150px" } ,
|
/* Album */ { "sTitle" : $.i18n._("Album") , "mDataProp" : "album_title" , "sClass" : "library_album" , "sWidth" : "150px" } ,
|
||||||
|
@ -618,12 +618,12 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aData.is_scheduled) {
|
if (aData.is_scheduled) {
|
||||||
$(nRow).find("td.library_is_scheduled").html('<span class="small-icon media-item-in-use"></span>');
|
$(nRow).find("td.library_is_scheduled").html('<span class="small-icon is_scheduled"></span>');
|
||||||
} else if (!aData.is_scheduled) {
|
} else if (!aData.is_scheduled) {
|
||||||
$(nRow).find("td.library_is_scheduled").html('');
|
$(nRow).find("td.library_is_scheduled").html('');
|
||||||
}
|
}
|
||||||
if (aData.is_playlist) {
|
if (aData.is_playlist) {
|
||||||
$(nRow).find("td.library_is_playlist").html('<span class="small-icon media-item-in-use"></span>');
|
$(nRow).find("td.library_is_playlist").html('<span class="small-icon is_playlist"></span>');
|
||||||
} else if (!aData.is_playlist) {
|
} else if (!aData.is_playlist) {
|
||||||
$(nRow).find("td.library_is_playlist").html('');
|
$(nRow).find("td.library_is_playlist").html('');
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,4 +16,4 @@ UPDATE cc_files
|
||||||
SET is_playlist = true
|
SET is_playlist = true
|
||||||
WHERE id IN (SELECT DISTINCT(file_id) FROM cc_blockcontents);
|
WHERE id IN (SELECT DISTINCT(file_id) FROM cc_blockcontents);
|
||||||
|
|
||||||
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('hu_HU', 'hʌŋɡəri');
|
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('hu_HU', 'Magyar');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue