parseAlbumInfo(): handle missing properties
This commit is contained in:
parent
1b389fe823
commit
31079ddef0
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user