mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 10:51:17 +00:00
Copymanga: fix getgetDetail url
This commit is contained in:
@@ -7,7 +7,7 @@ const mangayomiSources = [{
|
|||||||
"typeSource": "single",
|
"typeSource": "single",
|
||||||
"isManga": true,
|
"isManga": true,
|
||||||
"isNsfw": false,
|
"isNsfw": false,
|
||||||
"version": "0.0.15",
|
"version": "0.0.2",
|
||||||
"dateFormat": "",
|
"dateFormat": "",
|
||||||
"dateFormatLocale": "",
|
"dateFormatLocale": "",
|
||||||
"pkgPath": "manga/src/zh/copymanga.js"
|
"pkgPath": "manga/src/zh/copymanga.js"
|
||||||
@@ -166,6 +166,7 @@ const mangayomiSources = [{
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getDetail(url) {
|
async getDetail(url) {
|
||||||
|
url = url.startsWith("/comic/") ? url.replace("/comic/", "") : url;
|
||||||
const res = await new Client().get(this.source.apiUrl + `/api/v3/comic2/${url}`);
|
const res = await new Client().get(this.source.apiUrl + `/api/v3/comic2/${url}`);
|
||||||
const data = JSON.parse(res.body)["results"]["comic"];
|
const data = JSON.parse(res.body)["results"]["comic"];
|
||||||
const title = this.stringUTF8(data["name"]);
|
const title = this.stringUTF8(data["name"]);
|
||||||
@@ -199,7 +200,7 @@ const mangayomiSources = [{
|
|||||||
status: status,
|
status: status,
|
||||||
genre: genres,
|
genre: genres,
|
||||||
episodes: chapters,
|
episodes: chapters,
|
||||||
link: this.source.baseUrl + "/comic/" + url
|
link: "/comic/" + url
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user