Skip to content

Commit

Permalink
fix: save correct track path in playlist file
Browse files Browse the repository at this point in the history
Fixes #82
  • Loading branch information
Otiel committed Apr 25, 2019
1 parent 043034f commit fe740ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/BandcampDownloader/Helpers/PlaylistHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private static String CreateM3uPlaylist(Album album) {
Album = album.Title,
AlbumArtist = album.Artist,
Duration = TimeSpan.FromSeconds(track.Duration),
Path = track.Title + ".mp3",
Path = Path.GetFileName(track.Path),
Title = track.Title,
});
}
Expand All @@ -88,7 +88,7 @@ private static String CreatePlsPlaylist(Album album) {
foreach (Track track in album.Tracks) {
playlist.PlaylistEntries.Add(new PlsPlaylistEntry() {
Length = TimeSpan.FromSeconds(track.Duration),
Path = track.Title + ".mp3",
Path = Path.GetFileName(track.Path),
Title = track.Title,
});
}
Expand All @@ -110,7 +110,7 @@ private static String CreateWplPlaylist(Album album) {
AlbumArtist = album.Artist,
AlbumTitle = album.Title,
Duration = TimeSpan.FromSeconds(track.Duration),
Path = track.Title + ".mp3",
Path = Path.GetFileName(track.Path),
TrackArtist = album.Artist,
TrackTitle = track.Title,
});
Expand All @@ -133,7 +133,7 @@ private static String CreateZplPlaylist(Album album) {
AlbumArtist = album.Artist,
AlbumTitle = album.Title,
Duration = TimeSpan.FromSeconds(track.Duration),
Path = track.Title + ".mp3",
Path = Path.GetFileName(track.Path),
TrackArtist = album.Artist,
TrackTitle = track.Title,
});
Expand Down

0 comments on commit fe740ae

Please sign in to comment.