set album cover from asset

This commit is contained in:
timonrieger
2026-01-25 22:48:28 +01:00
parent 3b0be896e6
commit 9cd9d4b33f
4 changed files with 103 additions and 0 deletions

View File

@@ -240,6 +240,12 @@ class ActionService {
return _downloadRepository.downloadAllAssets(assets);
}
Future<bool> setAlbumCover(String albumId, String assetId) async {
final updatedAlbum = await _albumApiRepository.updateAlbum(albumId, thumbnailAssetId: assetId);
await _remoteAlbumRepository.update(updatedAlbum);
return true;
}
Future<int> _deleteLocalAssets(List<String> localIds) async {
final deletedIds = await _assetMediaRepository.deleteAll(localIds);
if (deletedIds.isEmpty) {