fix: filtre content_type, doublons seasonaux, et is_admin manquant
CI / Test (Python 3.11) (pull_request) Has been cancelled
CI / Test (Python 3.12) (pull_request) Has been cancelled
CI / Lint (pull_request) Has been cancelled
CI / Type Check (pull_request) Has been cancelled
CI / Summary (pull_request) Has been cancelled

- Bug 1: Ajout du champ 'type' dans les dict de AnimeReleasesFetcher
  (get_seasonal_anime, get_scheduled_anime, get_top_anime, search_anime)
  et dans _get_fallback_recommendations pour que le filtre content_type
  fonctionne correctement
- Bug 2: Déduplication par mal_id dans get_seasonal_anime() pour
  éviter les doublons retournés par l'API Jikan
- Bug 3: Ajout de is_admin dans get_current_user_from_token(),
  get_optional_user(), le constructeur User du register, et la
  réponse /me
This commit is contained in:
root
2026-04-03 15:19:15 +00:00
parent 693615a7dc
commit 66912a0b71
3 changed files with 24 additions and 6 deletions
+5
View File
@@ -285,6 +285,7 @@ class RecommendationEngine:
'score': 9.09,
'episodes': 64,
'status': 'Finished Airing',
'type': 'TV',
'genres': ['Action', 'Adventure', 'Fantasy'],
'synopsis': 'Two brothers lose their mother to an incurable disease. With the power of alchemy, they use taboo knowledge to resurrect her. The process fails, and as a toll for crossing into the realm of God, they lose their bodies.',
'images': {},
@@ -298,6 +299,7 @@ class RecommendationEngine:
'score': 8.51,
'episodes': 75,
'status': 'Finished Airing',
'type': 'TV',
'genres': ['Action', 'Drama', 'Fantasy'],
'synopsis': 'Centuries ago, mankind was slaughtered to near extinction by monstrous humanoid creatures called titans. To protect what remains, humanity built walls and lived peacefully for a hundred years.',
'images': {},
@@ -311,6 +313,7 @@ class RecommendationEngine:
'score': 8.63,
'episodes': 37,
'status': 'Finished Airing',
'type': 'TV',
'genres': ['Mystery', 'Police', 'Psychological'],
'synopsis': 'A shinigami, as a god of death, can kill any person—provided they see their victim\'s face and write their victim\'s name in a notebook called a Death Note.',
'images': {},
@@ -324,6 +327,7 @@ class RecommendationEngine:
'score': 8.48,
'episodes': 26,
'status': 'Finished Airing',
'type': 'TV',
'genres': ['Action', 'Adventure', 'Supernatural'],
'synopsis': 'It is the Taisho Period in Japan. Tanjiro, a kindhearted boy who sells charcoal for a living, finds his family slaughtered by a demon. To make matters worse, his younger sister Nezuko is turned into a demon.',
'images': {},
@@ -337,6 +341,7 @@ class RecommendationEngine:
'score': 8.35,
'episodes': 24,
'status': 'Finished Airing',
'type': 'TV',
'genres': ['Action', 'Supernatural'],
'synopsis': 'Yuji Itadori is a boy with tremendous physical strength, though he lives a completely ordinary high school life. One day, to save a friend who has been attacked by curses, he eats the finger of a curse.',
'images': {},