feat: album names use Navidrome sortName tag when showRomaji is on
dispAlbumName now takes the full album object and reads album.sortName directly — no kuromoji fallback, no backend translation. dispAlbum (song context) also drops the kuromoji fallback, keeping only the sortAlbum/albumSort file tag. Override list → Navidrome sort tag → raw Japanese name. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
4c3ec5726c
commit
e3987a6376
5 files changed
+19
-15
No files matched your search
@@ -8,7 +8,7 @@ window._imgRetry = function(img, fallback) {
|
||||
if (n > 3 || !img.src) { img.parentNode.innerHTML = `<div class="no-art">${fallback}</div>`; return; }
|
||||
setTimeout(() => { const s = img.src; img.src = ''; img.src = s; }, 1500 * n);
|
||||
};
|
||||
import { coverUrl, dispTitle, dispArtistParts, dispArtistById } from '../api.js';
|
||||
import { coverUrl, dispTitle, dispArtistParts, dispArtistById, dispAlbumName } from '../api.js';
|
||||
// Circular imports — safe (only used inside event handlers after module init)
|
||||
import { playQueue, toggleStar, playPreview, parseArtists } from '../player/player.js';
|
||||
import { showCtxMenu, openDlModal } from './ui.js';
|
||||
@@ -28,7 +28,7 @@ export function makeCard(title, sub, imgUrl, fallback='💿') {
|
||||
|
||||
export function makeAlbumCard(a) {
|
||||
const cv = coverUrl(a.coverArt, 512);
|
||||
const c = makeCard(a.name || '', dispArtistById(a.artistId, a.artist||''), cv, '💿');
|
||||
const c = makeCard(dispAlbumName(a), dispArtistById(a.artistId, a.artist||''), cv, '💿');
|
||||
c.querySelector('.card-art').onclick = (e) => { e.stopPropagation(); quickPlayAlbum(a); };
|
||||
c.querySelector('.card-info').onclick = () => navigate('album-detail', a);
|
||||
return c;
|
||||
|
||||
Reference in new issue
Block a user