mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
/items API incorrect number of items returned #7553
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CyferShepard on GitHub (Oct 24, 2025).
Description of the bug
When querying the /items endpoint for a specific ParentId, I get a TotalRecordCount of 1074, but the returned items only returns 1071 Items. Checking in Jellyfins UI, my library count for that Id is 1102. There appears to be be a mis-match between all 3 sets of data.
Reproduction steps
1.Sign in to Jellyfin
2. Go to a specific library and copy its Id to be used as the ParentId
3. Make an API call to
/itemsendpoint with the specified ParentIdWhat is the current bug behavior?
Mismatch of returned Items count agains TotalRecordCount and Total Items displayed in the library UI
What is the expected correct behavior?
All numbers should be the same.
Jellyfin Server version
10.10.0+
Specify commit id
No response
Specify unstable release number
No response
Specify version number
No response
Specify the build version
10.11.0
Environment
Jellyfin logs
FFmpeg logs
Client / Browser logs
No response
Relevant screenshots or videos
Additional information
No response
@CyferShepard commented on GitHub (Oct 24, 2025):
Heres my postman request as a curl string.
curl --location 'http://IP_HERE:8096/Items?ParentId=XXXX-XXXX-XXXX-XXXX' \ --header 'X-MediaBrowser-Token: XXXXXXXXX'@Drikanis commented on GitHub (Oct 25, 2025):
In my case my TotalRecordCount does match the number of items returned, but there are items missing from the list that should be there. The items that are missing appear to be new, and they show up in the web UI. If I manually rescan the library, they'll then suddenly show up in the API correctly.
My guess is that it's caching this data but not properly invalidating it when new items are added?
@Riko136 commented on GitHub (Nov 30, 2025):
For me the issue was Radarr. When setting up radarr I imported the movies from my jellyfin media folder and according to the radarr's logs, after the successful import, it started "performing post-add actions" which usually includes copying or hardlinking the movies to the jellyfin media folder. Now my jellyfin media folder didn't have any duplicate files as a result, but apparently radarr somehow triggered jellyfin to create duplicate entries in the database. I just had to manually delete them with an api call DELETE item/{id}