Esempio n. 1
0
 public function syncAction()
 {
     $this->acl->checkPermission('administer all');
     $this->doNotRender();
     \PVL\Debug::setEchoMode(TRUE);
     \PVL\Debug::startTimer('sync_task');
     $type = $this->getParam('type', 'nowplaying');
     switch ($type) {
         case "long":
             \PVL\SyncManager::syncLong();
             break;
         case "medium":
             \PVL\SyncManager::syncMedium();
             break;
         case "short":
             \PVL\SyncManager::syncShort();
             break;
         case "nowplaying":
         default:
             $segment = $this->getParam('segment', 1);
             define('NOWPLAYING_SEGMENT', $segment);
             \PVL\SyncManager::syncNowplaying(true);
             break;
     }
     \PVL\Debug::endTimer('sync_task');
     \PVL\Debug::log('Sync task complete. See log above.');
 }
Esempio n. 2
0
 public function mediumAction($params = null)
 {
     SyncManager::syncMedium();
 }