Use owner instead of shared flag when fetching albums.

This commit is contained in:
Tom graham
2025-01-08 15:42:37 +11:00
parent e35465ccf3
commit a42911b290
4 changed files with 34 additions and 8 deletions
+13 -3
View File
@@ -46,8 +46,18 @@ class AlbumNotifier extends StateNotifier<List<Album>> {
) =>
_albumService.createAlbum(albumTitle, assets, []);
Future<Album?> getAlbumByName(String albumName, {bool? remote, bool? shared}) =>
_albumService.getAlbumByName(albumName, remote: remote, shared: shared);
Future<Album?> getAlbumByName(
String albumName, {
bool? remote,
bool? shared,
bool? owner,
}) =>
_albumService.getAlbumByName(
albumName,
remote: remote,
shared: shared,
owner: owner,
);
/// Create an album on the server with the same name as the selected album for backup
/// First this will check if the album already exists on the server with name
@@ -55,7 +65,7 @@ class AlbumNotifier extends StateNotifier<List<Album>> {
Future<void> createSyncAlbum(
String albumName,
) async {
final album = await getAlbumByName(albumName, remote: true, shared: false);
final album = await getAlbumByName(albumName, remote: true, owner: true);
if (album != null) {
return;
}