This commit is contained in:
吴璨
2026-08-04 09:40:15 +08:00
parent 536685e327
commit 839ec8eb2e
8 changed files with 68 additions and 31 deletions
+10 -1
View File
@@ -61,6 +61,12 @@ async function fetchNeteaseAlbumDetail(albumId) {
const data = await requestNetease(`/api/v1/album/${albumId}`);
if (!data) return null;
const album = data.album || data;
const albumArtists = (album.artists?.length ? album.artists : [album.artist])
.filter(artist => artist?.name)
.map(artist => ({ id: artist.id, name: artist.name, trans: artist.trans }));
const albumArtist = albumArtists.map(artist => artist.name).join(' / ');
const normalizedAlbumArtist = albumArtist.toLowerCase().replace(/[.\s]/g, '');
const isCompilation = ['群星', 'variousartists', 'variousartist', 'va'].includes(normalizedAlbumArtist);
return {
id: album.id,
name: album.name,
@@ -70,7 +76,10 @@ async function fetchNeteaseAlbumDetail(albumId) {
tags: album.tags || [],
type: album.type || '',
size: album.size || 0,
artist: album.artist ? { id: album.artist.id, name: album.artist.name, trans: album.artist.trans } : null,
artist: albumArtists[0] || null,
artists: albumArtists,
albumArtist,
isCompilation,
picUrl: album.picUrl || '',
tracks: (data.songs || album.songs || []).map(song => ({
id: song.id,