public void CallWebTVNext(string[] str) { if (str.Length < 3) { return; } string channelname = str[1]; string id = str[2]; WebTV_Channel channel = WebTV_Singleton.Find(channelname); WebTV_Media media = WebTV_Find.Next_Media(channel); if (media != null) { Add(new Msg_WebTV("WEBTVNEXT", id, media)); } //****************************** //Channel channel = Channels.Find(channelname); //if (channel != null) //{ // WebTVJSON webtvjson = channel.FindNext(); // if (webtvjson != null) Add(new MsgJSON_WebTV("WEBTVNEXT", id, webtvjson)); //} }
public static void Add(WebTV_Channel channel) { WebTV_Channel[] temp = new WebTV_Channel[WebTV_Channel.Length + 1]; for (int i = 0; i < WebTV_Channel.Length; i++) { temp[i] = WebTV_Channel[i]; } temp[WebTV_Channel.Length] = channel; WebTV_Channel = temp; }
public static WebTV_Media Current_Media(WebTV_Channel channel) { WebTV_Hourly hourly = channel.Current; if (hourly != null) { return(hourly.Current); } else { return(null); } }
public static WebTV_Media Next_Media(WebTV_Channel channel) { WebTV_Hourly hourly = channel.Current; WebTV_Media media = null; if (hourly != null) { media = hourly.Next; } if (media == null) { hourly = channel.Next; media = hourly.First; } return(media); }
public void WebTV_Hourly(string[] str) { if (str.Length < 2) { return; } string channelname = str[1]; WebTV_Channel channel = WebTV_Singleton.Find(channelname); WebTV_Hourly hourly = channel.Current; Add(new MsgJSON_Object("HOURLY", hourly)); //************************************** //Channel channel = Channels.Find(str[1]); //if (channel == null) return; //Add(new MsgJSON_Object("HOURLY", channel.FindInfo())); }
public void CallWebTV(string[] str) { if (str.Length < 3) { return; } string channelname = str[1]; string id = str[2]; WebTV_Channel channel = WebTV_Singleton.Find(channelname); WebTV_Media media = WebTV_Find.Current_Media(channel); Add(new Msg_WebTV("WEBTV", id, media)); //**************************** //webtvjson = new WebTVJSON(); //WebTVJSON webtvjson = WebTV.Channels.FindChannel(channelname); //if (webtvjson != null) Add(new MsgJSON_WebTV("WEBTV",id, webtvjson)); }
//public override void Loop(string[] str) //{ // base.Loop(str); //} //public void Home(string[] str) //{ // Redirect("Default.aspx"); //} public override void Appearance(string[] str) { if (str.Length < 2) { return; } string channelname = str[1]; WebTV_Channel channel = WebTV_Singleton.Find(channelname); if (channel != null) { Add(new MsgJSON_Object("APPEARANCE", channel.Appearances)); } //****************** //string name = str[1]; //Channel channel = Channels.Find(name); //if (channel != null) // Add(new MsgJSON_Object("APPEARANCE", channel.Appearances)); }
//*********************************************************** public static void Save_Channel(WebTV_Channel channel) { SaveJSON <WebTV_Channel>(channel, address_WebTV + @"Channel/" + channel.Name + Info.extension); }