{{define "title"}}Watch {{.Anime.Title}} - MyAnimeList{{end}} {{define "content"}} {{$anime := .Anime}} {{$episodes := .Episodes}} {{$currentEpID := .CurrentEpID}}
{{template "video_player" dict "WatchData" .WatchData "TotalEpisodes" $anime.Episodes}}
{{if eq (len $episodes) 0}}

No episodes found for this anime.

{{else}} {{$totalEps := $anime.Episodes}} {{$fallbackSub := .WatchData.FallbackEpisodes.sub}} {{if gt $fallbackSub $totalEps}} {{$totalEps = $fallbackSub}} {{end}}
{{range $episodes}} {{$isCurrent := eq (printf "%v" .MalID) $currentEpID}}
{{if .Images}} {{if .Images.Jpg.ImageURL}} {{.Title}} {{else}}
{{end}} {{else}}
{{end}}
Episode {{.MalID}} {{.Title}}
{{end}}
{{end}}
{{end}}