[PR #12492] [MERGED] Fix only returning one item from /Item/Latest api. #13220

Closed
opened 2026-02-07 07:09:09 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/12492
Author: @scampower3
Created: 8/21/2024
Status: Merged
Merged: 3/27/2025
Merged by: @crobibero

Base: masterHead: Home-screen-section-fix


📝 Commits (5)

  • 04f6c5a Updated to EFcore
  • d0d8625 Remove unused using
  • d82910f Dont use DateCreated not from episode type or music type
  • 892b046 use TranslateQuery to filter out instead and then do the grouping and retrival of min and max datecreated instead
  • b356354 Album also

📊 Changes

5 files changed (+90 additions, -0 deletions)

View changed files

📝 Emby.Server.Implementations/Library/LibraryManager.cs (+15 -0)
📝 Emby.Server.Implementations/Library/UserViewManager.cs (+15 -0)
📝 Jellyfin.Server.Implementations/Item/BaseItemRepository.cs (+42 -0)
📝 MediaBrowser.Controller/Library/ILibraryManager.cs (+9 -0)
📝 MediaBrowser.Controller/Persistence/IItemRepository.cs (+9 -0)

📄 Description

Changes

Adds an extra function to the SqliteItemRepository to do a sub query to get the top N number of unique series/albums names sorted by datecreated. The min value of the datecreated from the subquery is then used to retrieve the rows for use for the /item/latest api.

Issues

Fixes https://github.com/jellyfin/jellyfin/issues/10993
Fixes https://github.com/jellyfin/jellyfin/issues/1880


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/12492 **Author:** [@scampower3](https://github.com/scampower3) **Created:** 8/21/2024 **Status:** ✅ Merged **Merged:** 3/27/2025 **Merged by:** [@crobibero](https://github.com/crobibero) **Base:** `master` ← **Head:** `Home-screen-section-fix` --- ### 📝 Commits (5) - [`04f6c5a`](https://github.com/jellyfin/jellyfin/commit/04f6c5ae799c716a2d333adb6d5a53e6c7f98955) Updated to EFcore - [`d0d8625`](https://github.com/jellyfin/jellyfin/commit/d0d8625c40e1fd6e6bce5477bbe8b5e271da1183) Remove unused using - [`d82910f`](https://github.com/jellyfin/jellyfin/commit/d82910f9ca09bb615ffd33202fb5a63ef62b81be) Dont use DateCreated not from episode type or music type - [`892b046`](https://github.com/jellyfin/jellyfin/commit/892b0464a320583d7aecbd017d836efeb9cbb0c6) use TranslateQuery to filter out instead and then do the grouping and retrival of min and max datecreated instead - [`b356354`](https://github.com/jellyfin/jellyfin/commit/b3563549b403c74f9ce62af6263d50a98c3ababf) Album also ### 📊 Changes **5 files changed** (+90 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/Library/LibraryManager.cs` (+15 -0) 📝 `Emby.Server.Implementations/Library/UserViewManager.cs` (+15 -0) 📝 `Jellyfin.Server.Implementations/Item/BaseItemRepository.cs` (+42 -0) 📝 `MediaBrowser.Controller/Library/ILibraryManager.cs` (+9 -0) 📝 `MediaBrowser.Controller/Persistence/IItemRepository.cs` (+9 -0) </details> ### 📄 Description <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** <!-- Describe your changes here in 1-5 sentences. --> Adds an extra function to the SqliteItemRepository to do a sub query to get the top N number of unique series/albums names sorted by datecreated. The min value of the datecreated from the subquery is then used to retrieve the rows for use for the /item/latest api. **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> Fixes https://github.com/jellyfin/jellyfin/issues/10993 Fixes https://github.com/jellyfin/jellyfin/issues/1880 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:09:09 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#13220