v2.52.4 — Einstellungen (F4): Auto-Sync-Intervall, Sleep-Timer-Default, Wiedergabegeschwindigkeit, Akzentfarbe, Storage-Info

This commit is contained in:
Dustin
2026-08-05 11:05:55 +02:00
parent 187b26603b
commit bc3357bf72
7 changed files with 411 additions and 17 deletions
+15
View File
@@ -535,4 +535,19 @@ class DbHelper {
await txn.delete('songs');
});
}
/// Speicher-Info für die Einstellungen (F4): Anzahl lokaler Songs +
/// belegter Speicher in Bytes (Σ `groesse_bytes`).
Future<Map<String, int>> speicherInfo() async {
final d = await db;
final rows = await d.rawQuery(
'SELECT COUNT(*) AS anzahl, COALESCE(SUM(groesse_bytes), 0) AS bytes '
'FROM songs');
if (rows.isEmpty) return {'anzahl': 0, 'bytes': 0};
final erste = rows.first;
return {
'anzahl': (erste['anzahl'] as num?)?.toInt() ?? 0,
'bytes': (erste['bytes'] as num?)?.toInt() ?? 0,
};
}
}