private function get_sel_item_update_action(&$user_input, &$plugin_cookies)
 {
     $parent_media_url = MediaURL::decode($user_input->parent_media_url);
     $sel_ndx = $user_input->sel_ndx;
     $group = $this->tv->get_group($parent_media_url->group_id);
     $channels = $group->get_channels($plugin_cookies);
     $items[] = $this->get_regular_folder_item($group, $channels->get_by_ndx($sel_ndx), $plugin_cookies);
     $range = HD::create_regular_folder_range($items, $sel_ndx, $channels->size());
     return ActionFactory::update_regular_folder($range, false);
 }
 private function get_update_action($sel_increment, &$user_input, &$plugin_cookies)
 {
     $parent_media_url = MediaURL::decode($user_input->parent_media_url);
     $num_favorites = count($this->tv->get_fav_channel_ids($plugin_cookies));
     $sel_ndx = $user_input->sel_ndx + $sel_increment;
     if ($sel_ndx < 0) {
         $sel_ndx = 0;
     }
     if ($sel_ndx >= $num_favorites) {
         $sel_ndx = $num_favorites - 1;
     }
     $range = HD::create_regular_folder_range($this->get_all_folder_items($parent_media_url, $plugin_cookies));
     return ActionFactory::update_regular_folder($range, true, $sel_ndx);
 }
Example #3
0
 public function get_folder_range(MediaURL $media_url, $from_ndx, &$plugin_cookies)
 {
     $movie_range = $this->get_short_movie_range($media_url, $from_ndx, $plugin_cookies);
     $total = intval($movie_range->total);
     if ($total <= 0) {
         return HD::create_regular_folder_range(array());
     }
     $items = array();
     foreach ($movie_range->short_movies as $movie) {
         $items[] = array(PluginRegularFolderItem::media_url => VodMovieScreen::get_media_url_str($movie->id), PluginRegularFolderItem::caption => $movie->name, PluginRegularFolderItem::view_item_params => array(ViewItemParams::icon_path => $movie->poster_url));
         $this->vod->set_cached_short_movie(new ShortMovie($movie->id, $movie->name, $movie->poster_url));
     }
     return HD::create_regular_folder_range($items, $movie_range->from_ndx, $total);
 }
 public function get_folder_range(MediaURL $media_url, $from_ndx, &$plugin_cookies)
 {
     return HD::create_regular_folder_range($this->get_all_folder_items($media_url, &$plugin_cookies));
 }