* SAAS-1212 - fix validation errors in station podcast rss

* Append podcast title to heading in episodes view
This commit is contained in:
Duncan Sommerville 2015-11-17 12:26:21 -05:00
parent 041adb5c1f
commit c12848b2de
5 changed files with 16 additions and 5 deletions

View File

@ -237,7 +237,8 @@ class PodcastTask implements AirtimeTask {
* @return bool true if the podcast polling interval has passed * @return bool true if the podcast polling interval has passed
*/ */
public function shouldBeRun() { public function shouldBeRun() {
return PodcastManager::hasPodcastPollIntervalPassed(); $overQuota = Application_Model_Systemstatus::isDiskOverQuota();
return !$overQuota && PodcastManager::hasPodcastPollIntervalPassed();
} }
/** /**

View File

@ -160,7 +160,7 @@ class Application_Service_PodcastService
$podcast->setDbDescription(Application_Model_Preference::GetStationDescription()); $podcast->setDbDescription(Application_Model_Preference::GetStationDescription());
$podcast->setDbLink(Application_Common_HTTPHelper::getStationUrl()); $podcast->setDbLink(Application_Common_HTTPHelper::getStationUrl());
$podcast->setDbLanguage(Application_Model_Preference::GetLocale()); $podcast->setDbLanguage(explode('_', Application_Model_Preference::GetLocale())[0]);
$podcast->setDbCreator(Application_Model_Preference::GetStationName()); $podcast->setDbCreator(Application_Model_Preference::GetStationName());
$podcast->setDbOwner(self::getOwnerId()); $podcast->setDbOwner(self::getOwnerId());
$podcast->save(); $podcast->save();
@ -406,7 +406,9 @@ class Application_Service_PodcastService
//category //category
foreach($itunesCategories as $c) { foreach($itunesCategories as $c) {
self::addEscapedChild($item, "category", $c); if (!empty($c)) {
self::addEscapedChild($item, "category", $c);
}
} }
//guid //guid

View File

@ -67,6 +67,9 @@
#library_title { #library_title {
padding: 5px 5px 0; padding: 5px 5px 0;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
} }
#library_content { #library_content {

View File

@ -1427,6 +1427,7 @@ var AIRTIME = (function(AIRTIME) {
// in the left-hand pane. // in the left-hand pane.
mod.podcastTableWidget.assignDblClickHandler(function () { mod.podcastTableWidget.assignDblClickHandler(function () {
var podcast = mod.podcastDataTable.fnGetData(this); var podcast = mod.podcastDataTable.fnGetData(this);
$("#library_filter").append(" - " + $(this).find(".library_title").text());
openPodcastEpisodeTable(podcast); openPodcastEpisodeTable(podcast);
}); });
@ -1448,6 +1449,7 @@ var AIRTIME = (function(AIRTIME) {
elementId : '', elementId : '',
eventHandlers : { eventHandlers : {
click: function () { click: function () {
$("#library_filter").text($.i18n._("Podcasts"));
mod.setCurrentTable(mod.DataTableTypeEnum.PODCAST); mod.setCurrentTable(mod.DataTableTypeEnum.PODCAST);
} }
}, },

View File

@ -94,7 +94,7 @@ var AIRTIME = (function(AIRTIME) {
"fnPreDrawCallback": function () { "fnPreDrawCallback": function () {
$("#draggingContainer").remove(); $("#draggingContainer").remove();
}, },
"fnServerData": self._fetchData, "fnServerData": self._fetchData.bind(self),
//"fnInitComplete" : function() { self._setupEventHandlers(bItemSelection) } //"fnInitComplete" : function() { self._setupEventHandlers(bItemSelection) }
"fnDrawCallback": function () { "fnDrawCallback": function () {
self.clearSelection(); self.clearSelection();
@ -421,12 +421,14 @@ var AIRTIME = (function(AIRTIME) {
var sortColName = ""; var sortColName = "";
var sortDir = ""; var sortDir = "";
var search = self._$wrapperDOMNode.closest(".dataTables_wrapper").find(".dataTables_filter").find("input").val();
if (oSettings.aaSorting.length > 0) { if (oSettings.aaSorting.length > 0) {
var sortColIdx = oSettings.aaSorting[0][0]; var sortColIdx = oSettings.aaSorting[0][0];
sortColName = oSettings.aoColumns[sortColIdx].mDataProp; sortColName = oSettings.aoColumns[sortColIdx].mDataProp;
sortDir = oSettings.aaSorting[0][1].toUpperCase(); sortDir = oSettings.aaSorting[0][1].toUpperCase();
} }
// FIXME: We should probably just be sending aoData back here..?
$.ajax({ $.ajax({
"dataType": 'json', "dataType": 'json',
"type": "GET", "type": "GET",
@ -435,7 +437,8 @@ var AIRTIME = (function(AIRTIME) {
"limit": oSettings._iDisplayLength, "limit": oSettings._iDisplayLength,
"offset": oSettings._iDisplayStart, "offset": oSettings._iDisplayStart,
"sort": sortColName, "sort": sortColName,
'sort_dir': sortDir, "sort_dir": sortDir,
"search": search
}, },
"success": function (json, textStatus, jqXHR) { "success": function (json, textStatus, jqXHR) {
var rawResponseJSON = json; var rawResponseJSON = json;