--- a/web/thdProject/apps/backend/modules/film/actions/actions.class.php Fri Apr 30 05:19:27 2010 +0200
+++ b/web/thdProject/apps/backend/modules/film/actions/actions.class.php Fri Apr 30 12:13:18 2010 +0200
@@ -13,6 +13,87 @@
*/
class filmActions extends autoFilmActions
{
+ private $WORD_LIST = array(
+ "abandon",
+ "abondance",
+ "absence",
+ "abus",
+ "accueil",
+ "acharnement",
+ "acteur",
+ "administration",
+ "adoration",
+ "adulte",
+ "adultère",
+ "aéroport",
+ "avion",
+ "affrontement",
+ "agitation",
+ "agression",
+ "aide",
+ "alarme",
+ "alcool",
+ "alimentation",
+ "amour",
+ "banque",
+ "bateau",
+ "bonheur",
+ "bouddhisme",
+ "camping",
+ "caractère",
+ "carence",
+ "cassure",
+ "célibataire",
+ "complice",
+ "défilé",
+ "discussion",
+ "écologie",
+ "encouragement",
+ "enfant",
+ "famille",
+ "géographie",
+ "huître",
+ "humain",
+ "mer",
+ "mère",
+ "méthode",
+ "monument",
+ "mouchoir",
+ "nature",
+ "nuage",
+ "offre",
+ "opinion",
+ "optique",
+ "papillon",
+ "photo"
+ );
+
+ public function executeListGenerate(sfWebRequest $request) {
+
+ // get all films
+ $videos = Doctrine_Query::create()
+ ->select("v.*")
+ ->from('ThdVideo v')
+ ->execute();
+ $user = sfContext::getInstance()->getUser();
+ $userUid = 1;
+
+
+
+ foreach($videos as $video) {
+
+ for($i=0;$i<10;$i++) {
+ $nbtags = rand(3,5);
+ $tags = array_rand($this->WORD_LIST, $nbtags);
+ $start = rand(0,3599);
+ $end = rand($start,3600);
+ $video->addSegment($start, $end, $tags, $userUid);
+ }
+
+ }
+
+ }
+
public function executeListReindex(sfWebRequest $request) {
sfContext::getInstance()->getLogger()->info("FilmAction : listReindex");
@@ -21,6 +102,8 @@
$solr = uvmcSolrServicesManager::getInstance()->getService();
$solr->deleteByQuery('*:*');
+
+
// reset sony engine
$dispatcher = sfContext::getInstance()->getEventDispatcher();
$dispatcher->notify(new sfEvent($this, 'iri_sonyengine.reset', array('retrain' => true)));