private static SerieInfo Parse(string raw) { SerieInfo info = new SerieInfo(); info.ServiceAddress = SERVICE_ADDRESS; string[] lines = raw.Split('\n'); foreach (var line in lines) { string[] pair = line.Split('@'); if (pair.Length != 2) { continue; } switch (pair[0]) { case "Show Name": info.Name = pair[1]; break; case "Status": info.Status = pair[1]; break; case "Genres": info.Genres = pair[1]; break; case "Next Episode": info.NextEpisode = EpisodeInfo.Parse(pair[1]); break; case "Latest Episode": info.LatestEpisode = EpisodeInfo.Parse(pair[1]); break; case "Show URL": info.URL = pair[1]; break; } } if (!string.IsNullOrEmpty(info.Name)) { IsValid = true; return(info); } if (!string.IsNullOrEmpty(raw) && raw.StartsWith("No Show Results")) { return(new EmptySerieInfo { ServiceAddress = SERVICE_ADDRESS }); } IsValid = false; return(null); }