Пример #1
0
        public static void GetLatestEpisodes()
        {
            foreach (Series currSeries in Variables.SeriesList)
            {
                Episode newLastEpisode = ProcessHtml.GetEpisodes(currSeries.ImdbId, false)[0];

                if (newLastEpisode != currSeries.LastEpisode)
                {
                    currSeries.NotificationSent = 0;
                    currSeries.LastEpisode      = newLastEpisode;
                }
            }
        }
Пример #2
0
        // Get time
        public static string GetAirTimeByName(string Name)
        {
            string content = RequestPage("http://services.tvrage.com/feeds/fullschedule.php?country=US");
            Tuple <string, int> showData = ProcessHtml.GetInnerHtmlByAttribute(Name, "name", content);

            if (showData == null)
            {
                return(default(DateTime).ToString("H:mm"));
            }

            int    startIndex = content.IndexOf("attr=\"", content.LastIndexOf("<time", showData.Item2)) + 6;
            int    endIndex   = content.IndexOf("\"", startIndex) + 1;
            string airTime    = content.Substring(startIndex, endIndex - startIndex - 1);

            return(Convert.ToDateTime(airTime).ToString("HH:mm"));
        }