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 WebTVJSON(WebTVJSON webtvjson) { Hourly = webtvjson.Hourly; Note = webtvjson.Note; Social = webtvjson.Social; Media = new WebTV_Media(); Media.VideoPlayer = webtvjson.Media.VideoPlayer; Media.Source = webtvjson.Media.Source; Media.StartSeconds = (int)(new TimeSpan(DateTime.Now.Ticks - webtvjson.Hourly.DateJSON.Ticks + new TimeSpan(0, 0, webtvjson.Media.StartSeconds).Ticks).TotalSeconds); Media.Duration = webtvjson.Media.Duration - Media.StartSeconds; Media.Quality = webtvjson.Media.Quality; }
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 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 static void Save_Media(WebTV_Media media) { SaveJSON <WebTV_Media>(media, address_WebTV + @"Media/" + media.Proprietary + @"/" + media.Name + Info.extension); }