Skip to content

Commit

Permalink
Merge pull request #108 from wilbishardis/fix-no-track-download
Browse files Browse the repository at this point in the history
fix: do not download albums with no tracks
  • Loading branch information
Otiel authored Jun 12, 2019
2 parents 78767b3 + c0c47c9 commit e90d9bd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/BandcampDownloader/Core/DownloadManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,13 @@ private async Task<List<Album>> GetAlbumsAsync(List<string> urls) {

// Get info on album
try {
albums.Add(BandcampHelper.GetAlbum(htmlCode));
var album = BandcampHelper.GetAlbum(htmlCode);

if (album.Tracks.Count > 0) {
albums.Add(album);
} else {
LogAdded(this, new LogArgs($"No tracks found for {url}, album will not be downloaded", LogType.Info));
}
} catch {
LogAdded(this, new LogArgs($"Could not retrieve album info for {url}", LogType.Error));
continue;
Expand Down

0 comments on commit e90d9bd

Please sign in to comment.