mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-11 20:20:43 +08:00
支持旧版bug龙订阅
This commit is contained in:
parent
24f1cb20f1
commit
e091c3af2d
14
qlCreate.js
14
qlCreate.js
@ -191,7 +191,9 @@ class Ql {
|
||||
let iniPath = this.env.iniPath || `${abspath}/config`
|
||||
let crons = await this.getCrons()
|
||||
let data = {}
|
||||
for (let i of crons.data) {
|
||||
let cronData = crons.data || crons
|
||||
let label = crons.data ? true : false
|
||||
for (let i of cronData) {
|
||||
let command = i.command.match(/task\s*qitoqito_psyduck\/(\w+\.js)/)
|
||||
if (command) {
|
||||
let script = command[1]
|
||||
@ -266,7 +268,10 @@ import {fileURLToPath, pathToFileURL} from 'url';
|
||||
name: `PsyDuck_${title}`,
|
||||
schedule: crontab,
|
||||
command: `task qitoqito_psyduck/${filename}.js`,
|
||||
labels: [`PsyDuck`]
|
||||
// labels: label ? [`PsyDuck`] : ''
|
||||
}
|
||||
if (label) {
|
||||
dicts[`${filename}.js`].labels = [`PsyDuck`]
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
@ -328,7 +333,10 @@ import {fileURLToPath, pathToFileURL} from 'url';
|
||||
name: `PsyDuck_${psyDuck.profile.title}`,
|
||||
schedule: crontab,
|
||||
command: `task qitoqito_psyduck/${script}`,
|
||||
labels: [`PsyDuck`]
|
||||
// labels: label ? [`PsyDuck`] : ''
|
||||
}
|
||||
if (label) {
|
||||
dicts[script].labels = [`PsyDuck`]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ export class Panel {
|
||||
|
||||
async _qlTask() {
|
||||
let envs = await this.getEnvs(`${this.type}_cookie`.toUpperCase())
|
||||
if (envs.length) {
|
||||
if (envs.length>0) {
|
||||
for (let i of envs) {
|
||||
let pin = this.func.userName(i.value)
|
||||
if (this.dict[pin]) {
|
||||
@ -62,12 +62,10 @@ export class Panel {
|
||||
value: this.dict[i].cookie
|
||||
})
|
||||
}
|
||||
if (array.length) {
|
||||
if (array.length>0) {
|
||||
let data = await this.addEnvs(array)
|
||||
if (data.code == 200) {
|
||||
for (let pin in this.dict) {
|
||||
this.func.msg(`新增: ${pin} 成功`)
|
||||
}
|
||||
this.func.msg(`新增: ${i} 成功`)
|
||||
}
|
||||
else {
|
||||
console.error('[Error] 添加账号失败');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user