aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-10-04 19:23:28 -0400
committerBobby <[email protected]>2024-10-04 19:23:28 -0400
commit84cf5588b43a78cde30dddf18235c494fc1f346f (patch)
tree927b77b2d6628122cfaccc0de33020fbee92a300
parent82a0c62f9bfe8cbc3da43e2f70fd6aea22505a39 (diff)
downloadyugen-84cf5588b43a78cde30dddf18235c494fc1f346f.tar.xz
yugen-84cf5588b43a78cde30dddf18235c494fc1f346f.zip
fixed global meta middleware
-rw-r--r--middleware/globalmetamiddleware.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/middleware/globalmetamiddleware.py b/middleware/globalmetamiddleware.py
index a354f5a..8f598c8 100644
--- a/middleware/globalmetamiddleware.py
+++ b/middleware/globalmetamiddleware.py
@@ -61,6 +61,15 @@ class GlobalMetaMiddleware:
request.meta["image"] = anime_info["image"]
if '/watch/' in full_path:
+ paths_to_ignore = [
+ '/watch/update_watch_history',
+ '/watch/remove_anime_from_watchlist',
+ ]
+
+ if any(path in full_path for path in paths_to_ignore):
+ response = self.get_response(request)
+ return response
+
requested_id = request.path.split("/")[2]
episode = request.path.split("/")[3] if len(request.path.split("/")) > 3 else 1
episode = int(episode)