[PR #16071] [MERGED] Rehydrate cached UserData after reattachment #14515

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

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/16071
Author: @MarcoCoreDuo
Created: 1/20/2026
Status: Merged
Merged: 1/23/2026
Merged by: @crobibero

Base: release-10.11.zHead: rehydrate-reattached-userdata


📝 Commits (2)

  • 344a450 Refactor ReattachUserDataAsync to include transaction handling and rehydrate cached userdata
  • c8fbb5b address review comments

📊 Changes

1 file changed (+24 additions, -10 deletions)

View changed files

📝 Jellyfin.Server.Implementations/Item/BaseItemRepository.cs (+24 -10)

📄 Description

After renaming media items, the GetItem API returns cached items without the reattached UserData. This occurs because ReattachUserDataAsync updates the database but does not rehydrate the in-memory item instance. As a result, navigating to a movie or episode page incorrectly shows the item as not played.

Changes

  • Rehydrate item.UserData after database update in ReattachUserDataAsync by reloading UserData from the database
  • Wrap the operation in a transaction

Issues

Fixes https://forum.jellyfin.org/t-new-jellyfin-server-web-release-10-11-6?pid=69525#pid69525


🔄 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/16071 **Author:** [@MarcoCoreDuo](https://github.com/MarcoCoreDuo) **Created:** 1/20/2026 **Status:** ✅ Merged **Merged:** 1/23/2026 **Merged by:** [@crobibero](https://github.com/crobibero) **Base:** `release-10.11.z` ← **Head:** `rehydrate-reattached-userdata` --- ### 📝 Commits (2) - [`344a450`](https://github.com/jellyfin/jellyfin/commit/344a450f07451019b497168195b60ee540ebdf9a) Refactor ReattachUserDataAsync to include transaction handling and rehydrate cached userdata - [`c8fbb5b`](https://github.com/jellyfin/jellyfin/commit/c8fbb5bf4d88c3782f01ef6757ef568899137f2c) address review comments ### 📊 Changes **1 file changed** (+24 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `Jellyfin.Server.Implementations/Item/BaseItemRepository.cs` (+24 -10) </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. --> After renaming media items, the GetItem API returns cached items without the reattached UserData. This occurs because ReattachUserDataAsync updates the database but does not rehydrate the in-memory item instance. As a result, navigating to a movie or episode page incorrectly shows the item as not played. **Changes** - Rehydrate item.UserData after database update in ReattachUserDataAsync by reloading UserData from the database - Wrap the operation in a transaction **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> Fixes https://forum.jellyfin.org/t-new-jellyfin-server-web-release-10-11-6?pid=69525#pid69525 --- <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:31:02 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#14515