Skip to content

Commit 96fc915

Browse files
author
Taois
committed
feat:优化webdav/ftp协议,支持基础路径
更新drplayer
1 parent 3ab4593 commit 96fc915

File tree

11 files changed

+866
-688
lines changed

11 files changed

+866
-688
lines changed

apps/drplayer/assets/index-BtcTaDFX.css

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/drplayer/assets/index-C9cUIg2I.js

Lines changed: 628 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/drplayer/assets/index-CuDKiEtm.js

Lines changed: 0 additions & 628 deletions
This file was deleted.

apps/drplayer/assets/index-CuW6oJxI.css

Lines changed: 0 additions & 9 deletions
This file was deleted.

apps/drplayer/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<meta name="referrer" content="no-referrer" />
88
<title>DrPlayer</title>
9-
<script type="module" crossorigin src="/apps/drplayer/assets/index-CuDKiEtm.js"></script>
10-
<link rel="stylesheet" crossorigin href="/apps/drplayer/assets/index-CuW6oJxI.css">
9+
<script type="module" crossorigin src="/apps/drplayer/assets/index-C9cUIg2I.js"></script>
10+
<link rel="stylesheet" crossorigin href="/apps/drplayer/assets/index-BtcTaDFX.css">
1111
</head>
1212
<body>
1313
<div id="app"></div>

config/map.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
webdav[盘]@@?render=1&type=url&params=../json/webdav.json@@WebDav[盘]
2+
webdav[盘]@@?render=1&type=url&params=../json/webdav影视.json@@WebDavZn[盘]
23
webdav影视[盘]@@?render=1&type=url&params=../json/webdav.json@@WebDav影视[盘]
34
ftp[盘]@@?render=1&type=url&params=../json/ftp.json@@FTP[盘]
45
哔哩收藏[官]@@?render=1&type=url&params=../json/哔哩收藏.json@@哔哩收藏[官]

json/ftp.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"id": "local",
55
"host": "192.168.31.183",
66
"port": 2121,
7+
"basePath": "/宝盒/",
78
"username": "your-username",
89
"password": "your-password",
910
"secure": false,

json/webdav影视.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[
2+
{
3+
"name": "动漫",
4+
"baseURL": "https://pan.8897122.xyz/dav/动漫库",
5+
"username": "webdavtv",
6+
"password": "webdavtv",
7+
"rejectUnauthorized": false,
8+
"showAll": false,
9+
"timeout": 30000
10+
},
11+
{
12+
"name": "电影",
13+
"baseURL": "https://pan.8897122.xyz/dav/电影库",
14+
"username": "webdavtv",
15+
"password": "webdavtv",
16+
"rejectUnauthorized": false,
17+
"showAll": false,
18+
"timeout": 30000
19+
},
20+
{
21+
"name": "电视剧",
22+
"baseURL": "https://pan.8897122.xyz/dav/电视剧库",
23+
"username": "webdavtv",
24+
"password": "webdavtv",
25+
"rejectUnauthorized": false,
26+
"showAll": false,
27+
"timeout": 30000
28+
}
29+
]

spider/js/ftp[盘].js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var rule = {
4444
rule.pans.forEach(pan => {
4545
classList.push({
4646
type_name: pan.name,
47-
type_id: pan.id || pan.baseURL,
47+
type_id: pan.id || pan.basePath,
4848
})
4949
})
5050
return {class: classList}
@@ -85,7 +85,7 @@ var rule = {
8585
}
8686
const _id = tid.split('$')[0];
8787
const _tid = tid.split('$')[1] || '/';
88-
let pan = rule.pans.find(it => it.id === _id || it.baseURL === _id);
88+
let pan = rule.pans.find(it => it.id === _id || it.basePath === _id);
8989
if (pan) {
9090
const ftp = createFTPClient(setAnonymous(pan));
9191
const isConnected = await ftp.testConnection();
@@ -117,7 +117,7 @@ var rule = {
117117
let tid = ids[0];
118118
const _id = tid.split('$')[0];
119119
const _tid = tid.split('$')[1] || '/';
120-
let pan = rule.pans.find(it => it.id === _id || it.baseURL === _id);
120+
let pan = rule.pans.find(it => it.id === _id || it.basePath === _id);
121121
if (pan) {
122122
const ftp = createFTPClient(setAnonymous(pan));
123123
const isConnected = await ftp.testConnection();

0 commit comments

Comments
 (0)