From beaf4f85309c8792753fad42e491022cdde696da Mon Sep 17 00:00:00 2001 From: Moustapha Kodjo Amadou <107993382+kodjodevf@users.noreply.github.com> Date: Sat, 24 May 2025 12:09:29 +0100 Subject: [PATCH] fix #261 --- dart/anime/src/en/animepahe/animepahe.dart | 5 ++--- dart/anime/src/en/animepahe/source.dart | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dart/anime/src/en/animepahe/animepahe.dart b/dart/anime/src/en/animepahe/animepahe.dart index 481fe97c..71d6ea23 100644 --- a/dart/anime/src/en/animepahe/animepahe.dart +++ b/dart/anime/src/en/animepahe/animepahe.dart @@ -150,7 +150,7 @@ class AnimePahe extends MProvider { ); final location = - "https://${substringAfterLast(res.headers["location"], "https://")}"; + "https://${substringAfterLast(getMapValue(json.encode(res.headers), "location"), "https://")}"; if (location == '$baseUrl/anime') { final res = (await client.get( @@ -165,8 +165,7 @@ class AnimePahe extends MProvider { "\"", ); } - final uri = Uri.parse(location); - return uri.pathSegments.last; + return substringAfterLast(location, '/'); } @override diff --git a/dart/anime/src/en/animepahe/source.dart b/dart/anime/src/en/animepahe/source.dart index f0f54b1d..028c1b76 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.7"; +const _animepaheVersion = "0.0.75"; const _animepaheSourceCodeUrl = "https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/anime/src/en/animepahe/animepahe.dart"; Source _animepaheSource = Source(