src/BandcampDownloader/Core/PlaylistCreator.cs
/// <summary>
/// Returns the playlist in m3u format.
/// </summary>
Returns the playlist in m3u format.
Returns the playlist in m3u format .
private string CreateM3uPlaylist() {
            var playlist = new M3uPlaylist() {
                IsExtended = App.UserSettings.M3uExtended,
            };
            foreach (Track track in _album.Tracks) {
                playlist.PlaylistEntries.Add(new M3uPlaylistEntry() {
                    Album = _album.Title,
                    AlbumArtist = _album.Artist,
                    Duration = TimeSpan.FromSeconds(track.Duration),
                    Path = Path.GetFileName(track.Path),
                    Title = track.Title,
                });
            }
            return new M3uContent().ToText(playlist);
        }
private string CreateM3uPlaylist ( ) { var playlist = new M3uPlaylist ( ) { IsExtended = App . UserSettings . M3uExtended , } ; foreach ( Track track in _album . Tracks ) { playlist . PlaylistEntries . Add ( new M3uPlaylistEntry ( ) { Album = _album . Title , AlbumArtist = _album . Artist , Duration = TimeSpan . FromSeconds ( track . Duration ) , Path = Path . GetFileName ( track . Path ) , Title = track . Title , } ) ; } return new M3uContent ( ) . ToText ( playlist ) ; }
Returns the playlist in m3u format.
Returns the playlist in m3u format .