MrMaps
MrMaps
IImmich
Created by MrMaps on 11/26/2024 in #help-desk-support
Total images retrieved through pagination doesn't match "total"
Thank you very much for the insights! I'll switch to use the hasNextPage field instead of relying in the total counter.
18 replies
IImmich
Created by MrMaps on 11/26/2024 in #help-desk-support
Total images retrieved through pagination doesn't match "total"
Sorry, I'm referring to the "total" field you get when querying the /people endpoint
def retrieve_unknown_faces_paginated(page, result):
res = req.get(
"https://domain/api/people",
params={
"page": page,
"size": MAX,
},
headers=ut.HEADERS["immich"],
timeout=120,
)
data = res.json()
print(data)
# {'people': [], 'hasNextPage': False, 'total': 46655, 'hidden': 1}
def retrieve_unknown_faces_paginated(page, result):
res = req.get(
"https://domain/api/people",
params={
"page": page,
"size": MAX,
},
headers=ut.HEADERS["immich"],
timeout=120,
)
data = res.json()
print(data)
# {'people': [], 'hasNextPage': False, 'total': 46655, 'hidden': 1}
Above is the request for page 43, with size 1000. This is normal request (page 0):
{'people': [{'id': '95478b5b-db69-4dc1-87b8-319176898d0d', 'name': '', 'birthDate': None, 'thumbnailPath': 'upload/thumbs/90f33fc8-629b-48d4-be3d-11a9a6e112de/95/47/95478b5b-db69-4dc1-87b8-319176898d0d.jpeg', 'isHidden': False, 'updatedAt': '2024-10-31T15:34:59.734Z'}, ..., {'id': '6c4a4ddb-a143-48bf-980e-115352781d8e', 'name': '', 'birthDate': None, 'thumbnailPath': 'upload/thumbs/90f33fc8-629b-48d4-be3d-11a9a6e112de/6c/4a/6c4a4ddb-a143-48bf-980e-115352781d8e.jpeg', 'isHidden': False, 'updatedAt': '2024-10-31T18:53:22.499Z'}], 'hasNextPage': True, 'total': 46655, 'hidden': 1}
{'people': [{'id': '95478b5b-db69-4dc1-87b8-319176898d0d', 'name': '', 'birthDate': None, 'thumbnailPath': 'upload/thumbs/90f33fc8-629b-48d4-be3d-11a9a6e112de/95/47/95478b5b-db69-4dc1-87b8-319176898d0d.jpeg', 'isHidden': False, 'updatedAt': '2024-10-31T15:34:59.734Z'}, ..., {'id': '6c4a4ddb-a143-48bf-980e-115352781d8e', 'name': '', 'birthDate': None, 'thumbnailPath': 'upload/thumbs/90f33fc8-629b-48d4-be3d-11a9a6e112de/6c/4a/6c4a4ddb-a143-48bf-980e-115352781d8e.jpeg', 'isHidden': False, 'updatedAt': '2024-10-31T18:53:22.499Z'}], 'hasNextPage': True, 'total': 46655, 'hidden': 1}
18 replies
IImmich
Created by MrMaps on 11/26/2024 in #help-desk-support
Total images retrieved through pagination doesn't match "total"
I'll start from that, thank you
18 replies
IImmich
Created by MrMaps on 11/26/2024 in #help-desk-support
Total images retrieved through pagination doesn't match "total"
I don't see any relevant data about the requests in the logs of docker, is there any way to check what filters are being used when querying the people endpoint?
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:17 AM LOG [Api:RouterExplorer] Mapped {/api/users/profile-image, DELETE} route
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:17 AM LOG [Api:RouterExplorer] Mapped {/api/users/:id/profile-image, GET} route
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:17 AM LOG [Api:RoutesResolver] ViewController {/api/view}:
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:17 AM LOG [Api:RouterExplorer] Mapped {/api/view/folder/unique-paths, GET} route
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:17 AM LOG [Api:RouterExplorer] Mapped {/api/view/folder, GET} route
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:17 AM LOG [Api:NestApplication] Nest application successfully started
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:17 AM LOG [Api:Bootstrap] Immich Server is listening on http://[::1]:2283 [v1.121.0] [production]
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:18 AM LOG [Api:EventRepository] Websocket Connect: R23yLWzkWhayux0yAAAB
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:20 AM LOG [Api:EventRepository] Websocket Connect: qxobXjTaMR65OOKOAAAD
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:17 AM LOG [Api:RouterExplorer] Mapped {/api/users/profile-image, DELETE} route
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:17 AM LOG [Api:RouterExplorer] Mapped {/api/users/:id/profile-image, GET} route
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:17 AM LOG [Api:RoutesResolver] ViewController {/api/view}:
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:17 AM LOG [Api:RouterExplorer] Mapped {/api/view/folder/unique-paths, GET} route
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:17 AM LOG [Api:RouterExplorer] Mapped {/api/view/folder, GET} route
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:17 AM LOG [Api:NestApplication] Nest application successfully started
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:17 AM LOG [Api:Bootstrap] Immich Server is listening on http://[::1]:2283 [v1.121.0] [production]
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:18 AM LOG [Api:EventRepository] Websocket Connect: R23yLWzkWhayux0yAAAB
immich-server-1 | [Nest] 15 - 11/26/2024, 11:14:20 AM LOG [Api:EventRepository] Websocket Connect: qxobXjTaMR65OOKOAAAD
18 replies
IImmich
Created by MrMaps on 11/26/2024 in #help-desk-support
Total images retrieved through pagination doesn't match "total"
Do you mean using withHidden? Or what kind of filters? I only have 1 hidden image, but a difference of 5k still seems pretty significant
18 replies