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
View File
@@ -359,6 +359,11 @@ export function playQueue(songs, startIdx) {
_radioFilling = false; // cancel any in-flight radio fill for the old queue
S._origQueue = null;
_histClear();
// On Android with shuffle on, start at a random position so we don't always
// begin at index 0 (the first album/playlist track).
if (HAS_BRIDGE && S.shuffle && songs.length > 1) {
startIdx = Math.floor(Math.random() * songs.length);
}
if (!HAS_BRIDGE && S.shuffle && songs.length > 1) {
const start = songs[startIdx];
const rest = songs.filter((_, i) => i !== startIdx).sort(() => Math.random() - 0.5);