[zh-copymanga]Fix: change mainland cdn domains (#8327)
* fix: change mainland cdn domains * bump version * fix typo
This commit is contained in:
parent
d1d027fd91
commit
5d12ba6eeb
@ -5,7 +5,7 @@ ext {
|
|||||||
extName = 'CopyManga'
|
extName = 'CopyManga'
|
||||||
pkgNameSuffix = 'zh.copymanga'
|
pkgNameSuffix = 'zh.copymanga'
|
||||||
extClass = '.CopyManga'
|
extClass = '.CopyManga'
|
||||||
extVersionCode = 10
|
extVersionCode = 11
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
@ -42,8 +42,8 @@ class CopyManga : ConfigurableSource, HttpSource() {
|
|||||||
private val popularLatestPageSize = 50 // default
|
private val popularLatestPageSize = 50 // default
|
||||||
private val searchPageSize = 12 // default
|
private val searchPageSize = 12 // default
|
||||||
|
|
||||||
val replaceWith277 = Regex("mirror277")
|
val replaceToMirror2 = Regex("1767566263\\.rsc\\.cdn77\\.org")
|
||||||
val replaceWith77 = Regex("mirror77")
|
val replaceToMirror = Regex("1025857477\\.rsc\\.cdn77\\.org")
|
||||||
|
|
||||||
private val preferences: SharedPreferences by lazy {
|
private val preferences: SharedPreferences by lazy {
|
||||||
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
||||||
@ -114,8 +114,8 @@ class CopyManga : ConfigurableSource, HttpSource() {
|
|||||||
title = _title
|
title = _title
|
||||||
var picture = document.select("div.comicParticulars-title-left img").first().attr("data-src")
|
var picture = document.select("div.comicParticulars-title-left img").first().attr("data-src")
|
||||||
if (!preferences.getBoolean(change_cdn_tomainland, false)) {
|
if (!preferences.getBoolean(change_cdn_tomainland, false)) {
|
||||||
picture = replaceWith277.replace(picture, "mirror2")
|
picture = replaceToMirror2.replace(picture, "mirror2.mangafunc.fun")
|
||||||
picture = replaceWith77.replace(picture, "mirror")
|
picture = replaceToMirror.replace(picture, "mirror.mangafunc.fun")
|
||||||
}
|
}
|
||||||
thumbnail_url = picture
|
thumbnail_url = picture
|
||||||
description = document.select("div.comicParticulars-synopsis p.intro").first().text().trim()
|
description = document.select("div.comicParticulars-synopsis p.intro").first().text().trim()
|
||||||
@ -199,8 +199,8 @@ class CopyManga : ConfigurableSource, HttpSource() {
|
|||||||
for (i in 0 until pageArray.length()) {
|
for (i in 0 until pageArray.length()) {
|
||||||
var page = pageArray.getJSONObject(i).getString("url")
|
var page = pageArray.getJSONObject(i).getString("url")
|
||||||
if (!preferences.getBoolean(change_cdn_tomainland, false)) {
|
if (!preferences.getBoolean(change_cdn_tomainland, false)) {
|
||||||
page = replaceWith277.replace(page, "mirror2")
|
page = replaceToMirror2.replace(page, "mirror2.mangafunc.fun")
|
||||||
page = replaceWith77.replace(page, "mirror")
|
page = replaceToMirror.replace(page, "mirror.mangafunc.fun")
|
||||||
}
|
}
|
||||||
ret.add(Page(i, "", page))
|
ret.add(Page(i, "", page))
|
||||||
}
|
}
|
||||||
@ -341,8 +341,8 @@ class CopyManga : ConfigurableSource, HttpSource() {
|
|||||||
title = _title
|
title = _title
|
||||||
var picture = obj.getString("cover")
|
var picture = obj.getString("cover")
|
||||||
if (!preferences.getBoolean(change_cdn_tomainland, false)) {
|
if (!preferences.getBoolean(change_cdn_tomainland, false)) {
|
||||||
picture = replaceWith277.replace(picture, "mirror2")
|
picture = replaceToMirror2.replace(picture, "mirror2.mangafunc.fun")
|
||||||
picture = replaceWith77.replace(picture, "mirror")
|
picture = replaceToMirror.replace(picture, "mirror.mangafunc.fun")
|
||||||
}
|
}
|
||||||
thumbnail_url = picture
|
thumbnail_url = picture
|
||||||
author = Array<String?>(authorArray.length()) { i -> authorArray.getJSONObject(i).getString("name") }.joinToString(", ")
|
author = Array<String?>(authorArray.length()) { i -> authorArray.getJSONObject(i).getString("name") }.joinToString(", ")
|
||||||
@ -360,8 +360,8 @@ class CopyManga : ConfigurableSource, HttpSource() {
|
|||||||
element.select("div.exemptComicItem-img > a > img").first().let {
|
element.select("div.exemptComicItem-img > a > img").first().let {
|
||||||
var picture = it.attr("data-src")
|
var picture = it.attr("data-src")
|
||||||
if (!preferences.getBoolean(change_cdn_tomainland, false)) {
|
if (!preferences.getBoolean(change_cdn_tomainland, false)) {
|
||||||
picture = replaceWith277.replace(picture, "mirror2")
|
picture = replaceToMirror2.replace(picture, "mirror2.mangafunc.fun")
|
||||||
picture = replaceWith77.replace(picture, "mirror")
|
picture = replaceToMirror.replace(picture, "mirror.mangafunc.fun")
|
||||||
}
|
}
|
||||||
manga.thumbnail_url = picture
|
manga.thumbnail_url = picture
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user