diff --git a/backend/iclouddrive/api/photos.go b/backend/iclouddrive/api/photos.go index 4c3e2457d..7b31da02b 100644 --- a/backend/iclouddrive/api/photos.go +++ b/backend/iclouddrive/api/photos.go @@ -606,6 +606,13 @@ func (ps *PhotosService) discoverLibraries(ctx context.Context) (*libraryDiscove continue } name := zone.ZoneID.ZoneName + // Only PrimarySync and SharedSync-* are photo libraries. Other + // zones (e.g. CMM-* shared-album zones) appear in changes/database + // but have no CPLAlbumByPositionLive index, so querying their + // albums returns BAD_REQUEST / "Index has invalid data". + if name != "PrimarySync" && !strings.HasPrefix(name, "SharedSync") { + continue + } // SharedSync-* found in private takes precedence over shared if _, exists := result.libraries[name]; exists { continue