diff --git a/base/rules.db b/base/rules.db
index e18c4804e3c3840bf98cb2a0322f66ff3c5e9841..e0a5889bdce13bc03726dad1e96bfaa7287059b2 100644
Binary files a/base/rules.db and b/base/rules.db differ
diff --git a/controllers/home.py b/controllers/home.py
index 9c50ed70f134ea530f2d4f61a99051278bfd35f0..e058a61b2af537b2737eadde94514230173326f3 100644
--- a/controllers/home.py
+++ b/controllers/home.py
@@ -214,29 +214,32 @@ def config_gen():
lsg = storage_service()
store_conf_dict = lsg.getStoreConfDict()
new_conf.update(store_conf_dict)
- jxs = getJxs()
- lsg = storage_service()
- use_py = lsg.getItem('USE_PY')
- pys = getPys() if use_py else False
- alists = getAlist()
- alists_str = json.dumps(alists,ensure_ascii=False)
- set_local = render_template('config.txt',pys=pys,rules=getRules('js'),alists=alists,alists_str=alists_str,live_url=get_live_url(new_conf,0),mode=0,host=getHost(0),jxs=jxs)
- print(set_local)
- set_area = render_template('config.txt',pys=pys,rules=getRules('js'),alists=alists,alists_str=alists_str,live_url=get_live_url(new_conf,1),mode=1,host=getHost(1),jxs=jxs)
- set_online = render_template('config.txt',pys=pys,rules=getRules('js'),alists=alists,alists_str=alists_str,live_url=get_live_url(new_conf,2),mode=1,host=getHost(2),jxs=jxs)
- with open('txt/pycms0.json','w+',encoding='utf-8') as f:
- set_dict = json.loads(set_local)
- f.write(json.dumps(set_dict,ensure_ascii=False,indent=4))
- with open('txt/pycms1.json','w+',encoding='utf-8') as f:
- set_dict = json.loads(set_area)
- f.write(json.dumps(set_dict,ensure_ascii=False,indent=4))
-
- with open('txt/pycms2.json','w+',encoding='utf-8') as f:
- set_dict = json.loads(set_online)
- f.write(json.dumps(set_dict,ensure_ascii=False,indent=4))
- files = [os.path.abspath(rf'txt\pycms{i}.json') for i in range(3)]
- # print(files)
- return R.success('猫配置生成完毕,文件位置在:\n'+'\n'.join(files))
+ try:
+ jxs = getJxs()
+ lsg = storage_service()
+ use_py = lsg.getItem('USE_PY')
+ pys = getPys() if use_py else False
+ alists = getAlist()
+ alists_str = json.dumps(alists,ensure_ascii=False)
+ set_local = render_template('config.txt',pys=pys,rules=getRules('js'),alists=alists,alists_str=alists_str,live_url=get_live_url(new_conf,0),mode=0,host=getHost(0),jxs=jxs)
+ print(set_local)
+ set_area = render_template('config.txt',pys=pys,rules=getRules('js'),alists=alists,alists_str=alists_str,live_url=get_live_url(new_conf,1),mode=1,host=getHost(1),jxs=jxs)
+ set_online = render_template('config.txt',pys=pys,rules=getRules('js'),alists=alists,alists_str=alists_str,live_url=get_live_url(new_conf,2),mode=1,host=getHost(2),jxs=jxs)
+ with open('txt/pycms0.json','w+',encoding='utf-8') as f:
+ set_dict = json.loads(set_local)
+ f.write(json.dumps(set_dict,ensure_ascii=False,indent=4))
+ with open('txt/pycms1.json','w+',encoding='utf-8') as f:
+ set_dict = json.loads(set_area)
+ f.write(json.dumps(set_dict,ensure_ascii=False,indent=4))
+
+ with open('txt/pycms2.json','w+',encoding='utf-8') as f:
+ set_dict = json.loads(set_online)
+ f.write(json.dumps(set_dict,ensure_ascii=False,indent=4))
+ files = [os.path.abspath(rf'txt\pycms{i}.json') for i in range(3)]
+ # print(files)
+ return R.success('猫配置生成完毕,文件位置在:\n'+'\n'.join(files))
+ except Exception as e:
+ return R.failed(f'配置文件生成错误:\n{e}')
@home.route("/info",methods=['get'])
def info_all():
diff --git a/controllers/service.py b/controllers/service.py
index 9042f7e546e1984f4ac3f1c06d529fb5295da35a..dfff20f4f352a0db5589fa2aea26ea574073f0da 100644
--- a/controllers/service.py
+++ b/controllers/service.py
@@ -26,6 +26,7 @@ class storage_service(object):
@classmethod
def getStoreConf(self):
+ # MAX_CONTENT_LENGTH 最大上传和端口ip一样是顶级配置,无法外部修改的
conf_list = ['LIVE_URL', 'USE_PY', 'PLAY_URL', 'PLAY_DISABLE', 'LAZYPARSE_MODE', 'WALL_PAPER_ENABLE',
'WALL_PAPER', 'UNAME', 'PWD', 'LIVE_MODE', 'CATE_EXCLUDE', 'TAB_EXCLUDE']
conf_name_list = ['直播地址', '启用py源', '远程地址', '禁用免嗅', '免嗅模式', '启用壁纸', '壁纸链接', '管理账号',
diff --git a/templates/index.html b/templates/index.html
index bde234bc51eb8baf986f61787666b9b3d83902f4..712422aaaf7033daf5f40b9b8f548a3311bcbe2a 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -23,9 +23,7 @@
// let rule = this.innerText.trim();
let code = $.ajax({ url: "/configs", async: false }).responseText;
code = typeof (code) === "object" ? code : JSON.parse(code);
- if (code.code === 200) {
- alert(code.msg);
- }
+ alert(code.msg);
});
});
@@ -86,6 +84,9 @@
+
diff --git a/txt/pycms0.json b/txt/pycms0.json
index c1a33ad93d996e7cfd52edbce60488c2ed5eb498..0f879b5c096691efd9f22fee710ac7fe661f4dbc 100644
--- a/txt/pycms0.json
+++ b/txt/pycms0.json
@@ -1,6 +1,6 @@
{
"wallpaper": "http://localhost:5705/pics",
- "dr_count": 27,
+ "dr_count": 28,
"mode": 0,
"spider": "http://localhost:5705/liveslib",
"drives": [
@@ -339,6 +339,15 @@
"quickSearch": 1,
"filterable": 0
},
+ {
+ "key": "dr_菜狗",
+ "name": "菜狗(道长)",
+ "type": 1,
+ "api": "http://localhost:5705/vod?rule=菜狗",
+ "searchable": 1,
+ "quickSearch": 0,
+ "filterable": 1
+ },
{
"key": "dr_蓝光影院",
"name": "蓝光影院(道长)",
diff --git a/txt/pycms1.json b/txt/pycms1.json
index 2e2cf6155cc3ee386eee9dd067705ad08e220e9a..5ad3aaa94783ce41635fdd2bc6295f2d71b4835b 100644
--- a/txt/pycms1.json
+++ b/txt/pycms1.json
@@ -1,6 +1,6 @@
{
"wallpaper": "http://192.168.3.224:5705/pics",
- "dr_count": 27,
+ "dr_count": 28,
"mode": 1,
"spider": "http://192.168.3.224:5705/liveslib",
"drives": [
@@ -339,6 +339,15 @@
"quickSearch": 1,
"filterable": 0
},
+ {
+ "key": "dr_菜狗",
+ "name": "菜狗(道长)",
+ "type": 1,
+ "api": "http://192.168.3.224:5705/vod?rule=菜狗",
+ "searchable": 1,
+ "quickSearch": 0,
+ "filterable": 1
+ },
{
"key": "dr_蓝光影院",
"name": "蓝光影院(道长)",
diff --git a/txt/pycms2.json b/txt/pycms2.json
index b69be167549df18650fc18a2a854ede3cb56c607..1ce42a1fa5d583e359dd9c5b493ff654b7f184fa 100644
--- a/txt/pycms2.json
+++ b/txt/pycms2.json
@@ -1,8 +1,8 @@
{
- "wallpaper": "http://cms.nokia.press/pics",
- "dr_count": 27,
+ "wallpaper": "http://cms1.nokia.press/pics",
+ "dr_count": 28,
"mode": 1,
- "spider": "http://cms.nokia.press/liveslib",
+ "spider": "http://cms1.nokia.press/liveslib",
"drives": [
{
"name": "🔮嗨翻",
@@ -136,7 +136,7 @@
"key": "dr_360影视",
"name": "360影视(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=360影视",
+ "api": "http://cms1.nokia.press/vod?rule=360影视",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -145,7 +145,7 @@
"key": "dr_555影视",
"name": "555影视(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=555影视",
+ "api": "http://cms1.nokia.press/vod?rule=555影视",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -154,7 +154,7 @@
"key": "dr_AnFuns",
"name": "AnFuns(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=AnFuns",
+ "api": "http://cms1.nokia.press/vod?rule=AnFuns",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -163,7 +163,7 @@
"key": "dr_cokemv",
"name": "cokemv(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=cokemv",
+ "api": "http://cms1.nokia.press/vod?rule=cokemv",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -172,7 +172,7 @@
"key": "dr_l0l",
"name": "l0l(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=l0l",
+ "api": "http://cms1.nokia.press/vod?rule=l0l",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -181,7 +181,7 @@
"key": "dr_LIBVIO",
"name": "LIBVIO(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=LIBVIO",
+ "api": "http://cms1.nokia.press/vod?rule=LIBVIO",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -190,7 +190,7 @@
"key": "dr_vip影院",
"name": "vip影院(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=vip影院",
+ "api": "http://cms1.nokia.press/vod?rule=vip影院",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -199,7 +199,7 @@
"key": "dr_万能影视",
"name": "万能影视(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=万能影视",
+ "api": "http://cms1.nokia.press/vod?rule=万能影视",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -208,7 +208,7 @@
"key": "dr_兔小贝",
"name": "兔小贝(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=兔小贝",
+ "api": "http://cms1.nokia.press/vod?rule=兔小贝",
"searchable": 1,
"quickSearch": 0,
"filterable": 0
@@ -217,7 +217,7 @@
"key": "dr_剧白白",
"name": "剧白白(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=剧白白",
+ "api": "http://cms1.nokia.press/vod?rule=剧白白",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -226,7 +226,7 @@
"key": "dr_喵喵",
"name": "喵喵(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=喵喵",
+ "api": "http://cms1.nokia.press/vod?rule=喵喵",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -235,7 +235,7 @@
"key": "dr_在线之家",
"name": "在线之家(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=在线之家",
+ "api": "http://cms1.nokia.press/vod?rule=在线之家",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -244,7 +244,7 @@
"key": "dr_夜空",
"name": "夜空(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=夜空",
+ "api": "http://cms1.nokia.press/vod?rule=夜空",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -253,7 +253,7 @@
"key": "dr_奇珍异兽",
"name": "奇珍异兽(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=奇珍异兽",
+ "api": "http://cms1.nokia.press/vod?rule=奇珍异兽",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -262,7 +262,7 @@
"key": "dr_小强迷",
"name": "小强迷(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=小强迷",
+ "api": "http://cms1.nokia.press/vod?rule=小强迷",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -271,7 +271,7 @@
"key": "dr_小猫咪",
"name": "小猫咪(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=小猫咪",
+ "api": "http://cms1.nokia.press/vod?rule=小猫咪",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -280,7 +280,7 @@
"key": "dr_干饭影视",
"name": "干饭影视(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=干饭影视",
+ "api": "http://cms1.nokia.press/vod?rule=干饭影视",
"searchable": 0,
"quickSearch": 0,
"filterable": 0
@@ -289,7 +289,7 @@
"key": "dr_库马伊",
"name": "库马伊(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=库马伊",
+ "api": "http://cms1.nokia.press/vod?rule=库马伊",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -298,7 +298,7 @@
"key": "dr_影视工厂",
"name": "影视工厂(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=影视工厂",
+ "api": "http://cms1.nokia.press/vod?rule=影视工厂",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -307,7 +307,7 @@
"key": "dr_瓜皮TV",
"name": "瓜皮TV(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=瓜皮TV",
+ "api": "http://cms1.nokia.press/vod?rule=瓜皮TV",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -316,7 +316,7 @@
"key": "dr_看视界",
"name": "看视界(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=看视界",
+ "api": "http://cms1.nokia.press/vod?rule=看视界",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -325,7 +325,7 @@
"key": "dr_腾云驾雾",
"name": "腾云驾雾(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=腾云驾雾",
+ "api": "http://cms1.nokia.press/vod?rule=腾云驾雾",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -334,16 +334,25 @@
"key": "dr_莫扎兔",
"name": "莫扎兔(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=莫扎兔",
+ "api": "http://cms1.nokia.press/vod?rule=莫扎兔",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
},
+ {
+ "key": "dr_菜狗",
+ "name": "菜狗(道长)",
+ "type": 1,
+ "api": "http://cms1.nokia.press/vod?rule=菜狗",
+ "searchable": 1,
+ "quickSearch": 0,
+ "filterable": 1
+ },
{
"key": "dr_蓝光影院",
"name": "蓝光影院(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=蓝光影院",
+ "api": "http://cms1.nokia.press/vod?rule=蓝光影院",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -352,7 +361,7 @@
"key": "dr_蓝莓影视",
"name": "蓝莓影视(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=蓝莓影视",
+ "api": "http://cms1.nokia.press/vod?rule=蓝莓影视",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -361,7 +370,7 @@
"key": "dr_追剧喵",
"name": "追剧喵(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=追剧喵",
+ "api": "http://cms1.nokia.press/vod?rule=追剧喵",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -370,7 +379,7 @@
"key": "dr_鸭奈飞",
"name": "鸭奈飞(道长)",
"type": 1,
- "api": "http://cms.nokia.press/vod?rule=鸭奈飞",
+ "api": "http://cms1.nokia.press/vod?rule=鸭奈飞",
"searchable": 1,
"quickSearch": 1,
"filterable": 0
@@ -383,7 +392,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_ali.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_ali.py"
},
{
"key": "py_bilibili",
@@ -393,7 +402,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_bilibili.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_bilibili.py"
},
{
"key": "py_bilimd",
@@ -403,7 +412,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_bilimd.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_bilimd.py"
},
{
"key": "py_bilivd",
@@ -413,7 +422,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_bilivd.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_bilivd.py"
},
{
"key": "py_cctv",
@@ -423,7 +432,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_cctv.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_cctv.py"
},
{
"key": "py_cokemv",
@@ -433,7 +442,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_cokemv.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_cokemv.py"
},
{
"key": "py_czspp",
@@ -443,7 +452,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_czspp.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_czspp.py"
},
{
"key": "py_douyu",
@@ -453,7 +462,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_douyu.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_douyu.py"
},
{
"key": "py_genmov",
@@ -463,7 +472,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_genmov.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_genmov.py"
},
{
"key": "py_gimytv",
@@ -473,7 +482,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_gimytv.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_gimytv.py"
},
{
"key": "py_gitcafe",
@@ -483,7 +492,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_gitcafe.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_gitcafe.py"
},
{
"key": "py_huya",
@@ -493,7 +502,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_huya.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_huya.py"
},
{
"key": "py_pansou",
@@ -503,7 +512,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_pansou.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_pansou.py"
},
{
"key": "py_voflix",
@@ -513,7 +522,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_voflix.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_voflix.py"
},
{
"key": "py_xmaomi",
@@ -523,7 +532,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_xmaomi.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_xmaomi.py"
},
{
"key": "py_yiso",
@@ -533,7 +542,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_yiso.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_yiso.py"
},
{
"key": "py_zhaozy",
@@ -543,7 +552,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_zhaozy.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_zhaozy.py"
},
{
"key": "py_zxzj",
@@ -553,7 +562,7 @@
"searchable": 1,
"quickSearch": 1,
"filterable": 0,
- "ext": "http://cms.nokia.press/txt/py/py_zxzj.py"
+ "ext": "http://cms1.nokia.press/txt/py/py_zxzj.py"
}
],
"parses": [