This commit is contained in:
Moustapha Kodjo Amadou
2025-05-22 15:54:08 +01:00
parent 29c32f8006
commit 58922287c5
2 changed files with 6 additions and 4 deletions

View File

@@ -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;
}

View File

@@ -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(