Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
言程序plus
dr_py
提交
448e1db3
dr_py
项目概览
言程序plus
/
dr_py
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
dr_py
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
448e1db3
编写于
11月 22, 2022
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
alist增加搜索
上级
fd0e9068
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
51 addition
and
16 deletion
+51
-16
base/custom.conf
base/custom.conf
+1
-1
js/version.txt
js/version.txt
+1
-1
libs/alist.js
libs/alist.js
+46
-13
libs/alist.min.js
libs/alist.min.js
+1
-1
readme.md
readme.md
+1
-0
txt/json/alist.json
txt/json/alist.json
+1
-0
未找到文件。
base/custom.conf
浏览文件 @
448e1db3
...
...
@@ -21,7 +21,7 @@
},
# 缓存js
# {"key":"js_origin","name":"JS(原始)","type":3,"api":"{{host}}/txt/js/原始JS.js","searchable":1,"quickSearch":1,"filterable":1,"ext":""},
{
"key"
:
"Alist"
,
"name"
:
"Alist"
,
"type"
:
3
,
"api"
:
"{{host}}/libs/alist.min.js"
,
"searchable"
:
0
,
"quickSearch"
:
0
,
"filterable"
:
0
,
"ext"
:
"{{host}}/txt/json/alist.json"
},
{
"key"
:
"Alist"
,
"name"
:
"Alist"
,
"type"
:
3
,
"api"
:
"{{host}}/libs/alist.min.js"
,
"searchable"
:
2
,
"quickSearch"
:
0
,
"filterable"
:
0
,
"ext"
:
"{{host}}/txt/json/alist.json"
},
{
"key"
:
"js_origin_puto"
,
"name"
:
"原始JS(pluto)"
,
"type"
:
3
,
"api"
:
"js_origin_test"
,
"searchable"
:
1
,
"quickSearch"
:
1
,
"filterable"
:
1
,
"ext"
:
"{{host}}/txt/js/原始JS/origin.js"
},
{
"key"
:
"js_origin_tvb"
,
"name"
:
"原始JS(俊tvb)"
,
"type"
:
3
,
"api"
:
"{{host}}/txt/js/origin/原始JS.js"
,
"searchable"
:
1
,
"quickSearch"
:
1
,
"filterable"
:
1
,
"ext"
:
"{}"
},
{
"key"
:
"drpy_zbk"
,
"name"
:
"真不卡(drpy)"
,
"type"
:
3
,
"api"
:
"js_drpy_zbk"
,
"searchable"
:
1
,
"quickSearch"
:
1
,
"filterable"
:
1
,
"ext"
:
"{{host}}/txt/pluto/drpy.js"
},
...
...
js/version.txt
浏览文件 @
448e1db3
3.9.23
\ No newline at end of file
3.9.23beta1
\ No newline at end of file
libs/alist.js
浏览文件 @
448e1db3
...
...
@@ -23,6 +23,7 @@ String.prototype.rstrip = function (chars) {
return
this
.
replace
(
regex
,
""
);
};
var
showMode
=
'
single
'
;
var
searchDriver
=
''
;
/**
* 打印日志
* @param any 任意变量
...
...
@@ -95,6 +96,7 @@ function get_drives(name) {
function
init
(
ext
)
{
const
data
=
http
.
get
(
ext
).
json
();
searchDriver
=
(
data
.
find
(
x
=>
x
.
search
)
||
{}).
name
||
''
;
data
.
forEach
(
item
=>
{
let
_path_param
=
[];
if
(
item
.
params
){
...
...
@@ -107,6 +109,7 @@ function init(ext) {
server
:
item
.
server
.
endsWith
(
"
/
"
)
?
item
.
server
.
rstrip
(
"
/
"
)
:
item
.
server
,
startPage
:
item
.
startPage
||
'
/
'
,
//首页
showAll
:
item
.
showAll
===
true
,
//默认只显示 视频和文件夹,如果想显示全部 showAll 设置true
search
:
!!
item
.
search
,
//是否支持搜索,只有小丫的可以,多个可搜索只取最前面的一个
params
:
item
.
params
||
{},
_path_param
:
_path_param
,
settings
:
{},
...
...
@@ -298,7 +301,7 @@ function category(tid, pg, filter, extend) {
});
}
function
getAll
(
tid
,
drives
,
path
){
function
getAll
(
otid
,
tid
,
drives
,
path
){
try
{
const
content
=
category
(
tid
,
null
,
false
,
null
);
const
{
list
}
=
JSON
.
parse
(
content
);
...
...
@@ -311,7 +314,8 @@ function getAll(tid,drives,path){
const
pl
=
path
.
split
(
"
/
"
);
const
vod_name
=
pl
[
pl
.
length
-
2
]
||
drives
.
name
;
let
vod
=
{
vod_id
:
tid
,
// vod_id: tid,
vod_id
:
otid
,
vod_name
:
vod_name
,
type_name
:
"
文件夹
"
,
vod_pic
:
"
https://avatars.githubusercontent.com/u/97389433?s=120&v=4
"
,
...
...
@@ -331,15 +335,25 @@ function getAll(tid,drives,path){
}
function
detail
(
tid
)
{
let
isSearch
=
tid
.
endsWith
(
'
#search#
'
);
let
otid
=
tid
;
tid
=
tid
.
replace
(
'
#search#
'
,
''
);
let
{
drives
,
path
}
=
get_drives_path
(
tid
);
if
(
path
.
endsWith
(
"
/
"
))
{
//长按文件夹可以 加载里面全部视频到详情
return
getAll
(
tid
,
drives
,
path
);
return
getAll
(
otid
,
tid
,
drives
,
path
);
}
else
{
if
(
showMode
!==
'
all
'
){
if
(
isSearch
){
return
getAll
(
otid
,
tid
,
drives
,
path
);
}
else
if
(
showMode
===
'
all
'
){
let
new_tid
=
tid
.
split
(
'
/
'
).
slice
(
0
,
-
1
).
join
(
'
/
'
)
+
'
/
'
;
print
(
`全集模式 tid:
${
tid
}
=>tid:
${
new_tid
}
`
);
let
{
drives
,
path
}
=
get_drives_path
(
new_tid
);
return
getAll
(
otid
,
new_tid
,
drives
,
path
);
}
else
{
let
paths
=
path
.
split
(
"
@@@
"
);
let
vod_name
=
paths
[
0
].
substring
(
paths
[
0
].
lastIndexOf
(
"
/
"
)
+
1
);
let
vod
=
{
vod_id
:
tid
,
vod_id
:
o
tid
,
vod_name
:
vod_name
,
type_name
:
"
文件
"
,
vod_pic
:
"
https://avatars.githubusercontent.com/u/97389433?s=120&v=4
"
,
...
...
@@ -353,11 +367,6 @@ function detail(tid) {
return
JSON
.
stringify
({
'
list
'
:
[
vod
]
});
}
else
{
let
new_tid
=
tid
.
split
(
'
/
'
).
slice
(
0
,
-
1
).
join
(
'
/
'
)
+
'
/
'
;
print
(
`全集模式 tid:
${
tid
}
=>tid:
${
new_tid
}
`
);
let
{
drives
,
path
}
=
get_drives_path
(
new_tid
);
return
getAll
(
new_tid
,
drives
,
path
);
}
}
}
...
...
@@ -380,9 +389,33 @@ function play(flag, id, flags) {
}
function
search
(
wd
,
quick
)
{
return
JSON
.
stringify
({
'
list
'
:
[]
});
print
(
__drives
);
print
(
'
可搜索的alist驱动:
'
+
searchDriver
);
if
(
!
searchDriver
){
return
JSON
.
stringify
({
'
list
'
:
[]
});
}
else
{
let
driver
=
__drives
[
searchDriver
];
print
(
driver
);
let
html
=
http
.
get
(
driver
.
server
+
'
/search?box=
'
+
wd
+
'
&url=
'
).
text
();
let
lists
=
pdfa
(
html
,
'
div&&ul&&a
'
);
print
(
lists
.
length
);
let
vods
=
[];
lists
.
forEach
(
it
=>
{
let
vid
=
searchDriver
+
'
$
'
+
pdfh
(
it
,
'
a&&href
'
)
+
'
#search#
'
;
vods
.
push
({
vod_name
:
pdfh
(
it
,
'
a&&Text
'
),
vod_id
:
vid
,
vod_pic
:
'
http://img1.3png.com/281e284a670865a71d91515866552b5f172b.png
'
,
vod_remarks
:
searchDriver
});
});
print
(
vods
);
return
JSON
.
stringify
({
'
list
'
:
vods
});
}
}
function
get_size
(
sz
)
{
...
...
libs/alist.min.js
浏览文件 @
448e1db3
此差异已折叠。
点击以展开。
readme.md
浏览文件 @
448e1db3
...
...
@@ -51,6 +51,7 @@
[
获取本地设备信息
](
https://m.jb51.net/article/140716.htm
)
###### 2022/11/22
-
[X] 增加了alist的api,版本号升级至 3.9.23
-
[X] 支持alist搜索小雅的结构,配置里加 "search": true, 仅取前面第一个alist
-
[X] 需要在custom.conf加一行自定义配置,例如:
```
json
{
"key"
:
"Alist"
,
"name"
:
"Alist"
,
"type"
:
3
,
"api"
:
"{{host}}/libs/alist.min.js"
,
"searchable"
:
0
,
"quickSearch"
:
0
,
"filterable"
:
0
,
"ext"
:
"{{host}}/txt/json/alist.json"
}
,
...
...
txt/json/alist.json
浏览文件 @
448e1db3
...
...
@@ -3,6 +3,7 @@
"server"
:
"http://alist.xiaoya.pro/"
,
"startPage"
:
"/"
,
"showAll"
:
false
,
"search"
:
true
,
"params"
:
{
"/abc"
:
{
"password"
:
"123"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录