feat: timer scrobble (12s), artist topsong star+menu, play count toggle
Scrobbling: - Replace end-of-track scrobble with 12s timer approach - Android: schedule on onTrackChanged, cancel on pause - Web: schedule in playCurrent, cancel in togglePlay pause + onEnded - Skip/new track resets the timer automatically (new song ID) Artist top songs: - Add star button and 3-dots context menu to every top song row - Topsong grid expanded to 5 columns to fit action buttons Settings — play count toggle: - New "Bibliothek" section with toggle switch - When on: shows play count in album/playlist song rows - Artist page always shows play count regardless of toggle - Persisted in ns_cfg localStorage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
f79817410b
commit
7e07fef7ba
7 files changed
+57
-13
No files matched your search
+3
-1
@@ -45,6 +45,8 @@ export function makeSongItem(s, idx, list, { noArtistLink = false, noAlbumLink =
|
||||
const albumHtml = !noAlbumLink && (s.albumId||s.album)
|
||||
? `<span style="color:var(--text3)"> · </span><span class="song-link" onclick="event.stopPropagation();s_goAlbum(event,'${s.albumId||''}','${esc(s.album||'')}','${esc(s.artist||'')}','${s.artistId||''}')">${esc(s.album||'')}</span>`
|
||||
: '';
|
||||
const playsHtml = S.cfg.showPlayCount && s.playCount
|
||||
? `<span class="song-plays">${s.playCount.toLocaleString()}</span>` : '';
|
||||
el.innerHTML = `<div class="song-num">${idx+1}</div>
|
||||
<div class="song-thumb">${cv ? `<img src="${cv}" loading="lazy" onerror="this.parentNode.innerHTML='<div class=\\'no-art\\'>♪</div>'">` : '<div class="no-art">♪</div>'}</div>
|
||||
<div class="song-info">
|
||||
@@ -52,7 +54,7 @@ export function makeSongItem(s, idx, list, { noArtistLink = false, noAlbumLink =
|
||||
<div class="song-artist">${artistHtml}${albumHtml}</div>
|
||||
</div>
|
||||
<div class="song-meta">
|
||||
<span class="song-dur">${formatDur(s.duration)}</span>
|
||||
${playsHtml}<span class="song-dur">${formatDur(s.duration)}</span>
|
||||
<div class="song-actions">
|
||||
<button class="icon-btn${s._starred?' starred':''}" title="Favorit"><svg width="12" height="12" viewBox="0 0 24 24" fill="${s._starred?'currentColor':'none'}" stroke="currentColor" stroke-width="2"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg></button>
|
||||
<button class="icon-btn song-menu-btn" title="Mehr Optionen"><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="5" r="1.5"/><circle cx="12" cy="12" r="1.5"/><circle cx="12" cy="19" r="1.5"/></svg></button>
|
||||
|
||||
Reference in new issue
Block a user