mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
Genres API does not return ItemCount (Albums) when using fields query param #5384
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 @ncrmro on GitHub (Jan 14, 2024).
Please describe your bug
Background: I was hoping to query genres and get album count and feed this to maybe chatGPT to consolidate my 300+ genres.
Issue:
Given a request to the following path
Genres?limit=1&ParentId=LONG_ID&fields=ItemCountI expect to get the count of items in the, though as I write this I realize what is the count of?
I will say the Web UI calls this url on the Genres page
Which returns an item like this but again no count.
I also trying connecting directly to the library database but found it's not in WAL mode.
Jellyfin Version
10.8.z
if other:
No response
Environment
Jellyfin logs
No response
FFmpeg logs
No response
Please attach any browser or client logs here
No response
Please attach any screenshots here
No response
Code of Conduct
@jellyfin-bot commented on GitHub (May 14, 2024):
This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.
If you have any questions you can use one of several ways to contact us.
@jellyfin-bot commented on GitHub (Jun 4, 2024):
This issue was closed due to inactivity.
@chrisbenincasa commented on GitHub (Jul 23, 2024):
Hey there - just wondering if you ever figured a workaround for this. Facing the same issue.
@errorforce commented on GitHub (Mar 30, 2025):
solve it with multiple requests:
get all genres with your url and extract the genre name:
${serverUrl}/Genres?SortBy=SortName&SortOrder=Ascending&Recursive=true&UserId=${userId}
use each genre name and get the count:
${serverUrl}/Users/${userId}/Items?Recursive=true&Genres=${encodeURIComponent(genre.name)}&Limit=0