fix: use r.album.sortName for album name — Navidrome only exposes sortName on album objects
Song objects carry sortName for title only, no album/artist sort fields. Album sort is only available on the album object itself (r.album.sortName). Updated loadAlbumDetail to use the fresh API response album, not the nav album. Simplified dispAlbum to not check non-existent song sort fields. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
228f58d6d5
commit
b4ece2db85
2 files changed
+5
-7
No files matched your search
+2
-2
@@ -213,12 +213,12 @@ export function dispArtist(s) {
|
||||
if (st && !_isJp(st)) return st;
|
||||
return romajiLookup(s.id)?.artistRomaji || s.artist || '';
|
||||
}
|
||||
// Songs don't carry album sort — Navidrome only puts sortName on album objects.
|
||||
// Check the override list, then return the raw album name.
|
||||
export function dispAlbum(s) {
|
||||
if (!S.cfg.showRomaji) return s.album || '';
|
||||
const ov = getRomajiOverrides();
|
||||
if (s.album && ov[s.album]) return ov[s.album];
|
||||
const st = s.sortAlbum || s.albumSort;
|
||||
if (st && !_isJp(st)) return st;
|
||||
return s.album || '';
|
||||
}
|
||||
// Returns [{name, id}] like parseArtists but with romaji display names when showRomaji is on.
|
||||
|
||||
Reference in new issue
Block a user