feat: use saved progress for watch button on anime page
Check continue_watching_entry to find the episode to resume from. Show 'Continue Episode N' instead of 'Watch Now' when progress exists.
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
{{if $anime.ShortRating}}<span class="flex items-center gap-1.5"><span>•</span>{{$anime.ShortRating}}</span>{{end}}
|
||||
</div>
|
||||
|
||||
{{template "watchlist_actions" dict "Anime" $anime "User" .User "Status" .Status}}
|
||||
{{template "watchlist_actions" dict "Anime" $anime "User" .User "Status" .Status "ContinueWatchingEp" .ContinueWatchingEp "ContinueWatchingTime" .ContinueWatchingTime}}
|
||||
|
||||
<div class="flex flex-col gap-12 lg:flex-row">
|
||||
<div class="grow lg:max-w-4xl">
|
||||
|
||||
@@ -46,9 +46,8 @@
|
||||
</div>
|
||||
</ui-dropdown>
|
||||
|
||||
<a href="/anime/{{$anime.MalID}}/watch" class="bg-background-button hover:bg-background-button-hover px-5 py-2.5 text-sm font-medium text-foreground transition-colors">
|
||||
<i class="fa-solid fa-play mr-2"></i>
|
||||
Watch Now
|
||||
<a href="/anime/{{$anime.MalID}}/watch{{if and .ContinueWatchingEp (ne .ContinueWatchingEp 1)}}?ep={{.ContinueWatchingEp}}{{end}}" class="bg-background-button hover:bg-background-button-hover px-5 py-2.5 text-sm font-medium text-foreground transition-colors">
|
||||
{{if and .ContinueWatchingEp (ne .ContinueWatchingEp 1)}}Continue Episode {{.ContinueWatchingEp}}{{else}}Watch Now{{end}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user