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
+26
View File
@@ -0,0 +1,26 @@
class Playlist {
final int? id;
final String name;
final String erstelltAm;
int songCount;
Playlist({
this.id,
required this.name,
String? erstelltAm,
this.songCount = 0,
}) : erstelltAm = erstelltAm ?? DateTime.now().toIso8601String();
Map<String, dynamic> toMap() => {
'id': id,
'name': name,
'erstellt_am': erstelltAm,
};
factory Playlist.fromMap(Map<String, dynamic> m, {int songCount = 0}) => Playlist(
id: m['id'] as int?,
name: m['name'] as String,
erstelltAm: m['erstellt_am'] as String?,
songCount: songCount,
);
}
+5 -1
View File
@@ -19,4 +19,8 @@ class Tag {
icon: m['icon'] as String?,
farbeHex: m['farbe_hex'] as String?,
);
}
Map<String, String> toDisplay() => {
'name': name,
'icon': icon ?? '',
};}