Commit Graph
2 Commits
Author SHA1 Message Date
Hermes (Server)andClaude Haiku 4.5 edc93224b0 feat(player): Wiedergabeposition merken und beim Laden fortsetzen
- MeloAudioHandler bekommt MeloDb per Konstruktor injiziert
- Positions-Timer (alle 5s) schreibt db.recordPlayback(songId, positionMs)
  während aktiv abgespielt wird (songId aus mediaItem.extras['songId'])
- loadPlaylist liest db.lastPosition() für den Start-Song und seekt vor
  dem play() an die gespeicherte Position, statt immer von vorne zu starten
- shouldResumeAt() als reine, testbare Funktion extrahiert: kein Resume bei
  Position 0 oder innerhalb der letzten 3s einer bekannten Track-Dauer
- dispose() zum gefahrlosen Abbrechen des Positions-Timers in Tests ohne
  vollen App-Lifecycle (super.stop() lässt sich in Widget-Tests wegen der
  aktiven playbackState-Pipe nicht gefahrlos aufrufen)
- library_screen_test.dart: MeloAudioHandler-Konstruktion angepasst (db
  jetzt Pflichtparameter) + handler.dispose() im Teardown

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-18 18:17:26 +02:00
Hermes (Server)andClaude Haiku 4.5 58ceb42769 feat(library): add Artist and Album browsing tabs
- Library screen now has a TabBar (Alle / Künstler / Alben) inside a
  DefaultTabController; scan/permission/error banners stay above the
  TabBarView so they remain visible regardless of the active sub-tab
- New lib/library/song_grouping.dart: pure, unit-tested functions
  groupByArtist/groupByAlbum (null artist/album -> "Unbekannt" /
  "Unbekanntes Album", alphabetically sorted) plus albumArtistLabel
  ("Verschiedene Interpreten" when an album mixes artists)
- New lib/library/artist_list.dart + album_list.dart: StreamBuilder on
  MeloDb.watchSongs(), grouped client-side, tapping a row pushes a
  SongList screen for that artist/album; album rows show a CoverImage
  thumbnail from the first song's coverPath
- Existing "Alle" tab content (recently-added strip, full song list,
  empty state) preserved unchanged, moved into _AllSongsTab

Genre browsing is intentionally out of scope: the Songs table has no
genre column and neither scanner extracts genre metadata — needs a
schema migration + scanner work in a future task.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-18 17:34:41 +02:00