diff options
| author | Bobby <[email protected]> | 2024-09-03 21:27:36 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2024-09-03 21:27:36 -0400 |
| commit | a6904331cead3d63cdb9936f03774348cd2b44ae (patch) | |
| tree | b26073e6f1d07b2af83597d41401bfe05f8183b4 | |
| parent | c86585f700ff8da30b2db7373b22dda1af97cc61 (diff) | |
| download | yugen-a6904331cead3d63cdb9936f03774348cd2b44ae.tar.xz yugen-a6904331cead3d63cdb9936f03774348cd2b44ae.zip | |
sub dub fix
| -rw-r--r-- | watch/models.py | 2 | ||||
| -rw-r--r-- | watch/views.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/watch/models.py b/watch/models.py index c35b3bb..7c2ed09 100644 --- a/watch/models.py +++ b/watch/models.py @@ -67,7 +67,7 @@ class Anime(models.Model): def needs_update(self): # Always update if the anime is ongoing and last updated was more than 1 day ago - if self.status == "Ongoing" and (timezone.now() - self.last_updated) > datetime.timedelta(days=1): + if self.status == "Ongoing": return True if self.status == "Not yet aired": diff --git a/watch/views.py b/watch/views.py index 3680c39..54e74cb 100644 --- a/watch/views.py +++ b/watch/views.py @@ -161,9 +161,10 @@ def update_anime(anime_id, anime_fetched): # Update sub and dub count z_anime_info = get_info_by_zid(anime.z_anime_id) try: - anime.sub = z_anime_info["anime"]["info"]["stats"]["sub"] - anime.dub = z_anime_info["anime"]["info"]["stats"]["dub"] + anime.sub = z_anime_info["anime"]["info"]["stats"]["episodes"]["sub"] + anime.dub = z_anime_info["anime"]["info"]["stats"]["episodes"]["dub"] except: + print("Error fetching sub and dub count:", z_anime_info) pass # Update genres |
