added button to generate smartblock and playlist for podcast

This commit is contained in:
Robbt 2018-12-12 22:53:28 -05:00
parent cb62cff277
commit 6cd5550721
5 changed files with 52 additions and 0 deletions

View file

@ -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
*