feat: synced lyrics view in Now Playing overlay

Adds a Lyrics tab to the NP overlay using Navidrome's getLyricsBySongId
endpoint. Synced lyrics auto-scroll and highlight the current line as
the track plays; tapping a line seeks to that position. Falls back to
plain text for unsynced lyrics.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-04-26 18:42:45 +02:00
1 parent 93b859bf0e
commit fbabdf8269
6 files changed
+99 -4

No files matched your search

+6
View File
@@ -16,6 +16,12 @@ export async function api(method, extra='') {
return r;
}
export function streamUrl(id) { return apiUrl('stream', `&id=${id}&format=raw`); }
export async function getLyricsBySongId(songId) {
try {
const r = await api('getLyricsBySongId', `&id=${songId}`);
return r.lyricsList?.structuredLyrics ?? [];
} catch { return []; }
}
export function downloadUrl(id) { return apiUrl('download', `&id=${id}`); }
export function coverUrl(id, size=300) { return id ? apiUrl('getCoverArt', `&id=${id}&size=${size}`) : null; }