fix: split multi-artists in player bar, each name navigates to own artist profile

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-04-28 00:39:23 +02:00
1 parent 60c9cb6cbb
commit e029a8f900
2 files changed
+15 -3

No files matched your search

+1 -1
View File
@@ -378,7 +378,7 @@
</button> </button>
</div> </div>
<div class="player-artist" id="player-artist"> <div class="player-artist" id="player-artist">
<span id="player-artist-name" onclick="playerBarGoArtist()" style="cursor:pointer" title="Zum Künstler">—</span><span id="player-album-sep" style="color:var(--text3)"> · </span><span id="player-album-name" onclick="playerBarGoAlbum()" style="cursor:pointer" title="Zum Album"></span> <span id="player-artist-name">—</span><span id="player-album-sep" style="color:var(--text3)"> · </span><span id="player-album-name" onclick="playerBarGoAlbum()" style="cursor:pointer" title="Zum Album"></span>
</div> </div>
<div class="player-status-row"> <div class="player-status-row">
<span class="status-badge badge-shuffle" id="badge-shuffle">🔀 Shuffle</span> <span class="status-badge badge-shuffle" id="badge-shuffle">🔀 Shuffle</span>
+14 -2
View File
@@ -26,7 +26,13 @@ export function playCurrent() {
export function updatePlayerUI(s) { export function updatePlayerUI(s) {
document.getElementById('player-title').textContent = s.title; document.getElementById('player-title').textContent = s.title;
document.getElementById('player-artist-name').textContent = s.artist || '—'; const artistParts = (s.artist || '').split(/\s*(?:\/|•|,)\s*/).filter(Boolean);
document.getElementById('player-artist-name').innerHTML = artistParts.length
? artistParts.map((name, i) => {
const aid = i === 0 ? (s.artistId || '') : '';
return `<span style="cursor:pointer" onclick="s_goArtist(event,${JSON.stringify(esc(name))},${JSON.stringify(aid)})">${esc(name)}</span>`;
}).join('<span style="color:var(--text3)"> / </span>')
: '—';
document.getElementById('player-album-sep').style.display = s.album ? '' : 'none'; document.getElementById('player-album-sep').style.display = s.album ? '' : 'none';
document.getElementById('player-album-name').textContent = s.album || ''; document.getElementById('player-album-name').textContent = s.album || '';
const art = document.getElementById('player-art'); const art = document.getElementById('player-art');
@@ -345,7 +351,13 @@ export function _restoreLastPlayed() {
const s = S.queue[S.qIdx]; const s = S.queue[S.qIdx];
if(!s) return; if(!s) return;
document.getElementById('player-title').textContent = s.title || '—'; document.getElementById('player-title').textContent = s.title || '—';
document.getElementById('player-artist-name').textContent = s.artist || '—'; const artistParts = (s.artist || '').split(/\s*(?:\/|•|,)\s*/).filter(Boolean);
document.getElementById('player-artist-name').innerHTML = artistParts.length
? artistParts.map((name, i) => {
const aid = i === 0 ? (s.artistId || '') : '';
return `<span style="cursor:pointer" onclick="s_goArtist(event,${JSON.stringify(esc(name))},${JSON.stringify(aid)})">${esc(name)}</span>`;
}).join('<span style="color:var(--text3)"> / </span>')
: '—';
document.getElementById('player-album-sep').style.display = s.album ? '' : 'none'; document.getElementById('player-album-sep').style.display = s.album ? '' : 'none';
document.getElementById('player-album-name').textContent = s.album || ''; document.getElementById('player-album-name').textContent = s.album || '';
const art = document.getElementById('player-art'); const art = document.getElementById('player-art');