From 99a3aae8439650ce02a04e8b73f415306750d10f Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Fri, 27 Aug 2021 13:43:39 -0700 Subject: [PATCH] Mark viewer as active when fetching playlist. Closes #1343 --- controllers/index.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/index.go b/controllers/index.go index 81e508a27..a8df377b6 100644 --- a/controllers/index.go +++ b/controllers/index.go @@ -59,6 +59,10 @@ func IndexHandler(w http.ResponseWriter, r *http.Request) { if path.Ext(r.URL.Path) == ".m3u8" { middleware.DisableCache(w) + + // Use this as an opportunity to mark this viewer as active. + id := utils.GenerateClientIDFromRequest(r) + core.SetViewerIdActive(id) } // Set a cache control max-age header