src/BandcampDownloader/Core/PlaylistCreator.cs
/// <summary>
/// Returns the playlist in wpl format.
/// </summary>
Returns the playlist in wpl format.
Returns the playlist in wpl format .
private string CreateWplPlaylist() {
            var playlist = new WplPlaylist() {
                Title = _album.Title,
            };
            foreach (Track track in _album.Tracks) {
                playlist.PlaylistEntries.Add(new WplPlaylistEntry() {
                    AlbumArtist = _album.Artist,
                    AlbumTitle = _album.Title,
                    Duration = TimeSpan.FromSeconds(track.Duration),
                    Path = Path.GetFileName(track.Path),
                    TrackArtist = _album.Artist,
                    TrackTitle = track.Title,
                });
            }
            return new WplContent().ToText(playlist);
        }
private string CreateWplPlaylist ( ) { var playlist = new WplPlaylist ( ) { Title = _album . Title , } ; foreach ( Track track in _album . Tracks ) { playlist . PlaylistEntries . Add ( new WplPlaylistEntry ( ) { AlbumArtist = _album . Artist , AlbumTitle = _album . Title , Duration = TimeSpan . FromSeconds ( track . Duration ) , Path = Path . GetFileName ( track . Path ) , TrackArtist = _album . Artist , TrackTitle = track . Title , } ) ; } return new WplContent ( ) . ToText ( playlist ) ; }
Returns the playlist in wpl format.
Returns the playlist in wpl format .