Prefer PHYSICAL_RELEASE_DATE to DIGITAL_RELEASE_DATE

This commit is contained in:
RemixDev 2021-05-31 22:30:16 +02:00
parent 1b51b3ce8f
commit a71f86b000
3 changed files with 6 additions and 0 deletions

View file

@ -71,6 +71,7 @@ async function generateAlbumItem(dz, id, bitrate, rootArtist){
let albumAPI_gw = await dz.gw.get_album(id)
albumAPI.nb_disk = albumAPI_gw.NUMBER_DISK
albumAPI.copyright = albumAPI_gw.COPYRIGHT
albumAPI.release_date = albumAPI_gw.PHYSICAL_RELEASE_DATE
albumAPI.root_artist = rootArtist
// If the album is a single download as a track

View file

@ -128,6 +128,10 @@ class Album {
let explicitLyricsStatus = albumAPI_gw.EXPLICIT_ALBUM_CONTENT.EXPLICIT_LYRICS_STATUS
this.explicit = [LyricsStatus.EXPLICIT, LyricsStatus.PARTIALLY_EXPLICIT].includes(explicitLyricsStatus)
this.addExtraAlbumGWData(albumAPI_gw)
}
addExtraAlbumGWData(albumAPI_gw){
if (this.pic.md5 == ""){
this.pic.md5 = albumAPI_gw.ALB_PICTURE
}

View file

@ -157,6 +157,7 @@ class Track {
}
// Fill missing data
if (albumAPI_gw) this.album.addExtraAlbumGWData(albumAPI_gw)
if (this.album.date && !this.date) this.date = this.album.date
if (!this.album.discTotal) this.album.discTotal = albumAPI_gw.NUMBER_DISK || "1"
if (!this.copyright) this.copyright = albumAPI_gw.COPYRIGHT