Repository navigation
Playback: leaving for the next episode marks the finished one watched - #969
Merged
Merged
Conversation
A server only marks an item played itself when the stop lands past its own threshold (Jellyfin's MaxResumePct, 90% by default), and long credits start before that. Up Next and Skip on a final credits marker now set PlaybackSession::finished; the stop worker scrobbles the item after the stopped report, before the app reads the watch state back. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Conflicts in route/decision.rs and app/playback.rs resolved onto main's current structure: the session's start-refusal and engine-failure fields stay as main has them with `finished` added beside them; request_play_inner now delegates to request_play_with_queue, so the stale-flag reset moved into the latter (the one door every playback request passes); play_up_next sets `finished` before the shared queue_transport::play stop. The Jellyfin threshold wording in the field's doc is PMS's now. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A stop that finished the item (Up Next, Skip on a final credits marker) posts `stopped` and then the scrobble, and the record the app is told reads as the item's end; the next stop, which was not a finish, posts `stopped` alone. A flag no stop took is cleared by the next playback request. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… scrobbled again Up Next also runs at the end of the stream and when its countdown expires, and the final credits marker usually starts past 90 %, so the stop there already makes PMS count the view; the extra /:/scrobble recorded a second one. The scrobble now follows only a stop below the threshold, through viewstate's existing WATCHED_PERCENT (now one predicate, past_watched_threshold, for the offset clamp and this gate). The 59 s of 60 s case posts stopped alone; the docs that said the stop alone commits the watched state say so no longer. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…e finish scrobble The two stop tests set PlaybackSession::finished by hand, so deleting either line that arms it in the app kept everything green. The flag is taken by the stop it precedes, so the fixture server's request log is the observable: a real Engine, then Up Next (below and past the threshold) and Skip on a final credits marker with Next episode Off, each read off the stop's requests. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Collaborator
|
Merged, thank you! One change on top: the scrobble goes out only when the stop is below the server's 90% mark. Past it the server has already counted the play, and a second scrobble would add a second view. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A server only marks an item played itself when the stop lands past its own threshold and long credits start before that. Up Next and Skip on a final credits marker now set PlaybackSession::finished; the stop worker scrobbles the item after the stopped report, before the app reads the watch state back.