Skip to content

Commit 4879b3f

Browse files
committed
update:推送支持
1 parent 3885507 commit 4879b3f

20 files changed

+1037
-82
lines changed

Diff for: README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ nodejs作为服务端的drpy实现。全面升级异步写法
1313

1414
## 更新记录
1515

16-
### 20241226
16+
### 20241227
1717

18-
更新至V1.0.22
18+
更新至V1.0.23
1919

20-
1. 网盘插件细节优化
21-
2. 框架其他问题修复
20+
1. 支持推送
21+
2. 优化几个盘的源细节问题
22+
3. 设置中心夸克扫码支持
2223

2324
[点此查看完整更新记录](docs/updateRecord.md)
2425

Diff for: controllers/api.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ export default (fastify, options, done) => {
3333
const hostname = request.hostname;
3434
const proxyUrl = `${protocol}://${hostname}${request.url}`.split('?')[0].replace('/api/', '/proxy/') + '/?do=js';
3535
const publicUrl = `${protocol}://${hostname}/public/`;
36+
const httpUrl = `${protocol}://${hostname}/http`;
3637
// console.log(`proxyUrl:${proxyUrl}`);
3738
const env = {
38-
proxyUrl, publicUrl, getProxyUrl: function () {
39+
proxyUrl, publicUrl, httpUrl, getProxyUrl: function () {
3940
return proxyUrl
4041
}
4142
};

Diff for: controllers/config.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ async function generateSiteJSON(jsDir, requestHost, sub, subFilePath) {
3434
}
3535
for (const file of valid_files) {
3636
const baseName = path.basename(file, '.js'); // 去掉文件扩展名
37-
const key = `drpyS_${baseName}`;
38-
const name = `${baseName}(DS)`;
37+
let key = `drpyS_${baseName}`;
38+
let name = `${baseName}(DS)`;
3939
const api = `${requestHost}/api/${baseName}`; // 使用请求的 host 地址,避免硬编码端口
4040
let ruleObject = {
41-
searchable: 1, // 固定值
42-
filterable: 1, // 固定值
41+
searchable: 0, // 固定值
42+
filterable: 0, // 固定值
4343
quickSearch: 0, // 固定值
4444
};
4545
try {
@@ -48,6 +48,10 @@ async function generateSiteJSON(jsDir, requestHost, sub, subFilePath) {
4848
} catch (e) {
4949
console.log(`file:${file} error:${e.message}`);
5050
}
51+
if (baseName === 'push_agent') {
52+
key = 'push_agent';
53+
name = `${ruleObject.title}(DS)`;
54+
}
5155
const site = {
5256
key,
5357
name,

Diff for: custom.json

+37-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"sites_count": 34,
2+
"sites_count": 36,
33
"sites": [
44
{
55
"key": "drpyS_哔哩直播[官]",
@@ -17,7 +17,7 @@
1717
"type": 4,
1818
"api": "http://localhost:5757/api/大象影视",
1919
"searchable": 2,
20-
"filterable": 1,
20+
"filterable": 0,
2121
"quickSearch": 0,
2222
"ext": ""
2323
},
@@ -36,8 +36,8 @@
3636
"name": "动作交互(DS)",
3737
"type": 4,
3838
"api": "http://localhost:5757/api/动作交互",
39-
"searchable": 1,
40-
"filterable": 1,
39+
"searchable": 0,
40+
"filterable": 0,
4141
"quickSearch": 0,
4242
"ext": ""
4343
},
@@ -107,6 +107,16 @@
107107
"type": 4,
108108
"api": "http://localhost:5757/api/金牌影院",
109109
"searchable": 2,
110+
"filterable": 0,
111+
"quickSearch": 0,
112+
"ext": ""
113+
},
114+
{
115+
"key": "drpyS_蜡笔[盘]",
116+
"name": "蜡笔[盘](DS)",
117+
"type": 4,
118+
"api": "http://localhost:5757/api/蜡笔[盘]",
119+
"searchable": 1,
110120
"filterable": 1,
111121
"quickSearch": 0,
112122
"ext": ""
@@ -117,7 +127,7 @@
117127
"type": 4,
118128
"api": "http://localhost:5757/api/蓝莓短剧",
119129
"searchable": 2,
120-
"filterable": 1,
130+
"filterable": 0,
121131
"quickSearch": 1,
122132
"ext": ""
123133
},
@@ -137,7 +147,7 @@
137147
"type": 4,
138148
"api": "http://localhost:5757/api/人人视频",
139149
"searchable": 2,
140-
"filterable": 1,
150+
"filterable": 0,
141151
"quickSearch": 0,
142152
"ext": ""
143153
},
@@ -147,7 +157,7 @@
147157
"type": 4,
148158
"api": "http://localhost:5757/api/色花堂[密]",
149159
"searchable": 2,
150-
"filterable": 1,
160+
"filterable": 0,
151161
"quickSearch": 0,
152162
"ext": ""
153163
},
@@ -157,7 +167,7 @@
157167
"type": 4,
158168
"api": "http://localhost:5757/api/色花堂[密+]",
159169
"searchable": 2,
160-
"filterable": 1,
170+
"filterable": 0,
161171
"quickSearch": 0,
162172
"ext": ""
163173
},
@@ -176,8 +186,8 @@
176186
"name": "设置中心(DS)",
177187
"type": 4,
178188
"api": "http://localhost:5757/api/设置中心",
179-
"searchable": 1,
180-
"filterable": 1,
189+
"searchable": 0,
190+
"filterable": 0,
181191
"quickSearch": 0,
182192
"ext": ""
183193
},
@@ -201,6 +211,16 @@
201211
"quickSearch": 0,
202212
"ext": ""
203213
},
214+
{
215+
"key": "push_agent",
216+
"name": "推送(DS)",
217+
"type": 4,
218+
"api": "http://localhost:5757/api/push_agent",
219+
"searchable": 0,
220+
"filterable": 0,
221+
"quickSearch": 0,
222+
"ext": ""
223+
},
204224
{
205225
"key": "drpyS_玩偶哥哥[盘]",
206226
"name": "玩偶哥哥[盘](DS)",
@@ -237,7 +257,7 @@
237257
"type": 4,
238258
"api": "http://localhost:5757/api/雪糕TV",
239259
"searchable": 2,
240-
"filterable": 1,
260+
"filterable": 0,
241261
"quickSearch": 0,
242262
"ext": ""
243263
},
@@ -246,7 +266,7 @@
246266
"name": "央视大全[官](DS)",
247267
"type": 4,
248268
"api": "http://localhost:5757/api/央视大全[官]",
249-
"searchable": 0,
269+
"searchable": 1,
250270
"filterable": 1,
251271
"quickSearch": 0,
252272
"ext": ""
@@ -277,7 +297,7 @@
277297
"type": 4,
278298
"api": "http://localhost:5757/api/ACG漫画网",
279299
"searchable": 2,
280-
"filterable": 1,
300+
"filterable": 0,
281301
"quickSearch": 0,
282302
"ext": ""
283303
},
@@ -287,7 +307,7 @@
287307
"type": 4,
288308
"api": "http://localhost:5757/api/ikanbot",
289309
"searchable": 2,
290-
"filterable": 1,
310+
"filterable": 0,
291311
"quickSearch": 0,
292312
"ext": ""
293313
},
@@ -307,7 +327,7 @@
307327
"type": 4,
308328
"api": "http://localhost:5757/api/OmoFun[漫]",
309329
"searchable": 2,
310-
"filterable": 1,
330+
"filterable": 0,
311331
"quickSearch": 0,
312332
"ext": ""
313333
},
@@ -327,7 +347,7 @@
327347
"type": 4,
328348
"api": "http://localhost:5757/api/x草榴社区[密]",
329349
"searchable": 2,
330-
"filterable": 1,
350+
"filterable": 0,
331351
"quickSearch": 0,
332352
"ext": ""
333353
},
@@ -337,7 +357,7 @@
337357
"type": 4,
338358
"api": "http://localhost:5757/api/xvideos[密]",
339359
"searchable": 1,
340-
"filterable": 1,
360+
"filterable": 0,
341361
"quickSearch": 0,
342362
"ext": ""
343363
}

Diff for: docs/updateRecord.md

+21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# drpyS更新记录
22

3+
### 20241227
4+
5+
更新至V1.0.23
6+
7+
1. 更新 `searchable` `filterable` `quickSearch` 默认全部为0
8+
2. 优化网盘源二级失效资源处理
9+
3. 新增 `push_agent.js` 推送专用源,支持 各大网盘,官链,直链,待嗅探,多列表等场景推送
10+
4. 修复已有源三个属性没正确设置问题
11+
5. 增加 `蜡笔[盘].js`
12+
6. 设置中心支持推送
13+
7. drpyS新增可用函数 `XMLHttpRequest` `_fetch`,由于`fetch`是drpy2内置函数等同于`request`,新增的`_fetch`是nodejs原生函数。示例:
14+
15+
```javascript
16+
const xhr = new XMLHttpRequest();
17+
log(xhr);
18+
```
19+
20+
8. 环境this增加 `httpUrl`
21+
9. 设置中心增加夸克扫码功能与真实可用的逻辑
22+
10. action动作交互升级至最新标准,完美适配最新装逼壳
23+
324
### 20241226
425

526
更新至V1.0.22

0 commit comments

Comments
 (0)