[copy_manga] Allow user to edit copyPlatform (#74)

* [copy_manga] Allow user to edit copyPlatform

拷贝连着三天改了三次这参数

* Update version
This commit is contained in:
角砂糖
2025-05-28 20:43:28 +08:00
committed by GitHub
parent b8a81c0105
commit ce21114713
2 changed files with 16 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ class CopyManga extends ComicSource {
key = "copy_manga" key = "copy_manga"
version = "1.1.7" version = "1.2.0"
minAppVersion = "1.2.1" minAppVersion = "1.2.1"
@@ -14,6 +14,8 @@ class CopyManga extends ComicSource {
static defaultCopyVersion = "2.2.9" static defaultCopyVersion = "2.2.9"
static defaultCopyPlatform = "2"
get copyVersion() { get copyVersion() {
return this.loadSetting('version') return this.loadSetting('version')
} }
@@ -22,6 +24,10 @@ class CopyManga extends ComicSource {
return `https://${this.loadSetting('base_url')}` return `https://${this.loadSetting('base_url')}`
} }
get copyPlatform() {
return this.loadSetting('platform')
}
init() { init() {
let token = this.loadData("token"); let token = this.loadData("token");
if (!token) { if (!token) {
@@ -38,7 +44,7 @@ class CopyManga extends ComicSource {
"region": "1", "region": "1",
"version": this.copyVersion, "version": this.copyVersion,
"authorization": `Token${token}`, "authorization": `Token${token}`,
"platform": "1", "platform": this.copyPlatform,
"umstring": "b4c89ca4104ea9a97750314d791520ac", "umstring": "b4c89ca4104ea9a97750314d791520ac",
} }
// 用于储存 { 作者名 : 英文参数 } // 用于储存 { 作者名 : 英文参数 }
@@ -73,7 +79,7 @@ class CopyManga extends ComicSource {
"region": "1", "region": "1",
"version": this.copyVersion, "version": this.copyVersion,
"authorization": `Token ${token}`, "authorization": `Token ${token}`,
"platform": "1", "platform": this.copyPlatform,
"umstring": "b4c89ca4104ea9a97750314d791520ac", "umstring": "b4c89ca4104ea9a97750314d791520ac",
} }
return "ok" return "ok"
@@ -812,6 +818,12 @@ class CopyManga extends ComicSource {
validator: '^\\d+(?:\\.\\d+)*$', validator: '^\\d+(?:\\.\\d+)*$',
default: CopyManga.defaultCopyVersion, default: CopyManga.defaultCopyVersion,
}, },
platform: {
title: "平台代号重启APP生效",
type: "input",
validator: '^\\d+(?:\\.\\d+)*$',
default: CopyManga.defaultCopyPlatform,
}
} }
/** /**

View File

@@ -3,7 +3,7 @@
"name": "拷贝漫画", "name": "拷贝漫画",
"fileName": "copy_manga.js", "fileName": "copy_manga.js",
"key": "copy_manga", "key": "copy_manga",
"version": "1.1.7" "version": "1.2.0"
}, },
{ {
"name": "Komiic", "name": "Komiic",