Skip to content

Commit b7226f1

Browse files
committed
feat: allow shared albums to sync
1 parent 7bdaec0 commit b7226f1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

immich/albums.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,18 @@ func (ic *ImmichClient) GetAllAlbums(ctx context.Context) ([]AlbumSimplified, er
4646
if err != nil {
4747
return nil, err
4848
}
49-
return albums, nil
49+
50+
var sharedAlbums []AlbumSimplified
51+
err2 := ic.newServerCall(ctx, EndPointGetAllAlbums).
52+
do(
53+
getRequest("/albums?shared=true", setAcceptJSON()),
54+
responseJSON(&sharedAlbums),
55+
)
56+
if err2 != nil {
57+
return nil, err
58+
}
59+
60+
return append(albums, sharedAlbums...), nil
5061
}
5162

5263
type AlbumContent struct {

0 commit comments

Comments
 (0)