* SAAS-1153 - more work on station podcast frontend. Add delete and edit button functionality for episode table
* Various fixes and backend updates * Move station podcast creation to id getter in Preferences
This commit is contained in:
parent
c0d8b8b39c
commit
22f8b0f328
16 changed files with 102 additions and 72 deletions
|
@ -236,15 +236,15 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
|
|||
}
|
||||
|
||||
$sortDir = ($sortDir === "DESC") ? $sortDir = Criteria::DESC : Criteria::ASC;
|
||||
$isStationPodcast = $podcastId === Application_Model_Preference::getStationPodcastId();
|
||||
$isStationPodcast = $podcastId == Application_Model_Preference::getStationPodcastId();
|
||||
|
||||
$episodes = PodcastEpisodesQuery::create()
|
||||
->joinWithCcFiles('files')
|
||||
->filterByDbPodcastId($podcastId);
|
||||
if ($isStationPodcast) {
|
||||
$episodes = $episodes->setLimit($limit);
|
||||
}
|
||||
$episodes = $episodes->setOffset($offset)
|
||||
$episodes = $episodes->joinWith('PodcastEpisodes.CcFiles')
|
||||
->setOffset($offset)
|
||||
->orderBy($sortColumn, $sortDir)
|
||||
->find();
|
||||
|
||||
|
@ -257,7 +257,6 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
|
|||
foreach ($episodes as $episode) {
|
||||
/** @var PodcastEpisodes $episode */
|
||||
$episodeArr = $episode->toArray(BasePeer::TYPE_FIELDNAME, true, [], true);
|
||||
Logging::info($episodeArr);
|
||||
array_push($episodesArray, $episodeArr);
|
||||
}
|
||||
return $episodesArray;
|
||||
|
|
|
@ -161,6 +161,7 @@ class Application_Service_PodcastService
|
|||
// Set the download key when we create the station podcast
|
||||
// The value is randomly generated in the setter
|
||||
Application_Model_Preference::setStationPodcastDownloadKey();
|
||||
return $podcast->getDbId();
|
||||
}
|
||||
|
||||
//TODO move this somewhere where it makes sense
|
||||
|
@ -243,6 +244,7 @@ class Application_Service_PodcastService
|
|||
if ($podcast) {
|
||||
$podcast->delete();
|
||||
|
||||
// FIXME: I don't think we should be able to delete the station podcast...
|
||||
if ($podcastId == Application_Model_Preference::getStationPodcastId()) {
|
||||
Application_Model_Preference::setStationPodcastId(null);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ class Application_Service_PublishService {
|
|||
*/
|
||||
private static $SOURCES = array(
|
||||
"soundcloud" => SOUNDCLOUD,
|
||||
"station_podcast" => "My Station Podcast"
|
||||
"station_podcast" => "Station Podcast"
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue