style: auto-fix formatting issues
This commit is contained in:
parent
9780263cf7
commit
b1936e19a6
1 changed files with 11 additions and 8 deletions
19
js/player.js
19
js/player.js
|
|
@ -717,15 +717,18 @@ export class Player {
|
|||
}
|
||||
|
||||
loadAlbumYear(track, trackArtistsHTML, artistEl) {
|
||||
this.api.getAlbum(track.album.id).then(({ album }) => {
|
||||
if (album?.releaseDate && this.currentTrack?.id === track.id) {
|
||||
track.album.releaseDate = album.releaseDate;
|
||||
const year = new Date(album.releaseDate).getFullYear();
|
||||
if (!isNaN(year) && artistEl) {
|
||||
artistEl.innerHTML = `${trackArtistsHTML} • ${year}`;
|
||||
this.api
|
||||
.getAlbum(track.album.id)
|
||||
.then(({ album }) => {
|
||||
if (album?.releaseDate && this.currentTrack?.id === track.id) {
|
||||
track.album.releaseDate = album.releaseDate;
|
||||
const year = new Date(album.releaseDate).getFullYear();
|
||||
if (!isNaN(year) && artistEl) {
|
||||
artistEl.innerHTML = `${trackArtistsHTML} • ${year}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
}).catch(() => {});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
updatePlayingTrackIndicator() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue