Пример #1
0
        private void HandleEpisode(string newUrl)
        {
            Match episode = RegexPatterns.EpisodePattern.Match(newUrl);

            string title = episode.Groups[1].ToString();

            string noSpeTitle = RegexPatterns.NonSpecialCharaterPattern.Replace(title, "");
            string noSpeName  = RegexPatterns.NonSpecialCharaterPattern.Replace(SeriesName, "");

            if (noSpeTitle.ToLower().Contains(noSpeName.ToLower()))
            {
                Console.WriteLine(newUrl);
                Uri absoluteUrl = NormalizeUrl(watchLink, newUrl);
                if (!Episodes.Contains(absoluteUrl) && absoluteUrl != null &&
                    (absoluteUrl.Scheme == Uri.UriSchemeHttp || absoluteUrl.Scheme == Uri.UriSchemeHttps))
                {
                    Episodes.Add(absoluteUrl);
                    FoundNew = true;
                }
            }
        }