Navidrome-Integration, Widgets (Recent + Tag-Statistik)

This commit is contained in:
Hermes (Server)
2026-07-23 22:23:28 +02:00
parent 94a4063070
commit c7828b851c
16 changed files with 1434 additions and 158 deletions
+12
View File
@@ -139,6 +139,18 @@ class DbHelper {
}
}
/// Die letzten [anzahl] abgespielten Songs
Future<List<Song>> letzteWiedergaben({int anzahl = 5}) async {
final d = await db;
final rows = await d.rawQuery('''
SELECT s.* FROM songs s
JOIN wiedergabe_verlauf w ON s.id = w.song_id
ORDER BY w.zuletzt_abgespielt DESC
LIMIT ?
''', [anzahl]);
return rows.map((r) => Song.fromMap(r)).toList();
}
// ─── Tags ────────────────────────────────────────
Future<int> tagErstellen(String name, {String? icon, String? farbe}) async {