fix: populate albumArtist in metadata editor via getAlbum fallback
getSong often omits albumArtist; getAlbum always returns album.artist. Enrich the song object before showing the edit form. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
c6990cfd7b
commit
11a31f85aa
1 file changed
+7
@@ -281,6 +281,13 @@ export async function showSongInfo(s) {
|
||||
const r = await api('getSong', `&id=${s.id}`);
|
||||
const full = r.song;
|
||||
if (full) {
|
||||
// getSong often omits albumArtist — fill it from getAlbum which always has album.artist
|
||||
if (!full.albumArtist && full.albumId) {
|
||||
try {
|
||||
const ar = await api('getAlbum', `&id=${full.albumId}`);
|
||||
if (ar.album?.artist) full.albumArtist = ar.album.artist;
|
||||
} catch {}
|
||||
}
|
||||
S.infoSong = full;
|
||||
_renderInfoModal(full);
|
||||
// If edit mode was already opened before getSong returned, refresh the fields
|
||||
|
||||
Reference in new issue
Block a user