v2.32 — Defekte Musik erkennen (Magic Bytes, ffprobe, DB-Flag, UI)

This commit is contained in:
Dustin
2026-08-01 16:40:42 +02:00
parent 4a05c76199
commit 2d4c7c8b98
9 changed files with 352 additions and 4 deletions
+32 -1
View File
@@ -12,6 +12,7 @@ class SongTile extends StatelessWidget {
final ValueChanged<Song> onPlay;
final VoidCallback onMetadataChanged;
final ValueChanged<Song>? onAddToPlaylist;
final ValueChanged<Song>? onErneutHerunterladen;
const SongTile({
super.key,
@@ -21,6 +22,7 @@ class SongTile extends StatelessWidget {
required this.onPlay,
required this.onMetadataChanged,
this.onAddToPlaylist,
this.onErneutHerunterladen,
});
@override
@@ -41,11 +43,40 @@ class SongTile extends StatelessWidget {
: const Center(child: Text('', style: TextStyle(fontSize: 18, color: Colors.white54))),
),
),
title: Text(song.titel, style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Colors.white)),
title: Row(
children: [
if (song.istKorrupt)
const Padding(
padding: EdgeInsets.only(right: 6),
child: Text('⚠️', style: TextStyle(fontSize: 16)),
),
Expanded(
child: Text(
song.titel,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: song.istKorrupt ? MeloTheme.textSekundaer : Colors.white,
decoration: song.istKorrupt ? TextDecoration.lineThrough : null,
),
),
),
],
),
subtitle: Text(song.kuenstler, style: const TextStyle(fontSize: 12, color: MeloTheme.textSekundaer)),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
// ── Korrupt: Erneut herunterladen ──
if (song.istKorrupt && song.downloadQuelle != 'local' && onErneutHerunterladen != null)
InkWell(
borderRadius: BorderRadius.circular(50),
onTap: () => onErneutHerunterladen!(song),
child: const Padding(
padding: EdgeInsets.all(6),
child: Icon(Icons.download_rounded, size: 16, color: MeloTheme.rot),
),
),
InkWell(
borderRadius: BorderRadius.circular(50),
onTap: () async {