/items API incorrect number of items returned #7553

Open
opened 2026-02-07 05:10:38 +03:00 by OVERLORD · 3 comments
Owner

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 /items endpoint with the specified ParentId

What 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

- OS: Docker in Proxmox 
- Linux Kernel:
- Virtualization:
- Clients: Jellyfin Web and Postman
- Browser: Brave
- FFmpeg Version:
- Playback Method:
- Hardware Acceleration:
- GPU Model:
- Plugins:
- Reverse Proxy:
- Base URL:
- Networking:
- Jellyfin Data Storage:
- Media Storage:
- External Integrations:

Jellyfin logs

N/A

FFmpeg logs


Client / Browser logs

No response

Relevant screenshots or videos

Image Image

Additional information

No response

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 `/items ` endpoint with the specified ParentId ### What 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 ```markdown - OS: Docker in Proxmox - Linux Kernel: - Virtualization: - Clients: Jellyfin Web and Postman - Browser: Brave - FFmpeg Version: - Playback Method: - Hardware Acceleration: - GPU Model: - Plugins: - Reverse Proxy: - Base URL: - Networking: - Jellyfin Data Storage: - Media Storage: - External Integrations: ``` ### Jellyfin logs ```shell N/A ``` ### FFmpeg logs ```shell ``` ### Client / Browser logs _No response_ ### Relevant screenshots or videos <img width="387" height="230" alt="Image" src="https://github.com/user-attachments/assets/ce421379-e087-4cfc-9ee7-59e47aa51190" /> <img width="547" height="95" alt="Image" src="https://github.com/user-attachments/assets/dde58256-acd8-4c81-bfdf-0dc8fe85dcf6" /> ### Additional information _No response_
OVERLORD added the bug label 2026-02-07 05:10:38 +03:00
Author
Owner

@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'

@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'```
Author
Owner

@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?

@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?
Author
Owner

@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}

@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}
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#7553