/**
  * Delivers a JSON response for video searches
  */
 public function videoSearch()
 {
     $searchConfig = F::build('WikiaSearchConfig');
     $searchConfig->setCityId($this->wg->cityId)->setQuery($this->getVal('q'))->setNamespaces(array(NS_FILE))->setVideoSearch(true);
     $this->wikiaSearch->doSearch($searchConfig);
     // up to whoever's using this service as to what they want from here. I'm just going to return JSON.
     // if you just want to search for only videos in the traditional video interface, then you should
     // be setting 'videoSearch' in the query string of the search index page
     $this->getResponse()->setFormat('json');
     $this->getResponse()->setData($searchConfig->getResults() ? $searchConfig->getResults()->toNestedArray() : array());
 }