added button to generate smartblock and playlist for podcast
This commit is contained in:
parent
cb62cff277
commit
6cd5550721
5 changed files with 52 additions and 0 deletions
|
@ -21,6 +21,17 @@ class Rest_Bootstrap extends Zend_Application_Module_Bootstrap
|
|||
);
|
||||
$router->addRoute('podcast-bulk', $podcastBulkRoute);
|
||||
|
||||
|
||||
$smartblockPodcastRoute = new Zend_Controller_Router_Route(
|
||||
'rest/podcast/smartblock',
|
||||
array(
|
||||
'controller' => 'podcast',
|
||||
'action' => 'smartblock',
|
||||
'module' => 'rest'
|
||||
)
|
||||
);
|
||||
$router->addRoute('podcast-smartblock', $smartblockPodcastRoute);
|
||||
|
||||
$stationPodcastRoute = new Zend_Controller_Router_Route(
|
||||
'rest/podcast/station',
|
||||
array(
|
||||
|
|
|
@ -191,6 +191,25 @@ class Rest_PodcastController extends Zend_Rest_Controller
|
|||
$this->_helper->json->sendJson($responseBody);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Endpoint for triggering the generation of a smartblock and playlist to match the podcast name
|
||||
*/
|
||||
|
||||
public function smartblockAction() {
|
||||
|
||||
$id = $this->_getParam('id', []);
|
||||
if (!$id) {
|
||||
return;
|
||||
}
|
||||
$podcast = Application_Service_PodcastService::getPodcastById($id);
|
||||
|
||||
logging::info($podcast);
|
||||
Application_Service_PodcastService::createPodcastSmartblockAndPlaylist($podcast);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @throws PodcastNotFoundException
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue