Added AutoPlaylist Functionality to Show Scheduler enabling shows to have tracks added automatically.
This commit is contained in:
parent
e3785e25f9
commit
32a1a66378
29 changed files with 1535 additions and 47 deletions
|
@ -222,6 +222,37 @@ class CeleryTask implements AirtimeTask {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Class AutoPlaylistTask
|
||||
*
|
||||
* Checks for shows with an autoplaylist that needs to be filled in
|
||||
*
|
||||
*/
|
||||
class AutoPlaylistTask implements AirtimeTask
|
||||
{
|
||||
|
||||
/**
|
||||
* Checks whether or not the autoplaylist polling interval has passed
|
||||
*
|
||||
* @return bool true if the autoplaylist polling interval has passed
|
||||
*/
|
||||
public function shouldBeRun()
|
||||
{
|
||||
return AutoPlaylistManager::hasAutoPlaylistPollIntervalPassed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedule the autoplaylist for the shows
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
AutoPlaylistManager::buildAutoPlaylist();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Class PodcastTask
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue