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