package com.streamplayer;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public final class ChannelRepository {

    private static final List<StreamChannel> CHANNELS = createChannels();

    private static List<StreamChannel> createChannels() {
        List<StreamChannel> channels = new ArrayList<>(Arrays.asList(
            new StreamChannel("ESPN", "http://streamtp10.com/global2.php?stream=espn"),
            new StreamChannel("ESPN 2", "http://streamtp10.com/global2.php?stream=espn2"),
            new StreamChannel("ESPN 3", "http://streamtp10.com/global2.php?stream=espn3"),
            new StreamChannel("ESPN 4", "http://streamtp10.com/global2.php?stream=espn4"),
            new StreamChannel("ESPN 3 MX", "http://streamtp10.com/global2.php?stream=espn3mx"),
            new StreamChannel("ESPN 5", "http://streamtp10.com/global2.php?stream=espn5"),
            new StreamChannel("Fox Sports 3 MX", "http://streamtp10.com/global2.php?stream=foxsports3mx"),
            new StreamChannel("ESPN 6", "http://streamtp10.com/global2.php?stream=espn6"),
            new StreamChannel("Fox Sports MX", "http://streamtp10.com/global2.php?stream=foxsportsmx"),
            new StreamChannel("ESPN 7", "http://streamtp10.com/global2.php?stream=espn7"),
            new StreamChannel("Azteca Deportes", "http://streamtp10.com/global2.php?stream=azteca_deportes"),
            new StreamChannel("Win Plus", "http://streamtp10.com/global2.php?stream=winplus"),
            new StreamChannel("DAZN 1", "http://streamtp10.com/global2.php?stream=dazn1"),
            new StreamChannel("Win Plus 2", "http://streamtp10.com/global2.php?stream=winplus2"),
            new StreamChannel("DAZN 2", "http://streamtp10.com/global2.php?stream=dazn2"),
            new StreamChannel("Win Sports", "http://streamtp10.com/global2.php?stream=winsports"),
            new StreamChannel("DAZN LaLiga", "http://streamtp10.com/global2.php?stream=dazn_laliga"),
            new StreamChannel("Win Plus Online 1", "http://streamtp10.com/global2.php?stream=winplusonline1"),
            new StreamChannel("Caracol TV", "http://streamtp10.com/global2.php?stream=caracoltv"),
            new StreamChannel("Fox 1 AR", "http://streamtp10.com/global2.php?stream=fox1ar"),
            new StreamChannel("Fox 2 USA", "http://streamtp10.com/global2.php?stream=fox_2_usa"),
            new StreamChannel("Fox 2 AR", "http://streamtp10.com/global2.php?stream=fox2ar"),
            new StreamChannel("TNT 1 GB", "http://streamtp10.com/global2.php?stream=tnt_1_gb"),
            new StreamChannel("TNT 2 GB", "http://streamtp10.com/global2.php?stream=tnt_2_gb"),
            new StreamChannel("Fox 3 AR", "http://streamtp10.com/global2.php?stream=fox3ar"),
            new StreamChannel("Universo USA", "http://streamtp10.com/global2.php?stream=universo_usa"),
            new StreamChannel("DSports", "http://streamtp10.com/global2.php?stream=dsports"),
            new StreamChannel("Univision USA", "http://streamtp10.com/global2.php?stream=univision_usa"),
            new StreamChannel("DSports 2", "http://streamtp10.com/global2.php?stream=dsports2"),
            new StreamChannel("Fox Deportes USA", "http://streamtp10.com/global2.php?stream=fox_deportes_usa"),
            new StreamChannel("DSports Plus", "http://streamtp10.com/global2.php?stream=dsportsplus"),
            new StreamChannel("Fox Sports 2 MX", "http://streamtp10.com/global2.php?stream=foxsports2mx"),
            new StreamChannel("TNT Sports Chile", "http://streamtp10.com/global2.php?stream=tntsportschile"),
            new StreamChannel("Fox Sports Premium", "http://streamtp10.com/global2.php?stream=foxsportspremium"),
            new StreamChannel("TNT Sports", "http://streamtp10.com/global2.php?stream=tntsports"),
            new StreamChannel("ESPN MX", "http://streamtp10.com/global2.php?stream=espnmx"),
            new StreamChannel("ESPN Premium", "http://streamtp10.com/global2.php?stream=espnpremium"),
            new StreamChannel("ESPN 2 MX", "http://streamtp10.com/global2.php?stream=espn2mx"),
            new StreamChannel("TyC Sports", "http://streamtp10.com/global2.php?stream=tycsports"),
            new StreamChannel("TUDN USA", "http://streamtp10.com/global2.php?stream=tudn_usa"),
            new StreamChannel("Telefe", "http://streamtp10.com/global2.php?stream=telefe"),
            new StreamChannel("TNT 3 GB", "http://streamtp10.com/global2.php?stream=tnt_3_gb"),
            new StreamChannel("TV Pública", "http://streamtp10.com/global2.php?stream=tv_publica"),
            new StreamChannel("Fox 1 USA", "http://streamtp10.com/global2.php?stream=fox_1_usa"),
            new StreamChannel("Liga 1 Max", "http://streamtp10.com/global2.php?stream=liga1max"),
            new StreamChannel("Gol TV", "http://streamtp10.com/global2.php?stream=goltv"),
            new StreamChannel("VTV Plus", "http://streamtp10.com/global2.php?stream=vtvplus"),
            new StreamChannel("ESPN Deportes", "http://streamtp10.com/global2.php?stream=espndeportes"),
            new StreamChannel("Gol Perú", "http://streamtp10.com/global2.php?stream=golperu"),
            new StreamChannel("TNT 4 GB", "http://streamtp10.com/global2.php?stream=tnt_4_gb"),
            new StreamChannel("SportTV BR 1", "http://streamtp10.com/global2.php?stream=sporttvbr1"),
            new StreamChannel("SportTV BR 2", "http://streamtp10.com/global2.php?stream=sporttvbr2"),
            new StreamChannel("SportTV BR 3", "http://streamtp10.com/global2.php?stream=sporttvbr3"),
            new StreamChannel("Premiere 1", "http://streamtp10.com/global2.php?stream=premiere1"),
            new StreamChannel("Premiere 2", "http://streamtp10.com/global2.php?stream=premiere2"),
            new StreamChannel("Premiere 3", "http://streamtp10.com/global2.php?stream=premiere3"),
            new StreamChannel("ESPN NL 1", "http://streamtp10.com/global2.php?stream=espn_nl1"),
            new StreamChannel("ESPN NL 2", "http://streamtp10.com/global2.php?stream=espn_nl2"),
            new StreamChannel("ESPN NL 3", "http://streamtp10.com/global2.php?stream=espn_nl3"),
            new StreamChannel("Caliente TV MX", "http://streamtp10.com/global2.php?stream=calientetvmx"),
            new StreamChannel("USA Network", "http://streamtp10.com/global2.php?stream=usa_network"),
            new StreamChannel("TyC Internacional", "http://streamtp10.com/global2.php?stream=tycinternacional"),
            new StreamChannel("Canal 5 MX", "http://streamtp10.com/global2.php?stream=canal5mx"),
            new StreamChannel("TUDN MX", "http://streamtp10.com/global2.php?stream=TUDNMX"),
            new StreamChannel("FUTV", "http://streamtp10.com/global2.php?stream=futv"),
            new StreamChannel("LaLiga Hypermotion", "http://streamtp10.com/global2.php?stream=laligahypermotion")
        ));
        channels.sort(Comparator.comparing(StreamChannel::getName, String.CASE_INSENSITIVE_ORDER));
        return Collections.unmodifiableList(channels);
    }

    private ChannelRepository() {
    }

    public static List<StreamChannel> getChannels() {
        return CHANNELS;
    }
}
