Exemplo n.º 1
0
            public override Playlist Parse(string content)
            {
                Playlist l = new Playlist();

                foreach (var line in content.Split('\r', '\n'))
                {
                    string ln = line.Trim();
                    if (!ln.StartsWith("#") && ln.StartsWith("http") && Uri.IsWellFormedUriString(ln, UriKind.Absolute))
                    {
                        l.Add(Playback.CreateTrack(ln));
                    }
                }

                return(l);
            }
Exemplo n.º 2
0
            public override Playlist Parse(string content)
            {
                Playlist l = new Playlist();

                foreach (var line in content.Split('\r', '\n'))
                {
                    string ln = line.Trim();
                    if (ln.Contains("http"))
                    {
                        string url = ln.Substring(ln.IndexOf("http"));
                        if (Uri.IsWellFormedUriString(url, UriKind.Absolute))
                        {
                            l.Add(Playback.CreateTrack(url));
                        }
                    }
                }

                return(l);
            }