<?php

require_once 'lib/tv/tv_channel_list_screen.php';

class I24hTvChannelListScreen extends TvChannelListScreen
{
    private $session;

    public function __construct($session, Tv $tv, $folder_views)
    {
        parent::__construct($tv, $folder_views);

        $this->session = $session;
    }

    public function get_all_folder_items(MediaURL $media_url, &$plugin_cookies)
    {
        $this->session->ensure_logged_in($plugin_cookies);

        if (I24hConfig::USE_M3U_FILE && !isset($media_url->group_id))
            $media_url->group_id = $this->tv->get_all_channel_group_id();

        return parent::get_all_folder_items($media_url, $plugin_cookies);
    }
}

?>
