Skip to content

Commit 2377308

Browse files
authored
Update router.js
1 parent 76ed3b1 commit 2377308

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

nodejs/src/router.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import alist from './spider/pan/alist.js';
44
import _13bqg from './spider/book/13bqg.js';
55
import copymanga from './spider/book/copymanga.js';
66
import ffm3u8 from './spider/video/ffm3u8.js';
7-
import drpyS from './spider/video/drpyS.js';
8-
import {request} from "./util/request.js";
7+
import drpyS from './spider/video/drpyS.js'; // 新添加用于支持DS源适配猫影视
8+
import {request} from "./util/request.js"; // 新添加用于支持DS源适配猫影视
99

10-
const spiders = [ffm3u8, push, alist, _13bqg, copymanga, drpyS];
10+
const spiders = [ffm3u8, push, alist, _13bqg, copymanga, drpyS]; // 新添加drpyS用于支持DS源适配猫影视
1111
const spiderPrefix = '/spider';
1212

1313
/**
@@ -20,7 +20,7 @@ export default async function router(fastify) {
2020
// register all spider router
2121
spiders.forEach((spider) => {
2222
const path = spiderPrefix + '/' + spider.meta.key + '/' + spider.meta.type;
23-
fastify.register(spider.api, {prefix: path});
23+
fastify.register(spider.api, {prefix: path}); // 新添加用于支持DS源适配猫影视
2424
console.log('Register spider: ' + path);
2525
});
2626
// console.log(cfg.default);
@@ -51,7 +51,7 @@ export default async function router(fastify) {
5151
* @param {import('fastify').FastifyReply} reply
5252
*/
5353
async function (_request, reply) {
54-
reply.send({run: !fastify.stop});
54+
reply.send({run: !fastify.stop}); // 新添加用于支持DS源适配猫影视
5555
}
5656
);
5757
fastify.get(
@@ -84,7 +84,7 @@ export default async function router(fastify) {
8484
let meta = Object.assign({}, spider.meta);
8585
meta.api = spiderPrefix + '/' + meta.key + '/' + meta.type;
8686
meta.key = 'nodejs_' + meta.key;
87-
meta.ext = '';
87+
meta.ext = ''; // 新添加用于支持DS源适配猫影视
8888
const stype = spider.meta.type;
8989
if (stype < 10) {
9090
config.video.sites.push(meta);
@@ -98,7 +98,7 @@ export default async function router(fastify) {
9898
config.pan.sites.push(meta);
9999
}
100100
});
101-
101+
// 下面代码 新添加用于支持DS源适配猫影视
102102
console.log(cfg.default);
103103
if (cfg.default.drpyS && cfg.default.drpyS.config_url) {
104104
let drpyS_config_url = cfg.default.drpyS.config_url;
@@ -122,7 +122,7 @@ export default async function router(fastify) {
122122
}
123123
}
124124
}
125-
125+
// 上面代码 新添加用于支持DS源适配猫影视
126126
console.log(JSON.stringify(config));
127127
reply.send(config);
128128
}

0 commit comments

Comments
 (0)