Ejemplo n.º 1
0
        public static SimplePlaylist <V> LoadFromFile(String filename)
        {
            String             format   = GuessFormat(filename);
            SimplePlaylist <V> Playlist = new SimplePlaylist <V>(filename);

            return(format == "txt" ? (TxtProvider <V> .Create(Playlist).Load <SimplePlaylist <V> >())
                : (M3uProvider <V> .Create(Playlist).Load <SimplePlaylist <V> >()));
        }
Ejemplo n.º 2
0
        private void GetFormat()
        {
            String format = Properties.Settings.Default.PlaylistFormat;

            switch (format)
            {
            case "txt": this.formatProvider = TxtProvider.Create(this); break;

            case "m3u": this.formatProvider = M3uProvider.Create(this); break;

            case "wpl": this.formatProvider = WplProvider.Create(this); break;
            }
        }