This commit is contained in:
ponzischeme89
2026-08-28 23:00:02 +12:00
parent 3e89036f7b
commit d5632e844a
66 changed files with 2870 additions and 689 deletions
+19
View File
@@ -248,6 +248,25 @@ func (s *Server) handlePlayback(w http.ResponseWriter, r *http.Request, sess sto
"negotiation_duration", time.Since(negotiationStarted).Round(time.Millisecond),
)
// Starting to watch it retires the REQUEST READY pin — the request journey is complete,
// and from here the card is ordinary Continue Watching. Best-effort and detached: the
// viewer is about to watch something regardless of whether this write lands, and the
// age-out sweep is the backstop. itemID is the id the card opened (the series id for a
// series request); target.ID is the resolved movie or episode.
if s.store != nil {
detached := context.WithoutCancel(ctx)
go func() {
cleared, err := s.store.ClearRequestReadySurfaced(detached, sess.EmbyUserID, itemID, target.ID)
if err != nil {
s.loggerFor(detached).Warn("request ready pin not cleared", "error", err)
return
}
if cleared > 0 {
s.invalidateHomeFor(detached, sess.EmbyUserID)
}
}()
}
nextAiringAvailable, nextAiringLabel, nextAiringDayLabel, nextAiringCode :=
s.nextAiringFieldsFor(ctx, target)
writeJSON(w, http.StatusOK, playbackResponse{