diff options
| author | Bobby <[email protected]> | 2024-09-21 02:38:06 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2024-09-21 02:38:06 -0400 |
| commit | 12f85fd1fcb223bd3e62c7b352ccb57d4922fc0b (patch) | |
| tree | 8ac25c738a029de64bde2f5e31902061153849b6 /detail | |
| parent | aa6bd3d74961a4950dab9167159540939bef45f2 (diff) | |
| download | yugen-12f85fd1fcb223bd3e62c7b352ccb57d4922fc0b.tar.xz yugen-12f85fd1fcb223bd3e62c7b352ccb57d4922fc0b.zip | |
Provider Selection
Diffstat (limited to 'detail')
| -rw-r--r-- | detail/views.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/detail/views.py b/detail/views.py index b38471c..fdbb5a5 100644 --- a/detail/views.py +++ b/detail/views.py @@ -1,6 +1,6 @@ from django.shortcuts import redirect, render from authentication.utils import get_single_anime_mal -from watch.utils import attach_episode_metadata, get_anime_data, get_anime_episodes +from watch.utils import attach_episode_metadata, get_anime_data, get_anime_episodes, get_anime_episodes_gogo from watch.views import get_seasons_by_zid @@ -8,11 +8,14 @@ def index(request): return redirect("home:index") def detail(request, anime_id): - anime_data, provider = get_anime_data(anime_id) + anime_data, provider, gd = get_anime_data(anime_id) if not anime_data: return render(request, "detail/detail.html", {"error": "Anime not found"}, status=404) anime_episodes = get_anime_episodes(anime_id) + if "message" in anime_episodes: + anime_data, provider, gd = get_anime_data(anime_id, provider="gogo") + anime_episodes, _ = get_anime_episodes_gogo(anime_id) if anime_episodes: attach_episode_metadata(anime_data, anime_episodes) |
