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}}