{{define "title"}}Watch {{.Anime.Title}}{{end}} {{define "scripts"}}{{end}} {{define "content"}} {{if .WatchlistIDs}}{{end}} {{$anime := .Anime}} {{$episodes := .Episodes}} {{$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}}
Back
{{template "video_player" dict "WatchData" .WatchData "TotalEpisodes" $totalEpisodes}}
{{$prevEp := sub (int $currentEpID) 1}} {{if ge $prevEp 1}} Prev {{end}} {{$nextEp := add (int $currentEpID) 1}} {{if le $nextEp $totalEpisodes}} Next {{end}}
{{if .Seasons}} {{$currentSeason := dict "Prefix" "" "Title" $anime.Title}} {{range .Seasons}} {{if .IsCurrent}}{{$currentSeason = .}}{{end}} {{end}}
{{end}} {{if eq $totalEpisodes 0}}

No episodes found

{{else}}
Episodes {{if gt $totalEpisodes 100}} Episode controls {{end}}
{{if gt $totalEpisodes 100}}
{{end}}
{{if gt $totalEpisodes 100}}
{{range $episodes}} {{$isCurrent := eq (printf "%v" .Number) $currentEpID}} {{$isFiller := .Filler}} {{$isRecap := .Recap}} {{.Number}} {{if .SubOnly}}Sub{{end}} {{end}}
{{else}}
{{range $episodes}} {{$isCurrent := eq (printf "%v" .Number) $currentEpID}} {{$isFiller := .Filler}} {{$isRecap := .Recap}} EP{{.Number}} {{.Title}} {{if .SubOnly}}Sub only{{end}} {{end}}
{{end}} {{end}}
{{end}}