Review-Funde: Playlist-Wiederherstellung nach erstem Sync, CHANGELOG korrigiert, Dedup-sicheres songByCloudId

This commit is contained in:
Hermes (Server)
2026-08-27 14:04:28 +02:00
parent b13ed6271d
commit b7c8be6f0f
3 changed files with 17 additions and 10 deletions
+7 -3
View File
@@ -546,9 +546,13 @@ class MeloDb extends _$MeloDb {
.write(SongsCompanion(cloudId: Value(cloudId)));
}
Future<Song?> songByCloudId(String cloudId) =>
(select(songs)..where((s) => s.cloudId.equals(cloudId)))
.getSingleOrNull();
Future<Song?> songByCloudId(String cloudId) async {
final treffer = await (select(songs)
..where((s) => s.cloudId.equals(cloudId))
..limit(1))
.get();
return treffer.isEmpty ? null : treffer.single;
}
/// Titel, die am Server gelöscht wurden, auch auf dem Gerät als gelöscht
/// markieren. Grabstein statt echtem Löschen — sonst legt der nächste Scan