mirror of
https://gitlab.com/RemixDev/deemix-js.git
synced 2024-12-28 02:16:08 +00:00
Prefer PHYSICAL_RELEASE_DATE to DIGITAL_RELEASE_DATE
This commit is contained in:
parent
1b51b3ce8f
commit
a71f86b000
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue