From 58922287c5b796256cf2abee723e3658660f52ea Mon Sep 17 00:00:00 2001 From: Moustapha Kodjo Amadou <107993382+kodjodevf@users.noreply.github.com> Date: Thu, 22 May 2025 15:54:08 +0100 Subject: [PATCH] fix --- dart/anime/src/en/animepahe/animepahe.dart | 8 +++++--- dart/anime/src/en/animepahe/source.dart | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dart/anime/src/en/animepahe/animepahe.dart b/dart/anime/src/en/animepahe/animepahe.dart index 789c94d9..481fe97c 100644 --- a/dart/anime/src/en/animepahe/animepahe.dart +++ b/dart/anime/src/en/animepahe/animepahe.dart @@ -148,7 +148,11 @@ class AnimePahe extends MProvider { Uri.parse("$baseUrl/a/$animeId"), headers: headers, ); - if (res.statusCode == 302) { + + final location = + "https://${substringAfterLast(res.headers["location"], "https://")}"; + + if (location == '$baseUrl/anime') { final res = (await client.get( Uri.parse("$baseUrl/api?m=search&q=$title"), headers: headers, @@ -161,8 +165,6 @@ class AnimePahe extends MProvider { "\"", ); } - final location = - "https://${substringAfterLast(res.headers["location"], "https://")}"; final uri = Uri.parse(location); return uri.pathSegments.last; } diff --git a/dart/anime/src/en/animepahe/source.dart b/dart/anime/src/en/animepahe/source.dart index d8d12f7a..f0f54b1d 100644 --- a/dart/anime/src/en/animepahe/source.dart +++ b/dart/anime/src/en/animepahe/source.dart @@ -1,7 +1,7 @@ import '../../../../../model/source.dart'; Source get animepaheSource => _animepaheSource; -const _animepaheVersion = "0.0.65"; +const _animepaheVersion = "0.0.7"; const _animepaheSourceCodeUrl = "https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/anime/src/en/animepahe/animepahe.dart"; Source _animepaheSource = Source(