+
+
+
+ Back
+
+
+
+
+
+
+
+
{{template "video_player" dict "WatchData" .WatchData "TotalEpisodes" $anime.Episodes}}
-
+
{{$prevEp := sub (int $currentEpID) 1}}
{{if ge $prevEp 1}}
@@ -30,33 +83,6 @@
{{end}}
-
-
-
-
-
-
-
@@ -156,11 +182,12 @@
});
}
- function removeWatchlist(id) {
+ function removeWatchlist(id, btn) {
fetch('/api/watchlist/' + id, { method: 'DELETE' }).then(res => {
if (res.ok) {
watchlistIds.delete(id);
document.getElementById('watchlist-status-display-' + id).textContent = 'Add to Watchlist';
+ if (window.showToast) showToast({ message: 'Removed from watchlist' });
// Update all watchlist icons on the page
document.querySelectorAll('.watchlist-icon').forEach(function(icon) {
@@ -174,7 +201,6 @@
});
// Close dropdown
- const btn = document.getElementById('watchlist-status-display-' + id);
if (btn) {
const dropdown = btn.closest('ui-dropdown');
if (dropdown) dropdown.close();