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
+4
View File
@@ -8,6 +8,7 @@ class Song {
final String? coverPfad;
final int groesseBytes;
final bool istHeruntergeladen;
final bool istKorrupt; // true wenn Datei defekt (Magic-Byte-Check, ffprobe, Playback-Fehler)
final String hinzugefuegtAm;
final String downloadQuelle; // "local", "youtube", "server"
final String? streamUrl; // Für Server-Streaming (Navidrome) wird bewusst NICHT in der DB persistiert (Auth-Token-Schutz)
@@ -24,6 +25,7 @@ class Song {
this.coverPfad,
this.groesseBytes = 0,
this.istHeruntergeladen = false,
this.istKorrupt = false,
String? hinzugefuegtAm,
this.downloadQuelle = 'local',
this.streamUrl,
@@ -40,6 +42,7 @@ class Song {
'cover_pfad': coverPfad,
'groesse_bytes': groesseBytes,
'ist_heruntergeladen': istHeruntergeladen ? 1 : 0,
'ist_korrupt': istKorrupt ? 1 : 0,
'hinzugefuegt_am': hinzugefuegtAm,
'download_quelle': downloadQuelle,
'stream_url': null, // Token-haltige Stream-URLs nie persistieren (Sicherheit)
@@ -56,6 +59,7 @@ class Song {
coverPfad: m['cover_pfad'] as String?,
groesseBytes: m['groesse_bytes'] as int? ?? 0,
istHeruntergeladen: (m['ist_heruntergeladen'] as int?) == 1,
istKorrupt: (m['ist_korrupt'] as int?) == 1,
hinzugefuegtAm: m['hinzugefuegt_am'] as String?,
downloadQuelle: m['download_quelle'] as String? ?? 'local',
streamUrl: m['stream_url'] as String?,