fix: startup speed, image retry, shuffle random start, genres, search badge, playlist refresh

- Remove await on fetchRomajiIndex() at startup so navigation is not blocked
  by the romaji index network call (was the main cause of 30s Android startup)
- Add window._imgRetry() with 3 retries (1.5s/3s/4.5s backoff) for all card/
  song/cover images that fail to load; falls back to emoji only after exhausting retries
- playQueue with HAS_BRIDGE + shuffle: pick a random startIdx so album/playlist
  playback starts at a random track, not always index 0
- Reduce mobile genre grid limit from 12 to 6
- Fix "Global Suche" badge text: was "iTunes Store + Local", now "iTunes Store"
- deleteSong: always refresh loadPlaylists() unconditionally (not just when
  page is active) with a 3s delay so song counts are current when navigating back

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-06-04 10:38:15 +02:00
1 parent 6dc47a2c77
commit 1f1a5cd3a6
6 files changed
+26 -13

No files matched your search

+5 -5
View File
@@ -536,13 +536,13 @@ export async function deleteSong() {
if (!r.ok) throw new Error(d.error || `HTTP ${r.status}`);
toast(`🗑 "${s.title}" gelöscht`);
closeInfoModal();
// Refresh playlist views after Navidrome's background scan has a chance to finish
// Refresh playlist data after Navidrome's background scan has a chance to finish.
// Always reload playlists (even if not active) so counts are fresh when navigating back.
setTimeout(() => {
if (document.getElementById('page-playlists')?.classList.contains('active'))
loadPlaylists();
else if (document.getElementById('page-playlist-detail')?.classList.contains('active') && S._currentPlaylist)
loadPlaylists();
if (document.getElementById('page-playlist-detail')?.classList.contains('active') && S._currentPlaylist)
loadPlaylistDetail(S._currentPlaylist);
}, 2000);
}, 3000);
} catch (e) {
status.textContent = '❌ Fehler: ' + e.message;
}