aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-08-30 20:49:10 -0400
committerBobby <[email protected]>2024-08-30 20:49:10 -0400
commitd8cf01eadeddce6cf183d84a18a6bf047183d255 (patch)
tree5db684055dbb8404856bb88284a460d076bec74e
parent4d0a11ecc65557988201df63487a1a770b1b407f (diff)
downloadyugen-d8cf01eadeddce6cf183d84a18a6bf047183d255.tar.xz
yugen-d8cf01eadeddce6cf183d84a18a6bf047183d255.zip
watch history update + some general stuff
-rw-r--r--watch/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/watch/views.py b/watch/views.py
index 7ebd472..f63b226 100644
--- a/watch/views.py
+++ b/watch/views.py
@@ -63,7 +63,8 @@ def watch(request, anime_id, episode=None):
update_anime_user_history(request.user, anime_id, episode, 0)
watched_episodes = [h.episode for h in anime_history]
- current_watched_time = [h.time_watched for h in anime_history if h.episode == episode][0]
+ current_watched_time = [h.time_watched for h in anime_history if h.episode == episode]
+ current_watched_time = current_watched_time[0] if current_watched_time else 0
else:
anime_history = None
watched_episodes = []