Navidrome-Integration, Widgets (Recent + Tag-Statistik)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user