API: Added option to inject genere tag from external sources for tracks

This commit is contained in:
RemixDev 2021-09-10 19:24:26 +02:00
parent a2eff225f3
commit a47278ce65

View file

@ -165,6 +165,11 @@ class Track {
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
if (trackAPI_gw.GENRES){
trackAPI_gw.GENRES.forEach((genre) => {
if (!this.album.genre.includes(genre)) this.album.genre.push()
})
}
this.parseTrack(trackAPI)
}