Exemplo n.º 1
0
        static public M3UManifest Create(string url, string content)
        {
            var result = new M3UManifest(url);

            result.Parse(content);
            return(result);
        }
Exemplo n.º 2
0
        static public M3UContent CreateFromUrl(string url)
        {
            using (var http = new HttpClient())
            {
                var content = http.GetStringAsync(url.Trim()).Result;

                var lines = ParseLines(content);

                if (lines.Any(l => l.StartsWith("#EXTINF:")))
                {
                    return(M3UStream.Create(url, content));
                }
                else
                {
                    return(M3UManifest.Create(url, content));
                }
            }
        }