mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
Items appear in "Unplayed" folder listing despite being recently played #7825
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#7825
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @mthaddon on GitHub (Nov 23, 2025).
Description of the bug
I'm using
10.11.3+ubu2404. I have a folder with a large number of "Home Videos and Photos" (335 currently). I have a web client and Android TV client that both have the same folder set with the "Unplayed" filter, but after watching a video, that video will still sometimes appear in both clients.I've confirmed in the SQLITE backend the content in question is correctly marked as watched/played:
If I run "Scan all libraries" from the Dashboard the issues no longer presents itself.
Reproduction steps
What is the current bug behavior?
The item is still visible in an "Unplayed" filter, when it shouldn't be.
What is the expected correct behavior?
The item should be hidden from an "Unplayed" filter.
Jellyfin Server version
10.11.3
Specify commit id
No response
Specify unstable release number
No response
Specify version number
No response
Specify the build version
10.11.3
Environment
Jellyfin logs
FFmpeg logs
Client / Browser logs
N/A
Relevant screenshots or videos
N/A
Additional information
N/A
@mthaddon commented on GitHub (Nov 26, 2025):
If I look at the web client, I see that it's using the following URL for the folder view which is displaying this problem:
http://127.0.0.1:8096/Users/{userId}/Items?StartIndex=0&Limit=100&Fields=PrimaryImageAspectRatio%2CSortName%2CPath%2CChildCount%2CMediaSourceCount%2CPrimaryImageAspectRatio&ImageTypeLimit=1&ParentId={folderId}&SortBy=SortName&SortOrder=Ascending&Filters=IsUnplayed
If I visit this URL when the problem is presenting, I see the items in it which I've recently played and expect to be marked as Played and not included in this view. They have the following properties:
However, if I run the following query I see in the database that they have been marked as Played:
So I think there might be some kind of caching layer in place which is causing the API query above to return incorrect results. I'll see if I can find something related to this.
@mthaddon commented on GitHub (Dec 8, 2025):
I'm making very slow (if any) progress on this as I'm totally new to C#, but what I've found so far is that in
MediaBrowser.Controller/Entities/BaseItem.csas part ofpublic virtual bool IsPlayed(User user, UserItemData userItemData)we're passing in auserItemDatathat has the incorrect status when we run the/Users/UserId/ItemsAPI call. The cache seems to be updated correctly inEmby.Server.Implementations/Library/UserDataManager.csas part of theSaveUserDatafunction. I need to to figure out why the API call is triggeringIsPlayedbut passing inuserItemDatawith the incorrect status for the item in question.@theguymadmax commented on GitHub (Dec 8, 2025):
It's a caching issue on the server; you can apply my PR to fix the issue: #15048
@mthaddon commented on GitHub (Dec 8, 2025):
Thanks, I can confirm that fixes it for me