fix: remove romaji album name from player bar and now-playing overlay
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
8f7f1e2635
commit
da68afe0e0
1 file changed
+4
-4
@@ -1,6 +1,6 @@
|
|||||||
import { S } from '../state.js';
|
import { S } from '../state.js';
|
||||||
import { esc, formatDur, toast } from '../utils.js';
|
import { esc, formatDur, toast } from '../utils.js';
|
||||||
import { api, streamUrl, coverUrl, downloadUrl, dispTitle, dispArtist, dispArtistParts, dispAlbum } from '../api.js';
|
import { api, streamUrl, coverUrl, downloadUrl, dispTitle, dispArtist, dispArtistParts } from '../api.js';
|
||||||
// views.js/ui.js circular imports — safe (only used inside function bodies)
|
// views.js/ui.js circular imports — safe (only used inside function bodies)
|
||||||
import { loadRecommendations } from '../views/views.js';
|
import { loadRecommendations } from '../views/views.js';
|
||||||
import { updateLyricsHighlight, onNpSongChange, syncNowPlaying } from './nowplaying.js';
|
import { updateLyricsHighlight, onNpSongChange, syncNowPlaying } from './nowplaying.js';
|
||||||
@@ -469,7 +469,7 @@ export function updatePlayerUI(s, _skipMediaSession = false) {
|
|||||||
? artistParts.map(a => `<span style="cursor:pointer" onclick="s_goArtist(event,'${esc(a.originalName||a.name)}','${a.id||''}')">${esc(a.name)}</span>`)
|
? artistParts.map(a => `<span style="cursor:pointer" onclick="s_goArtist(event,'${esc(a.originalName||a.name)}','${a.id||''}')">${esc(a.name)}</span>`)
|
||||||
.join('<span style="color:var(--text3)"> • </span>')
|
.join('<span style="color:var(--text3)"> • </span>')
|
||||||
: '—';
|
: '—';
|
||||||
document.getElementById('player-album-name').textContent = dispAlbum(s);
|
document.getElementById('player-album-name').textContent = s.album || '';
|
||||||
const art = document.getElementById('player-art');
|
const art = document.getElementById('player-art');
|
||||||
const cv = coverUrl(s.coverArt, 256);
|
const cv = coverUrl(s.coverArt, 256);
|
||||||
const existingImg = art.querySelector('img');
|
const existingImg = art.querySelector('img');
|
||||||
@@ -594,7 +594,7 @@ export function _syncNpDirect(s) {
|
|||||||
.join('<span style="opacity:.5"> • </span>')
|
.join('<span style="opacity:.5"> • </span>')
|
||||||
: '—';
|
: '—';
|
||||||
}
|
}
|
||||||
const aln = document.getElementById('np-album-name'); if(aln) aln.textContent = dispAlbum(s);
|
const aln = document.getElementById('np-album-name'); if(aln) aln.textContent = s.album || '';
|
||||||
syncNpStar();
|
syncNpStar();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1255,7 +1255,7 @@ export function _restoreLastPlayed() {
|
|||||||
? artistParts.map(a => `<span style="cursor:pointer" onclick="s_goArtist(event,'${esc(a.originalName||a.name)}','${a.id||''}')">${esc(a.name)}</span>`)
|
? artistParts.map(a => `<span style="cursor:pointer" onclick="s_goArtist(event,'${esc(a.originalName||a.name)}','${a.id||''}')">${esc(a.name)}</span>`)
|
||||||
.join('<span style="color:var(--text3)"> • </span>')
|
.join('<span style="color:var(--text3)"> • </span>')
|
||||||
: '—';
|
: '—';
|
||||||
document.getElementById('player-album-name').textContent = dispAlbum(s) || s.album || '';
|
document.getElementById('player-album-name').textContent = s.album || '';
|
||||||
const art = document.getElementById('player-art');
|
const art = document.getElementById('player-art');
|
||||||
const cv = coverUrl(s.coverArt, 256);
|
const cv = coverUrl(s.coverArt, 256);
|
||||||
art.innerHTML = cv ? `<img src="${cv}" style="width:100%;height:100%;object-fit:cover">` : '<div class="no-art">♪</div>';
|
art.innerHTML = cv ? `<img src="${cv}" style="width:100%;height:100%;object-fit:cover">` : '<div class="no-art">♪</div>';
|
||||||
|
|||||||
Reference in new issue
Block a user