mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
Mark watched not working for media mis-identified and then corrected #7916
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#7916
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 @poweredbyporkers on GitHub (Dec 14, 2025).
Description of the bug
If I issue an API command to mark a media item (that was initially mismatched) as watched (in this case) it returns a 200 OK but doesn't mark them as watched. This also happens via UI and tried marking as watched, and the same thing, they just never stick at being watched it just immediately goes from watched back to unwatched (in terms of the tick changing colour)
Monitoring the network tab in chrome dev tools shows the same issue as the API call a 200 response but with {"PlaybackPositionTicks": 0, "PlayCount": 0, "IsFavorite": false, "Played": false, "Key": "503901", "ItemId": "978b227d683dbf824d134ba62f60db32"}
Reproduction steps
I'm not sure it's easy to supply replication steps as it has to match an incorrect item but for me the example is
The Bodyguard (1992) (tt0103855) for some reason matched to a Russian movie called Телохранитель (1992) (tt0197013) which has an aka of The Bodyguard
So the item was stored with 2 new rows with keys tt0197013 and 503901
Correcting the match created 3 new rows with keys tt0103855, 619 and the item id
What is the current bug behavior?
When changing watched status via the API or UI it returns all 5 rows in the query and the proper 3 keys via
var keys = item.GetUserDataKeys();It then updates these 3 correct codes to watched, for example, but the older codes which happen to be the first two results are ignored
Then is returns the first row of the result set which is Played=False as the old keys aren't updated, which is correct, but this leads to the database thinking it's watched and the API/UI thinking it's unwatched
What is the expected correct behavior?
I suspect that given UserDataManager.SaveUserData is the lowest point of many paths there should be a method added to clear out any keys for this ItemId/UserId combo that weren't returned as part of the item.GetUserDataKeys() call something like. This would lessen the chance of the issue being seen as old keys would be automatically removed and the correct item would be selected and returned to the API/UI
Jellyfin Server version
10.11.4
Specify commit id
No response
Specify unstable release number
No response
Specify version number
No response
Specify the build version
10.11.4
Environment
Jellyfin logs
FFmpeg logs
Client / Browser logs
No response
Relevant screenshots or videos
No response
Additional information
No response
@poweredbyporkers commented on GitHub (Dec 15, 2025):
Apologies, I think this is the same as https://github.com/jellyfin/jellyfin/issues/15615. I did search but was using the wrong terminology
@Smeagolworms4 commented on GitHub (Dec 15, 2025):
+1 These are old folders I used to use as collections, now seen as TV shows. And it's impossible to force them to be used as collections. No NFO files or anything...