diff --git a/lib/parser.js b/lib/parser.js index 43ebd27..f4c708b 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -161,7 +161,7 @@ function parseAlbumInfo(html, opts) { name: release.name, url: release.url, format: release.musicReleaseFormat, - description: release.description, + description: release.description || '', imageUrl: utils.reformatImageUrl(release.image, opts.albumImageFormat) }); }); @@ -172,7 +172,7 @@ function parseAlbumInfo(html, opts) { if (Array.isArray(extra.trackinfo)) { extra.trackinfo.every( track => { if (url.endsWith(track.title_link)) { - file = track.file['mp3-128']; + file = track.file && track.file['mp3-128'] ? track.file['mp3-128'] : null; return false; } return true;