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:
1 parent
93b859bf0e
commit
fbabdf8269
6 files changed
+99
-4
No files matched your search
@@ -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; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user