v2.32 — Defekte Musik erkennen (Magic Bytes, ffprobe, DB-Flag, UI)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user