From 679c26e43fa4a3d57459dbe296dea044f88cce0d Mon Sep 17 00:00:00 2001 From: mkelvers Date: Sun, 24 May 2026 20:31:06 +0200 Subject: [PATCH] feat: show only episodes in current range, update label --- templates/watch.gohtml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/watch.gohtml b/templates/watch.gohtml index c67f6d1..37cd9a5 100644 --- a/templates/watch.gohtml +++ b/templates/watch.gohtml @@ -6,6 +6,9 @@ {{$currentEpID := .CurrentEpID}} {{if or (not $currentEpID) (eq (printf "%v" $currentEpID) "0") (eq (printf "%v" $currentEpID) "")}}{{$currentEpID = "1"}}{{end}} {{$totalEpisodes := len $episodes}} +{{$currentEpNum := atoi $currentEpID}} +{{$rangeStart := add (imul (idiv (sub $currentEpNum 1) 100) 100) 1}} +{{$rangeEnd := min (add $rangeStart 99) $totalEpisodes}}
@@ -188,7 +191,7 @@
@@ -217,7 +220,7 @@ {{$isCurrent := eq (printf "%v" .Number) $currentEpID}} {{$isFiller := .Filler}} {{$isRecap := .Recap}} - + {{.Number}} {{if .SubOnly}}Sub{{end}}