Commit Graph
5 Commits
Author SHA1 Message Date
Hermes (Server)andClaude Opus 5 15e3d44453 Automatische Erkennung: neue Dateien auf dem Geraet und neue Alben am Server
- AutoScan: beim Zurueckkehren in die App wird die Zahl der Musikdateien
  mit der Bibliothek verglichen; nur bei Abweichung laeuft ein Scan, und
  hoechstens alle 5 Minuten. Gleich viele Loeschungen wie Neuzugaenge
  bleiben unbemerkt - dafuer gibt es den Scan von Hand.
- ServerNeuheiten: meldet neu auf Navidrome aufgetauchte Alben im
  Online-Tab. Der erste Abruf meldet bewusst nichts, sonst waere die ganze
  Sammlung "neu"; er nutzt die ohnehin geladenen Alben statt eines zweiten
  Serveraufrufs.
- Neu: MeloDb.countSongs(), countAndroidMediaStoreSongs().

189 Tests gruen, flutter analyze ohne Befund.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018NLW1q1hzEC9goDQ1dJ98d
2026-08-20 19:19:04 +02:00
dustinandClaude Opus 5 7aa98864aa Kategorien (mehrere je Song), Metadaten-Ansicht mit Expertenmodus
- DB-Schema 4: Tabelle song_categories + Spalte categories_edited
- Kategorien kommen aus dem Genre-Tag (Trennung an ; , | /), manuell
  bearbeitbar; von Hand gesetzte Kategorien ueberlebt der naechste Scan
- Songzeile zeigt "Kuenstler | Kategorie1 - Kategorie2"
- Einstellung "Gleiche Kategorie = gleiches Coverbild" (Standard an)
- Metadaten-Sheet mit ausklappbarem Expertenmodus
- Neu: categories.dart, category_service.dart, song_detail_sheet.dart,
  app_settings.dart

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011snPXPafPC5i87o68H14W7
2026-08-20 18:29:45 +02:00
Dustin-Mike Jens HähnelandClaude Haiku 4.5 d04783073f Fix critical blocker issues and improve tests
## Critical Blockers Fixed
- Remove playbackState.addError() which broke audio_service permanently
  - Move error handling from audio_handler to song_list where UI context exists
  - Display error in SnackBar instead of destroying playback stream

- Add escapeChar parameter to LIKE queries for correct wildcard handling
  - Fixes broken search for titles with _ or % characters

- Add dismissScanError() method to allow closing error banner
  - Previously banner couldn't be dismissed (missing notifyListeners())

## Improvements
- Remove dead livePaths list, use companions.isNotEmpty instead
- Add initial progress update to show total files when scan starts
- Add tooltip to now_playing_screen Zurück button
- Add proper error handling in song_list with async/await

## Testing
- Add regression test for CRITICAL-1: empty scan doesn't delete songs
- Add regression test for CRITICAL-2: tombstoned files restore on re-scan
- All 11 tests pass

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-16 19:09:00 +02:00
Dustin-Mike Jens HähnelandClaude Haiku 4.5 4fa8d12fa0 Fix critical data loss bugs and improve error handling
## Critical Fixes
- Fix CRITICAL-1: Empty scans no longer delete entire library
  - Use timestamp-based tombstone logic instead of path-based
  - Only mark missing if livePaths is not empty

- Fix CRITICAL-2: Re-scanned files now return from deleted state
  - Add deleted=false to SongsCompanion.insert in both scanners

## High Priority Fixes
- HIGH-1: Fix SQLite variable limit crash on large libraries
  - Replace isNotIn() with timestamp comparison (O(1) not O(n))

- HIGH-2: Fix UI freezing during scan
  - Throttle progress updates (every 50 files or end of scan)

- HIGH-3: Add error handling for scan failures
  - Wrap scanFolders/scanAndroidMediaStore in try/catch
  - Display scanError banner in LibraryScreen

- HIGH-4: Add error handling for playback failures
  - Wrap loadPlaylist in try/catch

## Medium Priority Fixes
- MEDIUM-1: Replace ! with ?? to handle unknown ProcessingState
- MEDIUM-2: Escape LIKE wildcards in search queries
- MEDIUM-4: Display StreamBuilder errors instead of treating as empty
- MEDIUM-8: Add tooltips to all IconButtons for accessibility
- Add doc comments to public database APIs

## Testing
- Add regression tests for CRITICAL-1 and CRITICAL-2
- All 9 existing tests pass

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-16 19:04:54 +02:00
Dustin-Mike Jens Hähnel b5ab7bd9dd Initial commit 2026-08-16 18:46:06 +02:00