diff options
| author | Bobby <[email protected]> | 2025-03-11 01:14:10 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2025-03-11 01:14:10 +0530 |
| commit | 9085fa19a9972f0c31f0ba92505c77a52acf3d66 (patch) | |
| tree | b7f4f57e95fb0467014d20a8ce227a062c500a8f /apps/anime/views.py | |
| parent | f5ef9d42ebe7b2be932b35db7c5d801e9cfeb2c1 (diff) | |
| download | thatcomputerscientist-dev.tar.xz thatcomputerscientist-dev.zip | |
separate video/tracks in anime stream service and encodedev
Diffstat (limited to 'apps/anime/views.py')
| -rw-r--r-- | apps/anime/views.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/anime/views.py b/apps/anime/views.py index 5544c484..c1757dc2 100644 --- a/apps/anime/views.py +++ b/apps/anime/views.py @@ -2,6 +2,7 @@ import os from django.urls import reverse import requests from django.shortcuts import redirect, render +from internal.crypto_utilities import encode_url from thatcomputerscientist.utils import i18npatterns from internal.cache_utils import cache_data @@ -203,8 +204,6 @@ def anime_results(**kwargs): f"{CONSUMET_BASE_URL}/meta/anilist/advanced-search", params=params ) - print(response.text) - return response.json() @@ -298,8 +297,14 @@ def anime(request, anime_id, e=None): streaming_data = get_anime_streaming_data( anime_id, anime_data["current_episode"], dub ) - print(streaming_data) + streaming_data["data"]["sources"] = streaming_data["data"]["sources"][0] + streaming_data["data"]["sources"]["url"] = encode_url( + streaming_data["data"]["sources"]["url"] + ) + + for track in streaming_data["data"]["tracks"]: + track["file"] = encode_url(track["file"]) else: streaming_data = {} |
