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>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
4fa8d12fa0
commit
d04783073f
@@ -34,12 +34,8 @@ class MeloAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
|
||||
final sources = items
|
||||
.map((item) => AudioSource.uri(Uri.parse(item.id), tag: item))
|
||||
.toList();
|
||||
try {
|
||||
await _player.setAudioSources(sources, initialIndex: startIndex);
|
||||
await play();
|
||||
} catch (e) {
|
||||
playbackState.addError(e);
|
||||
}
|
||||
await _player.setAudioSources(sources, initialIndex: startIndex);
|
||||
await play();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -17,6 +17,7 @@ class NowPlayingScreen extends StatelessWidget {
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
leading: IconButton(
|
||||
tooltip: 'Schließen',
|
||||
icon: const Icon(Icons.keyboard_arrow_down),
|
||||
onPressed: () => Navigator.of(context).maybePop(),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user