Compare commits

..

853 Commits

Author SHA1 Message Date
haiyangcui
b580ae4329 记录最近打开detail页面的视图,当回到该视图时,恢复detail页面 2021-02-21 22:55:31 +01:00
haiyangcui
8ae32f0f55 v2.7.5 2021-02-21 21:49:39 +01:00
haiyangcui
713ffa6b3e 从gitee上获取推荐影视列表 2021-02-21 21:39:56 +01:00
haiyangcui
a3bc8f1f31 当重置或源站列表为空时,从云端获取源站 2021-02-21 21:32:58 +01:00
haiyangcui
22318f601b 修复播放速率显示信息位置错误的问题 2021-02-21 21:15:56 +01:00
buvta
aa8b4b527d 修复历史兼容导入m3u8List 2021-02-21 23:03:05 +08:00
haiyangcui
7bee4df2f9 默认使用gitee上的源站文件 2021-02-21 12:49:57 +01:00
haiyangcui
7a72b352c0 v2.7.4 2021-02-21 09:03:34 +01:00
haiyangcui
f924c6979b Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player 2021-02-20 18:31:53 +01:00
haiyangcui
ef2740d801 降级qrcode.vue和saas模块 2021-02-20 18:31:36 +01:00
haiyangcui
0650e868eb 降级qrcode.vue 2021-02-20 18:24:56 +01:00
haiyangcui
573f026207 升级模块 2021-02-20 17:46:21 +01:00
haiyangcui
f9504439b0 使用axios get 无需使用post 2021-02-20 17:24:06 +01:00
haiyangcui
59f9772e82 支持从默认Github源或自定义在线源站文件重置源 2021-02-20 10:46:15 +01:00
buvta
2db48c9220 Merge branch 'master' into master 2021-02-09 23:55:26 +08:00
buvta
63c6ad0ec0 修复分享地址未正确生成的bug 2021-02-05 23:21:25 +08:00
buvta
730181e4bc 解析播放时隐藏部分菜单 2021-02-05 23:09:38 +08:00
buvta
7d61bb04a7 修复全新使用时不含源时产生的bug 2021-02-04 17:59:30 +08:00
buvta
613901872e v2.7.3 2021-02-04 16:40:08 +08:00
buvta
ef3264f3db 应用不再内置源 2021-02-04 16:28:07 +08:00
Hunlongyu
56d5858e0f Update README.md 2021-02-03 14:40:57 +08:00
buvta
3f4da7806a 功能重复,zy.search已包含过滤功能 2021-01-27 22:30:50 +08:00
haiyangcui
00aa3c8408 过滤搜索结果,只返回名字中包含搜索关键词的结果 2021-01-27 11:49:12 +01:00
buvta
a9d889f7d8 再次调整 2021-01-27 18:27:12 +08:00
buvta
b946423b65 修复精简模式切换播放器后停止时窗口大小异常 2021-01-26 19:25:10 +08:00
buvta
f2c87a7880 优化搜索结果过滤器,避免屏蔽福利时筛选为空 2021-01-25 19:52:32 +08:00
buvta
0ecc1367d2 优化搜索,过滤掉异常结果 2021-01-25 17:15:04 +08:00
Hunlongyu
9673303fe9 增加友链 2021-01-25 09:44:02 +08:00
Hunlongyu
88582b45b3 升级依赖 2021-01-25 09:32:01 +08:00
buvta
443cdc59fc 停止时默认生成hls播放器,使停止播放mp4时“播放”可用 2021-01-24 15:34:55 +08:00
buvta
c08ae7666c 优化音量保存策略 2021-01-24 15:25:13 +08:00
buvta
6bfeb9fcd8 修复历史清空按钮显示 2021-01-22 19:00:58 +08:00
buvta
e3bc519128 历史导入兼容老版数据m3u8List 2021-01-22 18:52:21 +08:00
buvta
504b11ceec 修复频道搜索功能 2021-01-22 18:40:38 +08:00
buvta
d281a2adab 再次调整直播自动换源 2021-01-22 17:43:52 +08:00
buvta
4e0f73a3de 再次调整黑屏操作 2021-01-22 17:05:44 +08:00
buvta
3a78425e7f 修复频道prefer源被删除导致的bug 2021-01-22 16:47:01 +08:00
buvta
a38b9aed56 优化直播卡顿自动切换 2021-01-21 23:40:26 +08:00
buvta
ec4980a4b6 黑屏有声音时尽量避免手动操作 2021-01-21 22:28:12 +08:00
buvta
2c93d755c7 Revert "修复play-request-was-interrupted报错",重新发布
This reverts commit 088cd70e41.
2021-01-21 18:16:25 +08:00
buvta
fe75084dd0 v2.7.2 2021-01-21 17:19:39 +08:00
buvta
047224ce80 修复直播时触发timeupdate导致的异常 2021-01-21 17:11:46 +08:00
buvta
31ea52e267 为应对flv切换到其它格式时可能出现的黑屏有声音情况,新增的关闭按钮常显 2021-01-21 16:11:52 +08:00
buvta
088cd70e41 修复play-request-was-interrupted报错 2021-01-21 15:47:02 +08:00
buvta
6bfd96942d 切换频道首尾部自动轮替 2021-01-21 15:44:28 +08:00
buvta
5d6579326c 频道所有源全部卡顿时自动换台 2021-01-21 15:36:33 +08:00
buvta
334933ce82 直播卡顿时自动换源 2021-01-20 23:22:23 +08:00
buvta
9fd3e5e2ed 修复flv直播停止功能 2021-01-20 22:22:46 +08:00
buvta
1e7199af3f 修复改动flv直播状态导致的bug 2021-01-20 18:23:10 +08:00
buvta
0d83b277e7 下移播放器速率栏,避免鼠标移动时误触进度条 2021-01-19 23:34:12 +08:00
buvta
08cbd1a73c 修正某些源站剧集顺序 2021-01-19 22:34:50 +08:00
buvta
01e58f458b 修复zy.download因分隔符导致的bug 2021-01-19 20:26:53 +08:00
buvta
3ac21ad1e5 更新7k源解析接口地址 2021-01-19 19:54:40 +08:00
buvta
f098198448 可通过重置更新应用默认解析接口地址 2021-01-19 19:54:07 +08:00
buvta
35e6e59b73 添加应用默认解析接口设置 2021-01-19 17:33:39 +08:00
buvta
bf9eaf09eb 调整解析接口默认打开方式 2021-01-19 17:28:55 +08:00
buvta
03ec267c1f 修改jiexiURL应对源自带解析的情况 2021-01-19 16:29:07 +08:00
buvta
97aea7b98d 修复因分隔符"$"改动引入的bug 2021-01-19 16:22:02 +08:00
buvta
f8ad00b4d0 zy.detail获取到的链接分隔符包含多个"$", 88资源站有点怪 2021-01-18 22:30:03 +08:00
buvta
607d4baae4 修复使图片无法加载时分享可用 2021-01-18 21:07:57 +08:00
buvta
51208892d0 修复zy.detail获取到的链接不包含"$"时产生的bug 2021-01-18 21:07:42 +08:00
buvta
516b791719 再次调整直播源检测跳过功能 2021-01-18 18:44:29 +08:00
buvta
8032645c25 修复调整生成调试信息时引入的bug 2021-01-18 18:33:15 +08:00
Hunlongyu
9d0536a3f8 升级依赖, 解决 GitHub 报错问题 2021-01-18 10:38:01 +08:00
Hunlongyu
85a39d67ce 修改第三方播放路径为 Gitee. 2021-01-18 10:28:01 +08:00
Hunlongyu
3184147910 升级依赖, 修复分享图片和二维码失效的问题 2021-01-18 10:09:18 +08:00
buvta
9d8a09e90d 修复直播源检测跳过功能 2021-01-17 23:27:56 +08:00
buvta
5d08e715aa 使用代理时可检测flv直播源 2021-01-17 14:55:39 +08:00
buvta
98378788fd 直播源检测支持flv格式,使用代理时暂不可用 2021-01-16 17:20:19 +08:00
buvta
af768d527a 直播支持flv格式,播放器停止功能待修复 2021-01-15 22:12:55 +08:00
buvta
4e5aab6f66 调整播放调试生成信息 2021-01-03 22:49:17 +08:00
buvta
fda305a8ae Film搜索亦过滤 2021-01-03 00:14:18 +08:00
buvta
21487e2754 Film添加列表时过滤掉无链接的项 2021-01-02 23:58:00 +08:00
buvta
0f934413d0 再次调整axios超时设置 2021-01-02 21:38:56 +08:00
buvta
96c68da8b7 有些直播源网址路径不含m3u8而是以参数带m3u8结尾 2021-01-02 21:15:17 +08:00
buvta
0e0de8f23c 修正关闭内嵌播放器bug 2021-01-02 16:01:30 +08:00
buvta
2b24ac7d0c 手动修正变量定义var 2021-01-02 15:05:24 +08:00
buvta
458144a6ea 修正清理缓存描述 2021-01-02 14:58:24 +08:00
buvta
69113c7a9a 更新下载完毕后通知 2021-01-01 22:55:14 +08:00
buvta
d247a2fa23 分享在详情页可选定集数,播放页面分享为当前集,其它页面分享默认首集 2021-01-01 22:50:33 +08:00
buvta
c14c78b68f Star添加DetailCache 2021-01-01 15:46:54 +08:00
buvta
cc4e2c5cad 历史页面禁止拖动 2021-01-01 15:24:24 +08:00
buvta
073e111af8 嵌入播放时添加关闭按钮 2021-01-01 15:19:24 +08:00
buvta
fea076318d v2.7.1 2020-12-31 23:30:00 +08:00
buvta
df867fa919 修复播放和历史页面无法分享的bug 2020-12-31 23:27:25 +08:00
buvta
a7f0030462 疑似需要授权,先移除阿里云源 2020-12-31 22:53:05 +08:00
buvta
b5274c79b0 修复获取下载链接时的bug 2020-12-31 22:32:59 +08:00
buvta
a2de1984e3 改为原来的更新组件,避免因为超时而中断卡住 2020-12-31 22:12:30 +08:00
buvta
81b5391f64 详情页根据历史记录更新videoFlag 2020-12-31 20:20:34 +08:00
buvta
2c6ad44974 根据videoFlag获取下载链接 2020-12-31 20:11:06 +08:00
buvta
e1c942dc7b 过滤掉无效链接 2020-12-31 19:16:35 +08:00
buvta
4420e6961e 修复因为删除m3u8List数据库更新bug 2020-12-31 18:35:25 +08:00
buvta
2deffab3ba 解决detail丢失问题 2020-12-31 17:08:55 +08:00
buvta
05a07bee62 移除m3u8List 2020-12-31 16:34:18 +08:00
buvta
025d1606f7 保存videoFlag 2020-12-31 16:34:18 +08:00
buvta
b72c88dfb9 将ZY支持的播放列表前置到首位 2020-12-31 16:34:05 +08:00
buvta
db240cc163 优化getPlayer 2020-12-31 13:38:44 +08:00
haiyangcui
0ef55f0139 在线解析的视频,不显示"手动跳略时长" 2020-12-30 17:14:46 +01:00
haiyangcui
0ad9b49224 解决有多个视频列表时的播放错误 2020-12-30 17:08:21 +01:00
haiyangcui
ccbf4fb5d7 移除不必要的log 2020-12-30 17:03:47 +01:00
haiyangcui
46e376a351 翻转需要解析的视频网站的视频顺序,保证最近更新的视频在最上面 2020-12-30 16:58:33 +01:00
buvta
23e693a314 多个播放视频列表时优先选择应用支持的 2020-12-30 23:52:38 +08:00
buvta
3a3e37f4bd 修复直接手动设置调略设置时片头片尾一起变动 2020-12-30 23:08:46 +08:00
buvta
e568053b95 修复改动导致快捷键设置片头片尾标记失效 2020-12-30 23:02:22 +08:00
haiyangcui
fe9cd9f5bc 无需记录mp4List 2020-12-30 15:44:19 +01:00
buvta
8cf3ec94d9 清理Play多余代码 2020-12-30 20:23:57 +08:00
buvta
112f92d3e0 在线解析时添加进历史记录 2020-12-30 20:10:11 +08:00
buvta
88db766337 添加提示,避免调用解析接口响应慢时尴尬空白 2020-12-30 19:32:55 +08:00
buvta
205b9d7979 改写zy.download以优化代码 2020-12-30 17:13:12 +08:00
buvta
d5a7771a67 vuex引入DetailCache,避免重复获取详情页 2020-12-30 15:57:08 +08:00
buvta
655ed7fb16 解决改动新引入的bug 2020-12-30 12:41:34 +08:00
haiyangcui
808f3d2012 修复播放完在线解析的视频后无法播放m3u8的问题 2020-12-29 23:38:02 +01:00
haiyangcui
ee4b944abf 修改被选中的video flag背景色 2020-12-29 23:03:47 +01:00
haiyangcui
b4abd9369f 将视频flag列表和剧集列表分开 2020-12-29 22:56:08 +01:00
haiyangcui
079da637ec 只有当视频有多个源时,显示视频源flag列表 2020-12-29 22:53:30 +01:00
haiyangcui
0c8a100d1c 视频分类被选后时改变背景颜色 2020-12-29 22:29:39 +01:00
haiyangcui
0cc330463f 获取全部视频提供的视频列表,为兼容目的,zy.detail函数仍返回m3u8List和mp4List, 会在后续工作中陆续删除 2020-12-29 22:04:52 +01:00
buvta
f50d669a5f 修正下载功能并调整通知描述 2020-12-30 00:16:22 +08:00
buvta
57fd1d325e 修复Play点击播放器下方按钮时弹窗反复弹出及按钮active状态 2020-12-29 22:59:48 +08:00
buvta
e31b921486 修复Play点播m3u8播放列表导出功能 2020-12-29 21:29:10 +08:00
buvta
08b39a5bb1 调整Play历史记录的播放时间保存 2020-12-29 18:30:05 +08:00
buvta
1fefc792fc 修改请求referer 2020-12-29 17:03:13 +08:00
buvta
f134785696 修改请求referer 2020-12-29 16:02:50 +08:00
buvta
b9a4784de2 bug依旧,xgplayer-mp4似乎没啥作用先移除 2020-12-29 15:59:43 +08:00
buvta
855472fe68 修复mp4停止后点击播放按钮无法播放,并引入xgplayer-flv.js 2020-12-29 00:50:59 +08:00
buvta
4834d4423c Revert "eslint自动修复var定义变量带来的警告"
This reverts commit 4de2177cc7.
2020-12-28 23:05:12 +08:00
buvta
4de2177cc7 eslint自动修复var定义变量带来的警告 2020-12-28 22:29:11 +08:00
buvta
ca9f9c9160 修复点击播放按钮时产生重复历史记录 2020-12-28 21:37:29 +08:00
buvta
7c0f688f9d 修正Play页面最近历史记录 2020-12-28 20:15:09 +08:00
buvta
4bfae63201 点播支持mp4格式视频源 2020-12-28 19:45:18 +08:00
haiyangcui
419a56518f 解决上次的commit错误 2020-12-27 21:55:30 +01:00
haiyangcui
36efdcd869 sites数据引入jiexiUrl数据段,播放时需要解析时,不同源可以定义不同的解析网站 2020-12-27 21:53:24 +01:00
haiyangcui
a297aca812 直接在内嵌iframe中播放阿里云资源 2020-12-27 17:36:49 +01:00
buvta
0b4dd2e859 阿里云资源站临时可用 2020-12-28 00:00:24 +08:00
buvta
3142306a0c 优化tools使某些源站api可用 2020-12-27 21:20:28 +08:00
haiyangcui
9d4765c1ea 修改拼写错误 2020-12-26 22:59:25 +01:00
buvta
547dffb922 动态配置axios超时 2020-12-26 22:35:30 +08:00
buvta
84e61acde7 Update bug.md 2020-12-26 14:18:10 +08:00
haiyangcui
11c756466c 播放的一开始就先清空onlineUrl,否则播放iptv会有问题 2020-12-24 16:22:51 +01:00
haiyangcui
06291ffc4b 解决播放解析视频后再打开,因为没有时间记录而报错的问题 2020-12-24 16:06:56 +01:00
haiyangcui
1f65e5ba0a 在播放页面利用iframe嵌入需要在线解析的内容 2020-12-24 15:53:02 +01:00
haiyangcui
392f0fd326 改进豆瓣搜索,匹配名字和年代 2020-12-24 13:04:01 +01:00
haiyangcui
a6b6407679 采用7K接口 2020-12-23 14:30:59 +01:00
haiyangcui
96678bf5df 只有当xg-btn-showhistory存在时,才设置它的样式 2020-12-23 14:30:05 +01:00
haiyangcui
3c37b8286f 解决运行时因为star history table还没实例化而出现的错误 2020-12-23 14:27:53 +01:00
haiyangcui
38862f6ad8 升级依赖,并解决升级后出现的错误 2020-12-23 14:24:43 +01:00
buvta
35213238f4 使用el内置clickoutside替代vue-clickaway,修复点击菜单按钮时被捕捉失效 2020-12-21 21:01:51 +08:00
buvta
2a03388d6b v2.7.0 2020-12-19 13:29:31 +08:00
buvta
ef704a9d45 禁用allowRunningInsecureContent 2020-12-19 13:27:07 +08:00
buvta
946978fa86 修复深色主题下el-switch标签文本不可见 2020-12-19 13:10:30 +08:00
haiyangcui
70b03e67fb 在右侧显示分隔栏内容,1.在中间的时候永远无法和中间的下拉菜单对齐, 2. 不常用的按钮放在边侧,以降低对用户注意力的影响 2020-12-18 22:25:55 +01:00
haiyangcui
1ee7c6f032 设置不同主题下的工具栏样式 2020-12-18 22:11:18 +01:00
buvta
f2f58fb888 调整版本号到v2.6.10 2020-12-18 18:03:35 +08:00
buvta
5286568801 允许证书错误v2.7.0rc 2020-12-18 17:16:23 +08:00
buvta
2a9f8ed0dc 避免改动数据库时重置软件 2020-12-18 16:25:04 +08:00
buvta
eb3d064cb5 改动shortcut数据库,避免快捷键指南太过杂乱 2020-12-17 20:33:56 +08:00
buvta
a0ec282cc2 fix:改动快捷键设置时未及时生效 2020-12-17 20:15:16 +08:00
buvta
ea61dca27b film下el-select的visible-change事件改为change 2020-12-17 16:54:21 +08:00
buvta
fd0be9e96b film搜索调整隐藏列 2020-12-17 16:49:49 +08:00
buvta
775247e28b 设置快捷键添加重置功能 2020-12-17 16:47:57 +08:00
buvta
ded5c39790 Play频道列表添加clickaway事件 2020-12-17 16:36:40 +08:00
buvta
16e44d71bd 海报模式下不提醒支持shift 2020-12-17 16:22:20 +08:00
buvta
ae0858319f 完善导入导出的title提示 2020-12-15 20:35:50 +08:00
buvta
3c6733648b 再次调整resize事件 2020-12-15 20:22:01 +08:00
buvta
06bd915964 调大el-select下拉框高度 2020-12-15 17:15:25 +08:00
buvta
dfcd786f53 fix:收藏批量删除 2020-12-15 16:24:12 +08:00
buvta
d0f6282b81 批量检测完成时提示 2020-12-15 15:42:13 +08:00
buvta
ab3a6e1fd2 各页面完善按钮提示 2020-12-15 15:20:55 +08:00
buvta
0cb540d3e5 历史收藏添加支持shift提示 2020-12-15 14:34:14 +08:00
buvta
1d0123d69f fix:历史收藏列表模式拖拽调序 2020-12-15 14:23:31 +08:00
buvta
6dbcb8e621 历史与收藏添加批量删除 2020-12-15 14:17:13 +08:00
buvta
b1a6d58974 清除iptv的watch view 2020-12-15 14:12:02 +08:00
haiyangcui
bb45006ff7 Revert "删除跳过片头片尾里的无用代码"
This reverts commit e9f81faf70.
2020-12-14 17:11:47 +01:00
haiyangcui
e9f81faf70 删除跳过片头片尾里的无用代码 2020-12-14 16:26:47 +01:00
cuiocean
b864c6ca15 Merge pull request #383 from Hunlongyu/dependabot/npm_and_yarn/ini-1.3.8
Bump ini from 1.3.5 to 1.3.8
2020-12-14 16:12:49 +01:00
buvta
9f98231eed 添加提示次数限制 2020-12-14 22:27:21 +08:00
buvta
3bcf5b1618 添加多选支持shift提示 2020-12-14 21:21:29 +08:00
buvta
d7a6245f8a 导出为json格式时自动添加扩展名 2020-12-14 21:19:32 +08:00
buvta
2abf2aeda7 设置页添加更新日志与常见问题链接 2020-12-14 17:18:19 +08:00
buvta
c3129c7cee 调整Play页面某些变量的命名 2020-12-14 17:08:38 +08:00
buvta
3b0ec94d2b 直播停止时亦可弹出频道列表 2020-12-14 17:03:24 +08:00
buvta
9902d98342 调整海报模式延时间隔 2020-12-13 23:17:28 +08:00
buvta
b5f5baeb8f 点击播放历史记录按钮时隐藏频道列表 2020-12-13 22:59:17 +08:00
buvta
f396d5ea05 停止时隐藏跳过片头片尾 2020-12-13 22:51:46 +08:00
buvta
e616aa5e2a 播放器初始状态点播放,历史记录为空时直接停止重置 2020-12-13 22:25:58 +08:00
buvta
f041093fe9 清除播放窗口还原时hasStart变量 2020-12-13 22:25:58 +08:00
buvta
e66c056283 稍微调整跳过片头片尾,并添加注释 2020-12-13 22:25:52 +08:00
haiyangcui
d33bbcff06 设置片头片尾按钮的文字提示改为tooltips提示 2020-12-13 14:49:11 +01:00
buvta
992c2f152f 推荐页切换页面时没必要重新读取数据库,并修正换行符 2020-12-13 18:36:31 +08:00
buvta
118bc5058c 调整历史播放页面watch监测view的事件 2020-12-13 18:21:38 +08:00
buvta
19c11f2694 fix:海报模式film页面加载图片时来回切换页面偶尔有卡片被部分遮掩,其它页面是重新加载数据故而不用 2020-12-13 18:12:47 +08:00
buvta
0a812ff6c4 el-select多选时显示全部标签 2020-12-13 16:30:12 +08:00
buvta
1e6a98df88 海报模式重新加上resize事件 2020-12-13 16:08:57 +08:00
buvta
b1b4e61244 fix:改造时调整rowDrop触发时机 2020-12-13 15:38:36 +08:00
buvta
2a05b2abdb 推荐、历史、收藏页面进行类film改造 2020-12-13 15:37:10 +08:00
buvta
74beb47ad5 fix: film搜索切换回海报模式时部分卡片被遮掩显示不全的bug 2020-12-13 15:08:32 +08:00
buvta
325a7f3b0d 调小播放器重置延时 2020-12-13 13:10:52 +08:00
buvta
9b5b5a1334 修复播放器初始状态时点击播放时的bug,并给直播加上对应功能 2020-12-13 13:09:36 +08:00
buvta
74dee7a892 调整film窗口resize事件触发机制 2020-12-13 11:53:35 +08:00
dependabot[bot]
d07436d876 Bump ini from 1.3.5 to 1.3.8
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-13 01:04:59 +00:00
buvta
e283152a89 去除多余代码,Waterfall在数据及窗口变动时会自动刷新 2020-12-12 23:02:20 +08:00
buvta
bdeeccedb9 film列表模式窗口宽度足够时显示“最近更新” 2020-12-12 23:01:31 +08:00
haiyangcui
5931266770 播放页面,显示历史时间信息 2020-12-12 13:51:58 +01:00
haiyangcui
bbeb75631d 打开ZY,直接播放的话,或者是视频停止后再点击播放的话,播放最近的历史记录 2020-12-12 13:39:44 +01:00
haiyangcui
c0f4940289 设置quitMiniMode按钮默认不显示,这样每次播放视频的时候就无需设置'xg-btn-quitMiniMode'的样式 2020-12-12 13:01:27 +01:00
buvta
db1b81243a 修复“站内”时切换站点可搜索 2020-12-12 12:56:55 +08:00
buvta
97b6a8259f 继续调整 2020-12-12 12:52:27 +08:00
buvta
4c92ff9e70 fix:优化film停止搜索时的自动切换searchRunning问题 2020-12-12 12:25:04 +08:00
buvta
b8dc7f4526 film工具栏分割线添加"回到顶部" 2020-12-11 23:42:28 +08:00
buvta
0d6e0d6e9f film停止搜索优化 2020-12-11 23:07:13 +08:00
buvta
1a5bac68ad 调整film搜索表格过滤器设置 2020-12-11 16:11:12 +08:00
buvta
83e302aeb7 film搜索使用工具栏实现过滤(功能实现) 2020-12-11 15:45:36 +08:00
buvta
2196eaa68c 视图模式切换转移到工具栏分割线,搜索亦可用工具栏(功能待实现) 2020-12-11 15:41:28 +08:00
haiyangcui
40aae02af6 修复收藏页的共享功能 2020-12-10 17:17:28 +01:00
haiyangcui
f078df6f8e 修复推荐页的分享功能 2020-12-10 17:14:49 +01:00
haiyangcui
ee44bfe0a8 支持停止搜索,虽然实际上是停止把搜索结果加入searchContents,但对于用户来说应该是足够了. 2020-12-10 16:59:07 +01:00
hunlongyu
9d9a808226 修复分享二维码地址为空的bug 2020-12-10 23:17:55 +08:00
buvta
d78784c0d9 fix:精简模式切换内容时quitMini图标消失 2020-12-10 16:10:51 +08:00
buvta
1ead8a5594 开启过滤切换分类数据过少时加大请求间隔 2020-12-10 16:10:51 +08:00
Hunlongyu
b63c8f4daf 优化自动更新功能, 增加进度条 2020-12-10 14:59:49 +08:00
Hunlongyu
011400f714 删除 server.js 文件 2020-12-10 10:00:20 +08:00
Hunlongyu
1d725579de Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player into master 2020-12-10 09:59:07 +08:00
Hunlongyu
93749c3841 移除 node 代理 2020-12-10 09:59:01 +08:00
haiyangcui
4b0c67b8fa 添加"跳略设置"按钮,避免一直显示片头片尾设置 2020-12-08 18:08:03 +01:00
buvta
165040872c fix:工具栏收起时重置selectedArea 2020-12-08 22:06:09 +08:00
buvta
27773be1c7 v2.6.9 2020-12-08 18:26:05 +08:00
buvta
fadb50a28b film调整areas刷新策略 2020-12-08 18:14:21 +08:00
buvta
518a9c3492 播放视频开始时重置片头片尾输入框数据 2020-12-08 17:36:33 +08:00
buvta
d5eb4dc49f film搜索不加载工具栏开关 2020-12-08 16:48:27 +08:00
buvta
e76bee574f film避免列表模式下加载图片 2020-12-08 16:46:02 +08:00
buvta
b7779a3e6f 疑似el-select弹窗bug,临时性修补 2020-12-08 15:45:25 +08:00
buvta
4cb5b48985 收起工具栏时重置列表 2020-12-08 15:37:21 +08:00
buvta
b2128113ba 调整工具栏refreshFilteredList触发方式 2020-12-08 15:24:36 +08:00
buvta
58d0ae6da1 工具栏"语言"替换为"排序" 2020-12-08 13:03:58 +08:00
buvta
2bd821f59d 调整工具栏打开方式 2020-12-08 12:20:12 +08:00
haiyangcui
8d002225fd 添加'过滤器'按钮,控制过滤选项按钮组的显示 2020-12-07 16:47:45 +01:00
haiyangcui
0243c2f0fe Fix: 切换类型时,总是调用refreshFilteredList 2020-12-07 16:28:30 +01:00
buvta
b8edd7f440 Revert "fix:海报模式切换分类时偶尔空白页"
This reverts commit 1df6726a3b.
2020-12-07 20:22:22 +08:00
buvta
4683aecf7b fix:上层弹窗被过滤工具栏遮蔽 2020-12-07 20:22:22 +08:00
buvta
16d38ba2b4 调整相应样式 2020-12-07 19:43:36 +08:00
buvta
fe7fe06d48 film添加过滤工具栏 2020-12-07 19:43:36 +08:00
buvta
c1220ef752 手动设置跳过片头片尾时间长度 2020-12-07 07:01:22 +08:00
buvta
f0c221a863 修复福利屏蔽 2020-12-06 18:40:18 +08:00
buvta
1df6726a3b fix:海报模式切换分类时偶尔空白页 2020-12-06 18:29:45 +08:00
buvta
1a9e939f9c 更新直播源 2020-12-06 15:53:55 +08:00
buvta
39cb188604 调整iptv分组命名规则 2020-12-06 15:53:13 +08:00
buvta
aba4d12302 确保不会意外引入代理 2020-12-05 23:54:29 +08:00
buvta
17c77fd48a 禁止xgplayer显示重播 2020-12-05 23:48:24 +08:00
buvta
1cfc12ec19 fix:确保不会跳过多集 2020-12-05 23:46:03 +08:00
buvta
b0aa1dc28a 视频多集时可通过快捷键设置跳过片头片尾,保存在相应的历史记录中 2020-12-05 19:10:05 +08:00
haiyangcui
0c12b394a7 视频列表页,支持按地区过滤数据 2020-12-04 14:06:30 +01:00
haiyangcui
9e468bc82e 在类型框内显示视频数信息 2020-12-04 13:48:31 +01:00
haiyangcui
973a15b593 统一downloadEvent函数 2020-12-02 15:19:50 +01:00
Hunlongyu
253c1e7723 分享的网址改为 gitee, 国内用户打开更快 2020-12-02 10:21:54 +08:00
Hunlongyu
7b44051190 更新官网截图,, 修改部分描述 2020-12-02 10:19:12 +08:00
Hunlongyu
a25ac77ebc 更新 README 2020-12-02 10:02:42 +08:00
haiyangcui
d187167fbe 解决换源时视频类型不正常更新的问题 2020-12-01 16:01:47 +01:00
haiyangcui
b34347cf43 添加视频数信息 2020-12-01 13:20:50 +01:00
haiyangcui
829d9447a4 删除重复和不可用的源站 2020-12-01 13:07:11 +01:00
haiyangcui
39067c6a35 缓存视频列表信息 2020-12-01 00:24:38 +01:00
haiyangcui
6dbb64a4f2 重构 2020-11-30 23:58:12 +01:00
haiyangcui
f8041290d2 无需定义getPage函数 2020-11-30 23:49:56 +01:00
haiyangcui
f772ac2e9d 从搜索界面返回时,无需再重新加载数据 2020-11-30 17:13:10 +01:00
haiyangcui
ef485ef64a 删除无用代码 2020-11-30 16:48:43 +01:00
haiyangcui
b164d5e83e Revert "降级xgplayer回2.13.1,新版居然不支持缓冲了."
This reverts commit 8cd2b920c8.
2020-11-30 15:48:13 +01:00
haiyangcui
8a5800df93 v2.6.8 2020-11-30 12:37:40 +01:00
haiyangcui
8cd2b920c8 降级xgplayer回2.13.1,新版居然不支持缓冲了. 2020-11-30 11:37:13 +01:00
haiyangcui
5b4cb43aa5 如果源站返回多个视频列表的话, 仅获取m3u8列表 2020-11-30 11:21:55 +01:00
haiyangcui
de1472e668 升级依赖 2020-11-30 10:56:24 +01:00
haiyangcui
0f846b996b 设置播放器默认预加载300秒 2020-11-29 20:11:23 +01:00
cuiocean
2bd5e31a28 Merge pull request #362 from Hunlongyu/dependabot/npm_and_yarn/highlight.js-9.18.5
Bump highlight.js from 9.18.1 to 9.18.5
2020-11-29 20:04:32 +01:00
haiyangcui
9d8dc9ecb1 删除不工作的cctv蓝光源 2020-11-29 16:53:24 +01:00
haiyangcui
2a073e4092 v2.6.7 2020-11-29 16:26:37 +01:00
haiyangcui
b1daa73afe 更新推荐 2020-11-29 16:23:15 +01:00
haiyangcui
18940ff9f7 Revert "更新视频源,删除无效源,添加需要解析的腾讯,搜狐视频等源"
This reverts commit 76d4d68401.
2020-11-29 13:27:20 +01:00
haiyangcui
76d4d68401 更新视频源,删除无效源,添加需要解析的腾讯,搜狐视频等源 2020-11-28 13:00:29 +01:00
haiyangcui
f91200e609 非m3u8视频,使用在线解析网站播放 2020-11-28 12:46:10 +01:00
haiyangcui
b64f500710 Download函数内解析m3u8List,改进downloadEvent函数 2020-11-28 12:30:43 +01:00
haiyangcui
cf1cfe9f77 支持某些源返回json数据不包含rss层 2020-11-28 11:47:48 +01:00
Hunlongyu
da4fe162f6 Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player into master 2020-11-28 09:44:37 +08:00
Hunlongyu
d949c52020 代码优化 2020-11-28 09:44:32 +08:00
buvta
1ce9e0525b Merge branch 'master' into master 2020-11-25 23:38:06 +08:00
dependabot[bot]
4ebf82eae0 Bump highlight.js from 9.18.1 to 9.18.5
Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 9.18.1 to 9.18.5.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/9.18.5/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/compare/9.18.1...9.18.5)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-25 06:15:54 +00:00
buvta
e0b1a5332d iptv优化 2020-11-24 22:27:49 +08:00
buvta
3ecb4302ba iptv优化 2020-11-24 16:46:29 +08:00
buvta
5c39db8ca6 iptv恢复"播放",避免行点击时误操作 2020-11-23 16:34:53 +08:00
buvta
4f45045d18 精简模式alt+m切换进入退出 2020-11-23 16:34:53 +08:00
buvta
b7733179f2 导入直播源时允许网址带参数 2020-11-23 16:34:53 +08:00
haiyangcui
e1f7044ae0 数据更新后,刷新页面 2020-11-22 20:57:27 +01:00
buvta
93e76db444 恢复记录mini窗口状态
This reverts commit bedd1339df.
2020-11-22 23:48:50 +08:00
buvta
6eaa281e4a 直播主窗口隐藏退出mini图标 2020-11-22 23:31:30 +08:00
buvta
490d34e1fb 移除iptvSearch数据库 2020-11-22 22:39:42 +08:00
buvta
0d0d6bd90f iptv移除iptvSearch 2020-11-22 22:35:48 +08:00
buvta
ecdc96d2f3 Play样式相应调整 2020-11-22 22:35:48 +08:00
buvta
234f6dd069 Play频道搜索用el-input替代 2020-11-22 22:35:38 +08:00
haiyangcui
f80fe7ecf1 添加退出精简模式按钮 2020-11-22 14:37:30 +01:00
haiyangcui
6876721567 进入精简模式,无需设置大小位置,直接调用getCssFullscreen即可 2020-11-22 12:41:22 +01:00
haiyangcui
bedd1339df Revert "记录mini窗口大小" 2020-11-22 12:09:36 +01:00
hunlongyu
0a3a7a4d57 Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player 2020-11-22 16:38:49 +08:00
hunlongyu
786e23f5a2 删除冗余代码 2020-11-22 16:38:43 +08:00
buvta
418f14bcc1 调整Ctrl+0描述(弹窗容不下) 2020-11-22 11:20:00 +08:00
buvta
a9e4a34e4f 精简模式添加快捷键Ctrl+0用于恢复默认 2020-11-22 10:56:30 +08:00
buvta
fede7e4ef2 Revert "mini模式,大小直接设置为当前窗口大小,无需记录到数据库中"
This reverts commit f92af48a4e.
2020-11-22 10:41:19 +08:00
buvta
956ebbf8b8 调整Play页面channelList加载策略 2020-11-22 10:32:26 +08:00
haiyangcui
014dac0b64 排序源站,把可用的放上面 2020-11-21 23:37:05 +01:00
haiyangcui
5fc1020e79 升级所有依赖到最新版 2020-11-21 22:48:44 +01:00
haiyangcui
aca487f796 升级依赖 2020-11-21 22:41:09 +01:00
haiyangcui
429eb4aac0 移动getChannelList到if里,避免不必要的开销 2020-11-21 22:27:26 +01:00
haiyangcui
e032f86d3d 切换视图时,无需更新页面和改变infiniteId 2020-11-21 22:16:06 +01:00
haiyangcui
f92af48a4e mini模式,大小直接设置为当前窗口大小,无需记录到数据库中 2020-11-21 19:07:05 +01:00
haiyangcui
eff69db063 infiniteId会在classClick里更新 2020-11-21 18:52:33 +01:00
haiyangcui
a5c8d20635 更新麻花资源的api链接 2020-11-21 18:39:33 +01:00
haiyangcui
da22abd25d 避免不必要的资源访问 2020-11-21 18:38:53 +01:00
haiyangcui
2dd91f78c9 牛牛资源已失效,删除 2020-11-21 18:38:51 +01:00
buvta
a8b0e7e6a8 fix:直播时上下切换频道时的bug 2020-11-21 23:20:17 +08:00
buvta
39edb9ce35 v2.6.6 2020-11-21 16:44:50 +08:00
buvta
3323a56671 fix:置顶图标联动 2020-11-21 16:22:06 +08:00
buvta
4dc88469e8 调整iptv操作列表头,两种显示模式 2020-11-21 15:55:08 +08:00
buvta
b04201f803 Play将win常量提取出来,避免重复获取 2020-11-21 15:52:51 +08:00
buvta
f34da7ff85 Play支持按拼音首字母搜索频道 2020-11-21 13:38:03 +08:00
buvta
b8f010c4f5 调整Play初始化 2020-11-21 13:20:39 +08:00
buvta
f876b863e7 直播换源时可隐藏频道 2020-11-21 13:20:29 +08:00
buvta
384ae10475 iptv移到设置界面,播放界面不加载视频时自动弹出频道列表 2020-11-20 22:50:57 +08:00
buvta
647c540f0b 直播时隐藏历史及播放速率按钮 2020-11-20 22:30:33 +08:00
buvta
87d01da241 精简模式停止时回到主窗口 2020-11-20 22:30:33 +08:00
buvta
641bdf00d3 保存音量 2020-11-20 22:30:33 +08:00
buvta
31510624c1 Update feature.md 2020-11-20 21:14:45 +08:00
buvta
d5c4e296c3 Update bug.md 2020-11-20 21:13:59 +08:00
buvta
f55065472d 调整IPTV批处理时的按钮标签 2020-11-20 15:05:39 +08:00
buvta
525da05c5f iptv导入json时bug修复 2020-11-20 15:00:00 +08:00
buvta
de8c51918f 再次调整 2020-11-20 13:59:18 +08:00
buvta
17229eb6b4 fix:初次切换到Play播放频道时channelList为空 2020-11-20 13:45:17 +08:00
buvta
d4530eef89 iptv导入json时合并而非覆盖 2020-11-20 12:52:13 +08:00
buvta
cb68da5a22 Play调整下代码 2020-11-20 12:06:44 +08:00
buvta
c21f6538f3 iptv改为以channelList为主,导入不再丢失配置
仅在生成channelList时使用iptv数据库,平时清空
导入导出格式为m3u时使用iptvList,json使用channelList
2020-11-20 12:05:20 +08:00
buvta
729dab765c 清理多余的mini窗口代码 2020-11-20 12:02:21 +08:00
buvta
8521de2844 Merge pull request #353 from Hunlongyu/mergeChannelDev
频道合并及播放页面的频道列表及精简模式
2020-11-19 21:31:35 +08:00
buvta
6ec7dffd59 窗口合二为一,更完美的精简模式,按Esc键退出 2020-11-19 18:13:44 +08:00
buvta
51fccb699a Play频道搜索样式调整 2020-11-19 18:13:44 +08:00
buvta
525d6af888 Play支持频道搜索 2020-11-19 18:13:44 +08:00
buvta
5a17d1b991 播放页面支持频道分组(外置) 2020-11-19 18:13:44 +08:00
buvta
edef20d171 fix:源管理清空时亦可添加 2020-11-19 18:13:44 +08:00
buvta
e912804fcc IPTV播放添加prefer 2020-11-19 18:13:44 +08:00
buvta
3165345839 Play做相应调整以使用channelList代替iptvList 2020-11-19 18:13:44 +08:00
buvta
7133c8982a 调整iptv拖拽仅在"不可展开"即批处理模式可用 2020-11-19 18:13:44 +08:00
buvta
26c1ba1e62 解决懒加载带来的bug 2020-11-19 18:13:44 +08:00
buvta
4e83e365a6 移除对iptvList.length的依赖 2020-11-19 18:13:44 +08:00
buvta
03775b091d 调整shift多选时获取首尾位置的方法 2020-11-19 18:13:43 +08:00
buvta
9147a8e1fb Revert "改动syncTableData以便删除可用"
This reverts commit 25d65866ae.
2020-11-19 18:13:43 +08:00
buvta
0d84e20326 支持手动合并 2020-11-19 18:13:43 +08:00
buvta
d421a5cfe4 bug修复 2020-11-19 18:13:43 +08:00
buvta
46fc5a0942 频道合并bug待修复 2020-11-19 18:13:43 +08:00
buvta
60aac3944e 进一步完善合并功能,注释部分及联动待实现 2020-11-19 18:13:43 +08:00
buvta
4683223a68 数据库调整,新增channelList,根据iptvList自动生成 2020-11-19 18:13:43 +08:00
buvta
86856397f6 IPTV实现自动合并懒加载,其它待调整以适应合并 2020-11-19 18:13:43 +08:00
haiyangcui
09e6af6f18 删除无用的extraResources文件夹 2020-11-16 14:30:15 +01:00
haiyangcui
18db5a1eb0 实体化HlsJsPlayer,而非更底层一点的Hls 2020-11-15 16:05:08 +01:00
haiyangcui
d116f08550 更新"更新推荐"提示语 2020-11-15 15:18:07 +01:00
haiyangcui
7441341658 删除记录,成功的话结果很明显,无需消息提醒 2020-11-15 09:48:10 +01:00
haiyangcui
9b71355803 Recommendations都是cuiocean一个人在维护,故将该资源转移到独立的repository里,避免继续污染本repo的commit信息 2020-11-15 09:30:41 +01:00
buvta
aba07ea20b 添加issue模版 2020-11-15 15:07:19 +08:00
buvta
790ea92180 issue模版 2020-11-15 14:57:54 +08:00
haiyangcui
1dc683e332 再次解决恢复窗口不继续播放视频的问题 2020-11-14 20:23:37 +01:00
haiyangcui
82df96e4d0 解决恢复窗口视频不恢复播放的问题 2020-11-14 20:07:46 +01:00
haiyangcui
bb1e31a270 默认video触发touchend事件后视频切换播放/暂停状态,通过closeVideoTouch关闭 2020-11-14 18:09:51 +01:00
haiyangcui
1d8d9ae72f 改变高亮颜色,以适应不同主题 2020-11-14 15:59:10 +01:00
haiyangcui
6dfe3bea95 统一viewMode为列表时的值为table 2020-11-14 15:59:03 +01:00
haiyangcui
6fcb6ad16c 搜索结果支持海报和列表两种模式 2020-11-14 15:58:52 +01:00
haiyangcui
c692ed2100 显示引入使用的依赖,否则编译有警告 2020-11-14 15:58:43 +01:00
hunlongyu
26bcdd4101 🗃 修复download为空时下载出错 2020-11-14 12:46:44 +08:00
buvta
5104f9a85d v2.6.4.1 2020-11-14 11:47:36 +08:00
hunlongyu
d61ee76e58 Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player 2020-11-13 21:33:13 +08:00
hunlongyu
b1a683a8db 🗑 修复 developer 报错 2020-11-13 21:33:07 +08:00
buvta
5d0dc1bed7 补上落下的async 2020-11-13 21:26:03 +08:00
buvta
3481a5346e 取消时等待数据库更新再刷新代理 2020-11-13 21:05:49 +08:00
buvta
c957fe33e2 取消时更新代理 2020-11-13 21:00:57 +08:00
buvta
51aa21e551 稍微调整 2020-11-13 20:55:11 +08:00
buvta
a887968458 设置增加代理,功能实现 2020-11-13 20:36:33 +08:00
Hunlongyu
380d31c0d3 🌿 新增代理设置界面 ( 功能未完成 ) 2020-11-13 16:28:11 +08:00
Hunlongyu
46b5f82348 Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player into master 2020-11-13 13:52:45 +08:00
Hunlongyu
675622e9ee npm yarn 2020-11-13 13:52:36 +08:00
haiyangcui
9a67821984 移除无用log 2020-11-12 23:35:21 +01:00
haiyangcui
e457574755 开启airplay选项 2020-11-12 22:58:45 +01:00
haiyangcui
50f5154628 Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player 2020-11-12 17:35:43 +01:00
haiyangcui
9da7ffc451 Revert "移除"搜索所有资源"开关,搜索变总是搜索所有资源", 解决推荐排序不工作的问题 2020-11-12 17:35:31 +01:00
buvta
35adae51cc 调整"正在直播"样式 2020-11-12 23:52:47 +08:00
haiyangcui
fe75edd738 v2.6.4 2020-11-12 10:51:29 +01:00
haiyangcui
362dccb167 固定"备注"宽度,"最近更新"列宽度自适应 2020-11-12 10:45:54 +01:00
buvta
08e95611ea 修复频道当前源被包含的bug 2020-11-12 12:09:58 +08:00
buvta
739b3fe30f 调整iptvList加载时机,清除残余代码 2020-11-12 11:37:50 +08:00
buvta
3ba2dc9993 表格列样式调整 2020-11-12 11:26:18 +08:00
buvta
6543d8baf0 推荐页相应调整 2020-11-12 08:34:40 +08:00
buvta
a1c9c657e3 film搜索框样式优化终结版,弹框样式统一为popper 2020-11-12 08:27:19 +08:00
haiyangcui
9306adb60e '全部'改名为'全站' 2020-11-11 21:42:40 +01:00
haiyangcui
682c706618 Revert "film页面el-table引入电影追剧模式" 2020-11-11 21:40:51 +01:00
haiyangcui
02c04c3d46 再次改进搜索框的样式 2020-11-11 17:09:17 +01:00
haiyangcui
17c78522bb 播放页面出现的列表页面,都实现v-on-clickaway 2020-11-11 16:30:22 +01:00
hunlongyu
7af6c73084 ⏱ 修改下拉菜单三角箭头的样式 2020-11-11 22:46:26 +08:00
hunlongyu
d31e0daca9 Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player 2020-11-11 21:41:46 +08:00
hunlongyu
9a7534ba57 ⏲ 移除 child_process 依赖, 使用 node 自带模块 2020-11-11 21:41:39 +08:00
buvta
a73e679b72 Revert "改进搜索框的样式"
This reverts commit b72886fbe6.
2020-11-11 21:36:31 +08:00
buvta
4f6c248345 Revert "引入需要的bootstrap-vue依赖"
This reverts commit 59a89e280b.
2020-11-11 21:36:28 +08:00
hunlongyu
68a0226759 🕰 修改 Film 表格模式样式 2020-11-11 21:26:55 +08:00
haiyangcui
e72af95c75 更新源列表,把检测后不可用的放到最下部 2020-11-11 12:54:04 +01:00
buvta
559e85785f film页面el-table引入电影追剧模式 2020-11-11 13:04:55 +08:00
Hunlongyu
2bf69fb0b9 修复 Play 组件无法弹出侧边栏的BUG 2020-11-11 11:10:48 +08:00
buvta
c082986e09 精简模式引入mode 2020-11-11 08:29:56 +08:00
buvta
05d71a62aa 搜索结果过滤器重置时只给选定列添加 2020-11-11 08:29:12 +08:00
buvta
bb537d789d 解决菜单更新bug 2020-11-11 07:11:30 +08:00
buvta
11baacc778 直播支持精简模式 2020-11-11 07:11:30 +08:00
buvta
9dbc0e00dc 支持频道换源 2020-11-11 07:11:30 +08:00
buvta
23e5c569b1 调整Play直播时播放器下方菜单,支持使用第三方播放器 2020-11-11 07:11:30 +08:00
haiyangcui
59a89e280b 引入需要的bootstrap-vue依赖 2020-11-10 20:39:33 +01:00
haiyangcui
b72886fbe6 改进搜索框的样式 2020-11-10 20:16:06 +01:00
haiyangcui
75bac6582c 简化el-select样式定义 2020-11-10 15:20:48 +01:00
Hunlongyu
7cc7e4e0e6 移除赞助, 移除多余排序文字 2020-11-10 17:15:30 +08:00
buvta
b1707f88d6 Merge pull request #345 from Hunlongyu/buvta
分组搜索
2020-11-10 16:56:39 +08:00
buvta
9ca946eb66 搜索默认设置调整为全部 2020-11-10 15:48:14 +08:00
buvta
76ed091c78 取消IPTV检测时的播放限制 2020-11-10 14:34:14 +08:00
buvta
5965c55773 搜索结果过滤器遵守限制 2020-11-10 14:33:04 +08:00
buvta
6631b8f568 避免后台还在运行的搜索被添加到新搜索中 2020-11-10 13:30:18 +08:00
buvta
b7bb5f85a3 搜索结果不能同时用多个过滤器 2020-11-10 13:03:48 +08:00
buvta
c8795e2aa9 优化分组搜索 2020-11-10 12:21:32 +08:00
buvta
2d7f012180 加搜索按钮 2020-11-10 12:21:32 +08:00
buvta
95ae729df8 Play页面换源由“所有”替换为同组资源站 2020-11-10 12:21:32 +08:00
buvta
40218521ac Film重构搜索以支持分组搜索 2020-11-10 12:21:28 +08:00
buvta
f4396cb69f 调整搜索配置 2020-11-10 12:15:30 +08:00
buvta
2dfbc8a8a2 调整搜索框样式 2020-11-10 12:12:58 +08:00
buvta
f94e8f0bec 改写Film.vue搜索框,预备支持分组搜索 2020-11-10 12:12:55 +08:00
haiyangcui
a9011abdf0 加入Waterfall元素的null check 2020-11-09 18:31:19 +01:00
haiyangcui
843a8dd1fc 移除"搜索所有资源"开关,搜索变总是搜索所有资源 2020-11-09 18:26:07 +01:00
haiyangcui
9b5aae095e Revert "搜索结果加过滤器", 搜索后默认按源站排序 2020-11-09 14:59:49 +01:00
buvta
24e890d1ab 统一操作列风格 2020-11-09 08:19:40 +08:00
buvta
959f515f55 iptv初始化数据加isActive 2020-11-09 08:06:16 +08:00
haiyangcui
f97d63cf68 更新animationEffect为fadein 2020-11-08 22:27:57 +01:00
buvta
c2f3a60198 搜索结果加过滤器 2020-11-09 00:17:08 +08:00
haiyangcui
9128f407ce 获取豆瓣评分时,移除空格 2020-11-08 12:31:00 +01:00
haiyangcui
c5c6e5e34f 修复推荐数据 2020-11-08 12:29:15 +01:00
haiyangcui
b12cdf25d5 改进排序 2020-11-08 12:28:12 +01:00
haiyangcui
7c08627e6f 支持搜索结果排序 2020-11-08 12:18:42 +01:00
haiyangcui
68c3687da3 getSites时无需再设置isActive 2020-11-08 11:35:58 +01:00
haiyangcui
00d6f2d218 更新默认源站数据 2020-11-08 11:33:23 +01:00
buvta
a918713bf7 Merge pull request #343 from Hunlongyu/buvta
增加代理及直播源检测功能
2020-11-08 18:03:52 +08:00
buvta
ae7aaec623 统一editSites状态开关数据类型为Boolean 2020-11-08 18:02:08 +08:00
buvta
81476e0f20 Merge remote-tracking branch 'co/master' 2020-11-08 17:56:48 +08:00
haiyangcui
4136b0f3ce 代理功能,作者:buvta 2020-11-08 00:13:08 +01:00
haiyangcui
c3a4cf5cc5 IPTV检测功能,作者:buvta 2020-11-07 23:55:44 +01:00
haiyangcui
d2263f3f76 添加推荐 2020-11-07 23:18:04 +01:00
haiyangcui
71df73fbd3 推荐页面排序功能 2020-11-07 23:16:00 +01:00
haiyangcui
ba6f3df9b1 升级依赖 2020-11-07 19:56:38 +01:00
haiyangcui
35c205fd86 刷新历史页面瀑布流,改进自适应 2020-11-07 19:29:40 +01:00
haiyangcui
30796af5f8 收藏页面,海报添加观看进度信息 2020-11-07 19:25:49 +01:00
haiyangcui
fde5dbb89d 改进历史视图 2020-11-07 19:14:06 +01:00
buvta
df3b43d8ac 进一步完善shift多选 2020-11-08 01:07:09 +08:00
buvta
8f94a5604d 批处理多选时支持shift快捷键 2020-11-08 00:35:05 +08:00
buvta
c6a39591d5 批量检测时增加进度提示 2020-11-08 00:28:07 +08:00
buvta
051d6b7701 修复导入直播源时的错误 2020-11-08 00:28:02 +08:00
buvta
51ba1d87ad 批量检测时继续限制删除功能 2020-11-08 00:26:45 +08:00
buvta
9af55df310 支持导入同名频道 2020-11-07 21:39:10 +08:00
buvta
d82251fb02 批量删除时重置ID及过滤器 2020-11-07 21:39:10 +08:00
buvta
4d192a4c3a 调整源状态开关列 2020-11-07 21:39:10 +08:00
buvta
1f25219cdc 批量检测时未检查过的优先 2020-11-07 21:39:10 +08:00
buvta
25d65866ae 改动syncTableData以便删除可用 2020-11-07 21:39:10 +08:00
buvta
11559ca164 资源站及直播源编辑页面"清空"替换为批量删除 2020-11-07 21:39:10 +08:00
buvta
6c82178604 完善直播源批量检测时的功能限制 2020-11-07 21:39:10 +08:00
buvta
029d1d9b49 完善源批量检测的功能限制 2020-11-07 21:39:10 +08:00
buvta
c10f7b98d9 去除多余的editSites属性 2020-11-07 21:39:10 +08:00
buvta
48d4b369a8 修正直播源检测出错时返回结果 2020-11-07 21:39:10 +08:00
buvta
42d2b5c20f 添加直播源检测功能 2020-11-07 21:39:09 +08:00
buvta
ccbafaae39 增加代理功能,默认使用系统代理设置 2020-11-07 21:39:09 +08:00
haiyangcui
fb3b908fe8 继续播放时,隐藏进度条,无需检查是否全屏 2020-11-07 21:39:09 +08:00
haiyangcui
4c4cc6d81b 当全屏暂停再继续播放时,隐藏进度条 2020-11-07 21:39:09 +08:00
haiyangcui
9ccfefaafb 历史页面,改进进度展示 2020-11-07 21:39:09 +08:00
haiyangcui
15a38f1b9c 支持历史视图模式 2020-11-07 21:39:09 +08:00
haiyangcui
967657e0ac 修正拼写 2020-11-07 21:39:09 +08:00
Hunlongyu
cd08e9e14b 🥀 新增任务栏显示播放进度 2020-11-07 21:39:09 +08:00
Hunlongyu
7e5bd534ef 🌿 修改样式 2020-11-07 21:39:09 +08:00
Hunlongyu
dce2e36ef0 🍀 修复瀑布流不自动自适应 2020-11-07 21:39:09 +08:00
haiyangcui
8a72b30f79 切换源的时候无需隐藏再显示类型列表 2020-11-07 21:39:09 +08:00
haiyangcui
bbe0d157f4 改进代码 2020-11-07 21:39:09 +08:00
haiyangcui
f44f8ea6cf 统一样式,el-select选择或划过的背景色也用背景色之一 2020-11-07 21:39:09 +08:00
haiyangcui
cd6f9f1f53 删除zy-checkbox的css样式定义 2020-11-07 21:39:09 +08:00
haiyangcui
74d084cb7b zy-table已经被el-table取代,删除无用的样式 2020-11-07 21:39:09 +08:00
haiyangcui
e60962a0f5 删除无用的console输出 2020-11-07 21:39:09 +08:00
haiyangcui
459a54382f el-select实现源站列表和分类列表 2020-11-07 21:39:09 +08:00
haiyangcui
e08a90d87a 修正Recommendation的拼写 2020-11-07 21:39:09 +08:00
haiyangcui
c676159cc7 继续播放时,隐藏进度条,无需检查是否全屏 2020-11-07 12:39:12 +01:00
haiyangcui
0fc8e54d26 当全屏暂停再继续播放时,隐藏进度条 2020-11-07 12:35:35 +01:00
haiyangcui
fe858a0cd9 历史页面,改进进度展示 2020-11-07 12:29:34 +01:00
haiyangcui
2238ddd109 支持历史视图模式 2020-11-07 11:29:03 +01:00
Hunlongyu
cc1c100075 Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player into master 2020-11-06 17:38:48 +08:00
Hunlongyu
81ba6de6cb 🥀 新增任务栏显示播放进度 2020-11-06 17:38:42 +08:00
haiyangcui
28baca56c4 修正拼写 2020-11-06 10:29:50 +01:00
Hunlongyu
3493831729 🌿 修改样式 2020-11-06 10:09:25 +08:00
Hunlongyu
42fce7d137 🍀 修复瀑布流不自动自适应 2020-11-06 10:02:01 +08:00
haiyangcui
c7a4b389e1 切换源的时候无需隐藏再显示类型列表 2020-11-05 23:47:57 +01:00
haiyangcui
5f47789a1a 改进代码 2020-11-05 22:57:29 +01:00
haiyangcui
7591c30b59 统一样式,el-select选择或划过的背景色也用背景色之一 2020-11-05 22:40:53 +01:00
haiyangcui
dd43c18491 删除zy-checkbox的css样式定义 2020-11-05 22:23:07 +01:00
haiyangcui
6949eb16d6 zy-table已经被el-table取代,删除无用的样式 2020-11-05 22:20:53 +01:00
haiyangcui
4a369a755e 删除无用的console输出 2020-11-05 22:15:05 +01:00
haiyangcui
e1b1742424 el-select实现源站列表和分类列表 2020-11-05 22:14:42 +01:00
haiyangcui
de31c4c0bb 修正Recommendation的拼写 2020-11-05 21:28:21 +01:00
cuiocean
c85910edd0 Merge pull request #342 from buvta/forPR
部分功能优化
2020-11-05 21:06:51 +01:00
buvta
b8d78bab10 改动film源站列表加载方式 2020-11-06 00:45:46 +08:00
buvta
9eed5ce0b7 源检测并发执行 2020-11-05 22:08:49 +08:00
buvta
4b11cab4bf axios增加配置 2020-11-05 22:07:38 +08:00
buvta
6ffbc2a63c 优化Film加载提示 2020-11-05 21:19:14 +08:00
haiyangcui
c6f4917cdc 改进瀑布流的样式及鼠标划过的效果 2020-11-05 12:44:30 +01:00
haiyangcui
fe37b32a0f 鼠标移动到卡片上时,添加上移动画效果 2020-11-05 12:38:38 +01:00
Hunlongyu
7fb295d34c 升级依赖 2020-11-05 18:03:31 +08:00
haiyangcui
e8c5c0ec72 改进瀑布流设置,更好的适应宽度 2020-11-04 14:52:47 +01:00
haiyangcui
64dc9c98d2 v2.6.3 2020-11-04 12:13:05 +01:00
haiyangcui
ca36841f5d 打开换源页面时,记录当前时间,换源时使用该时间。否则,如果换源失败,this.xg.currentTime 会被重置为0 2020-11-04 12:11:49 +01:00
haiyangcui
59d33d201c 如果时间进度已经设定,无需读取历史数据 2020-11-04 09:43:20 +01:00
haiyangcui
bf3b6d4088 再次解决换源时间进度问题 2020-11-04 09:06:48 +01:00
haiyangcui
bf2567bfde 修复推荐里豆瓣评分2 2020-11-03 22:56:55 +01:00
haiyangcui
3499fb5937 修复推荐里错误的评分 2020-11-03 22:49:13 +01:00
haiyangcui
dec12c77d0 添加两个新源,牛牛和百度云 2020-11-03 22:11:58 +01:00
haiyangcui
17be5d45f1 v2.6.2 2020-11-03 17:16:51 +01:00
haiyangcui
f493fcd24e 屏蔽福利片checkbox可以直接关联setting.excludeR18Films 2020-11-03 17:06:05 +01:00
haiyangcui
d040bc01fc 更新收藏导出时的提示 2020-11-03 16:45:38 +01:00
haiyangcui
6644c97811 导入收藏时,deep copy当前的list,否则列表会在没有排序好之前就被展示 2020-11-03 16:39:00 +01:00
haiyangcui
68960ab5bb 改进star的导入导出时的排序问题 2020-11-03 16:34:12 +01:00
haiyangcui
46de044214 统一海报视图 2020-11-03 15:46:48 +01:00
haiyangcui
0cbf9ca7fb 改进推荐页面排序问题 2020-11-03 15:41:15 +01:00
haiyangcui
6fa40af9bd 更新推荐 2020-11-03 15:23:38 +01:00
haiyangcui
7343f1824a 集中豆瓣评分和豆瓣链接获取功能到tools中 2020-11-03 14:57:07 +01:00
haiyangcui
3df0665950 改进过滤关键词 2020-11-03 14:13:26 +01:00
haiyangcui
022b1b28ad 改进Film页面刷新的逻辑,避免不必要的刷新 2020-11-03 13:56:41 +01:00
haiyangcui
55d1740354 移动"屏蔽福利片"到源编辑页面 2020-11-03 12:58:34 +01:00
haiyangcui
9d71991103 如果开启屏蔽福利片选项,也过滤搜索结果 2020-11-02 22:08:38 +01:00
haiyangcui
361e24ecad 引入vue-clickaway 2020-11-02 21:28:29 +01:00
haiyangcui
53f80d2cce 点击换源后,不需要关闭换源窗口.用户可以等待新源确定工作后自行关闭 2020-11-02 21:09:53 +01:00
haiyangcui
880dd9ff35 重新解决换源时间进度问题,发现记录this.video.info.time的话,视频会卡一下 2020-11-02 18:03:47 +01:00
haiyangcui
42c89120da 如果没有任何收藏有更新时,发消息提醒用户'未查询到任何更新' 2020-11-02 17:54:43 +01:00
haiyangcui
d990aa92b0 记录当前播放时间this.video.info.time, 解决换源时时间进度定位问题 2020-11-02 16:23:05 +01:00
haiyangcui
e117564ecb 在style.css里统一定义el-select的样式 2020-11-02 12:11:45 +01:00
haiyangcui
99592e3fcb 改进el-select样式,设置不同主题下的背景色等 2020-11-02 11:21:33 +01:00
Hunlongyu
adc8fd4329 🍁 修复因为分类异常, 导致资源加载不出来. 2020-11-02 13:44:10 +08:00
haiyangcui
579caddaeb 更新推荐 2020-11-01 23:29:49 +01:00
haiyangcui
1d5344f292 更新推荐 2020-11-01 23:19:32 +01:00
haiyangcui
22dc74ea3a 更新推荐 2020-11-01 23:15:39 +01:00
haiyangcui
72d7c91540 更新推荐 2020-11-01 22:38:46 +01:00
haiyangcui
ef874d1831 v2.6.1 2020-11-01 18:36:08 +01:00
haiyangcui
bb9a8ca65d 获取其他源时,排除当前源 2020-11-01 18:03:33 +01:00
haiyangcui
747abf3b26 设置密码对话框的宽度 2020-11-01 17:41:20 +01:00
haiyangcui
1078cf3c63 修复自动更新功能 2020-11-01 17:29:57 +01:00
haiyangcui
22b877b0fb 定义不同的waterfall的ref 2020-11-01 17:24:29 +01:00
haiyangcui
34e6b8bd08 更新推荐 2020-11-01 14:02:11 +01:00
haiyangcui
4d039e9a63 更新推荐后刷新分类过滤数据 2020-11-01 14:01:48 +01:00
haiyangcui
16f3954959 删除无用的style 2020-11-01 12:17:20 +01:00
haiyangcui
17845e6ab4 改进换源功能,在新源中打开当前剧集和时间进度 2020-11-01 12:07:54 +01:00
hunlongyu
292f932130 Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player 2020-11-01 15:29:24 +08:00
hunlongyu
127ef9ad43 ⛸ 设置界面样式微调 2020-11-01 15:26:31 +08:00
cuiocean
11f0ae27fd v2.6.0 2020-11-01 08:22:24 +01:00
hunlongyu
2599343943 样式优化, 修复film table 错误提示 2020-11-01 14:57:49 +08:00
haiyangcui
0fb5903416 v2.5.9 2020-10-31 22:56:40 +01:00
haiyangcui
ce89720c55 调换收藏页面'源站'列的位置 2020-10-31 22:51:37 +01:00
haiyangcui
8ff7fa588a 恢复el-table滚动条 2020-10-31 22:45:19 +01:00
haiyangcui
8d5bbedfd8 解决el-table刷新自动跳到顶端的问题 2020-10-31 22:40:52 +01:00
haiyangcui
713e0affae 更新推荐 2020-10-31 22:31:25 +01:00
haiyangcui
0f55f3b2ea 显示推荐视频总数 2020-10-31 22:12:58 +01:00
haiyangcui
c98e41201d 不显示导演信息,有时导演名字字符太多 2020-10-31 22:12:45 +01:00
haiyangcui
2cfd31806d 修复搜索后打开详情页错误的问题 2020-10-31 22:06:33 +01:00
haiyangcui
d54dab4e90 改进豆瓣评分样式 2020-10-31 22:04:25 +01:00
haiyangcui
2af85fbfd1 Film页面,列表视图用el-table实现,感谢buvta贡献 2020-10-31 21:44:05 +01:00
haiyangcui
15c542db82 Film页面搜索用el-table实现 2020-10-31 21:34:32 +01:00
haiyangcui
1a3ccaa3ba 统一editsite页面的格式 2020-10-31 21:23:55 +01:00
haiyangcui
3d01fd045f 统一优化listpage格式 2020-10-31 12:28:36 +01:00
haiyangcui
f6636a7864 重置软件也受密码保护 2020-10-30 23:06:24 +01:00
haiyangcui
dd108d3b09 避免不必要的刷新 2020-10-30 18:27:04 +01:00
haiyangcui
0b24ded61f 同步时,如果没有更新,不再提示 2020-10-30 18:17:13 +01:00
haiyangcui
d21494cf86 集中在style中定义pictureView的格式 2020-10-30 18:13:12 +01:00
haiyangcui
76add8f87a "编辑源"可以设置密码 2020-10-30 17:48:10 +01:00
haiyangcui
5a115700e3 收藏视图添加有更新提示,优化格式 2020-10-30 15:16:05 +01:00
haiyangcui
16e8ef2c4a 收藏页面播放,无需再查看历史记录,收藏数据已包含 2020-10-30 13:52:09 +01:00
haiyangcui
483449aad8 v2.5.8 2020-10-30 11:52:31 +01:00
haiyangcui
2b7a425f6f 影视推荐位置上移,更靠近Film页面 2020-10-30 11:50:17 +01:00
haiyangcui
a06c9e9d32 缩小地区和类型的按钮大小 2020-10-30 11:28:35 +01:00
haiyangcui
32a21952a2 推荐页面,视图添加地区信息 2020-10-30 11:25:47 +01:00
haiyangcui
ff01abe88c 改进推荐页面的过滤功能 2020-10-30 11:22:09 +01:00
haiyangcui
962f6b46c3 推荐页面,支持地区,类型的过滤 2020-10-30 10:58:31 +01:00
haiyangcui
b16604add6 更新推荐列表 2020-10-30 10:03:47 +01:00
haiyangcui
3028939ed9 改进豆瓣评分获取的算法 2020-10-30 09:43:04 +01:00
haiyangcui
1ffcb38b4b 优化'豆瓣评分'样式 2020-10-30 09:11:12 +01:00
Hunlongyu
2ec05b6ab5 🎳 移除request, 使用已有同样功能的axios重写.优化豆瓣评分样式 2020-10-30 10:05:45 +08:00
Hunlongyu
9cbd37d143 Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player into master 2020-10-30 09:30:59 +08:00
Hunlongyu
b9ab1b11f4 🎱 关闭有可能导致安全软件报警的代码 2020-10-30 09:30:53 +08:00
haiyangcui
428f49a2e8 更新推荐电影 2020-10-29 23:50:29 +01:00
haiyangcui
2e8941c6cc 记录推荐页的视图模式 2020-10-29 23:12:40 +01:00
haiyangcui
91e2fc56b7 添加recommandation数据库,支持更新推荐 2020-10-29 22:55:14 +01:00
haiyangcui
e2b124e4ac 添加“影视推荐”页面 2020-10-29 21:51:34 +01:00
haiyangcui
6b37e3ebd5 定义pictureView样式并复用 2020-10-29 21:36:12 +01:00
haiyangcui
5dcdb6a410 记录sartViewMode 2020-10-29 18:29:23 +01:00
haiyangcui
5d41f783bc 统一海报视图的格式 2020-10-29 15:47:12 +01:00
haiyangcui
28ad8f3313 详情页面收藏的话,如果收藏已存在,更新收藏信息 2020-10-29 12:49:30 +01:00
haiyangcui
c475fbdf46 收藏视图页面添加豆瓣评分信息 2020-10-29 12:46:06 +01:00
Hunlongyu
ee622f88da 🏉 收藏新增海报模式. 2020-10-29 18:12:54 +08:00
haiyangcui
1b2461c423 Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player 2020-10-29 10:10:37 +01:00
Hunlongyu
3044bfcbc4 🏈 mini 界面优化 2020-10-29 16:59:25 +08:00
haiyangcui
4038e5e6be Merge branch 'dev_improveStar' 2020-10-29 09:32:28 +01:00
haiyangcui
bea1ef4c73 收藏页面添加视图开关 2020-10-29 09:12:33 +01:00
Hunlongyu
7af9a6d76d 🏐 编辑源增加状态排序, 修复换源功能里源的标识问题. 优化搜索结果样式变形 2020-10-29 15:32:56 +08:00
Hunlongyu
2140d90a87 🏀 源编辑,加入单个源检测功能. 2020-10-29 14:45:46 +08:00
Hunlongyu
e86eef1b05 添加快捷键指南, 修复换源功能阻塞问题 2020-10-29 14:35:58 +08:00
haiyangcui
42dd8fe5e4 star添加豆瓣评分记录 2020-10-29 00:09:29 +01:00
haiyangcui
9fd8c60dd5 "获取豆瓣评分"功能到tools.js 2020-10-28 23:29:39 +01:00
haiyangcui
49c480061b 收藏数据里记录detail所有内容 2020-10-28 18:09:10 +01:00
hunlongyu
022b1f4090 紧急修复视频源检测bug, 以及增加手动更新提示。 2020-10-28 22:44:53 +08:00
hunlongyu
9c08a64524 💎 手动更新提示 2020-10-28 22:11:41 +08:00
hunlongyu
90ec848c11 v2.5.6 2020-10-28 21:45:48 +08:00
hunlongyu
82270a702f v2.5.5 2020-10-28 21:39:29 +08:00
Hunlongyu
61dcb1ec49 💍 优化视频源分组功能 2020-10-28 18:22:18 +08:00
Hunlongyu
40b853361e 💄 新增或编辑源的时候, 校验key值的唯一性 2020-10-28 18:00:59 +08:00
Hunlongyu
57ff3325f0 💋 优化图标显示逻辑 2020-10-28 17:38:02 +08:00
Hunlongyu
c4283e2da0 🎓 优化播放页图标, 优化视频停止播放后不显示历史记录提示. 修复报错 2020-10-28 17:30:46 +08:00
Hunlongyu
7052bd7e05 🎩 新增播放视频时换源功能. 2020-10-28 17:04:44 +08:00
Hunlongyu
64a12a06c4 👒 移除百度统计, 主要是记录缺失, 并且不准确 2020-10-28 15:38:02 +08:00
Hunlongyu
3df3b385ce ⛑ 新增分类过滤器, 主要针对豆瓣资源网分类出错问题 2020-10-28 15:34:33 +08:00
Hunlongyu
e77db4711e 🧢 优化视频源检测功能 2020-10-28 15:33:30 +08:00
Hunlongyu
fb3fd26870 Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player into master 2020-10-28 12:00:14 +08:00
Hunlongyu
72790f5f3e 👑 添加了视频源检测功能. 2020-10-28 11:59:55 +08:00
haiyangcui
ea2815969d 把IPTV的初始数据放入单独的Json文件中 2020-10-27 23:12:30 +01:00
Hunlongyu
e330cff7d4 🧦 electron 优化, 忽略证书错误, 关闭沙盒. 2020-10-27 11:43:11 +08:00
haiyangcui
da5b91535e 搜索后获取详细信息并展示 2020-10-26 23:53:12 +01:00
haiyangcui
00c8f0c1e2 v2.5.4 2020-10-26 17:26:49 +01:00
haiyangcui
924fd439d9 更新导入收藏,支持一次导入多个文件 2020-10-26 16:37:44 +01:00
haiyangcui
ed039894c8 导入时无需调用upgradeFavorites 2020-10-26 16:20:08 +01:00
haiyangcui
005bdf7ea6 监听并更新收藏及源列表 2020-10-26 16:19:48 +01:00
haiyangcui
19071faf70 更新福利片关键词 2020-10-26 15:13:18 +01:00
hunlongyu
176d9f6b5a Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player 2020-10-26 20:57:31 +08:00
hunlongyu
31a8dd0f32 🧤 升级 xgplayer 依赖 2020-10-26 20:57:25 +08:00
haiyangcui
336ea08c69 Film页面只获取active的源站 2020-10-26 13:47:47 +01:00
haiyangcui
8e4a0870a1 播放电视频道时,更新播放页面的左上角标题 2020-10-26 13:42:44 +01:00
hunlongyu
86130e6c53 🧣 修复第一次加载资源失败的bug 2020-10-26 20:24:35 +08:00
Hunlongyu
e984d0a349 🩳 修复修改数据库,导致无法播放的bug 2020-10-26 18:18:07 +08:00
Hunlongyu
506991f3b1 👖 优化 history 和 star 数据库的搜索.后台不再提示warning.需要重置数据库. 2020-10-26 18:06:01 +08:00
Hunlongyu
04c35ba7a9 👔 开发所有系统的更新功能 2020-10-26 16:46:41 +08:00
Hunlongyu
275b6757bf 👕 实现手动更新功能 2020-10-26 16:33:00 +08:00
Hunlongyu
612930cc8b 🥼 修复停止播放后,再次播放有2个声音的问题 2020-10-26 11:19:15 +08:00
haiyangcui
80e36fa99c 源站排序总是有问题, 先移除掉 2020-10-25 15:40:18 +01:00
haiyangcui
f069044f28 简单重构 2020-10-25 16:23:31 +01:00
haiyangcui
c77ac7ea7f 重构一下EditSites页面的代码 2020-10-25 15:33:39 +01:00
haiyangcui
803181b4f7 修复源页面编辑后Film页面不更新的bug 2020-10-25 13:49:58 +01:00
haiyangcui
ac2474903d 恢复滚动条 2020-10-24 23:38:02 +02:00
haiyangcui
04b7e139da 更新内置电视频道 2020-10-24 23:00:58 +02:00
haiyangcui
b49e1b82bf 支持自选源列排序 2020-10-24 23:00:40 +02:00
haiyangcui
dc00c690e7 重新排序后更新数据库 2020-10-24 22:58:15 +02:00
haiyangcui
44ba552435 改进IPTV页面逻辑 2020-10-24 16:20:49 +02:00
haiyangcui
8d84d1bf22 统一字体大小 2020-10-24 14:29:30 +02:00
haiyangcui
c78368dac9 新增源时,支持输入源标识 2020-10-24 14:24:18 +02:00
haiyangcui
11af5a7ecd 导入收藏时,更新收藏项的源站信息 2020-10-24 14:14:44 +02:00
haiyangcui
ecfeecf45f 为表头按钮添加图标 2020-10-24 14:06:25 +02:00
haiyangcui
455f5dae84 统一star数据格式的定义 2020-10-24 13:19:47 +02:00
Hunlongyu
ffbffde74f Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player into master 2020-10-24 13:52:29 +08:00
Hunlongyu
0be0433355 🥼 移除master 分支下的更新功能 2020-10-24 13:52:20 +08:00
haiyangcui
cc2dc19e39 Revert "统一star数据格式的定义"
This reverts commit aa4583898a.
2020-10-23 23:31:44 +02:00
haiyangcui
aa4583898a 统一star数据格式的定义 2020-10-23 23:31:01 +02:00
haiyangcui
2e96812a1f 最后一列的表头向右对齐 2020-10-23 23:23:25 +02:00
haiyangcui
6f52d73d52 鼠标划过的行添加少许放大效果 2020-10-23 22:45:04 +02:00
haiyangcui
a3ebba641f 源站编辑,支持编辑分组 2020-10-23 22:29:52 +02:00
haiyangcui
8ceffab2fe 搜索结果里添加“源站”列 2020-10-23 16:43:33 +02:00
haiyangcui
454d192141 更好支持中文排序 2020-10-23 15:53:21 +02:00
haiyangcui
a1423993c8 固定表头 2020-10-23 15:14:12 +02:00
haiyangcui
1c9a84dbc6 开关批处理,无需返回页面顶部 2020-10-23 13:37:41 +02:00
haiyangcui
304b0d10b4 Fix typo 2020-10-23 13:32:46 +02:00
cuiocean
aff97f6d46 Merge pull request #307 from buvta/patch-1
IPTV小调整
2020-10-23 12:27:23 +02:00
haiyangcui
650c882f58 移除自选源列的排序 2020-10-23 12:20:17 +02:00
Hunlongyu
32fa465cf2 🦺 关闭自动更新, 手动更新软件. (未完成) 2020-10-23 14:40:40 +08:00
Hunlongyu
1fdfada14f Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player into master 2020-10-23 11:21:52 +08:00
Hunlongyu
5ed8b6e49a 👓 补上忘记写的自动更新功能 😂 2020-10-23 11:20:36 +08:00
haiyangcui
c2e2f1c490 支持自选源列排序 2020-10-22 18:34:00 +02:00
haiyangcui
7ad40ba375 历史记录的导入导出 2020-10-22 18:22:41 +02:00
buvta
c708292051 IPTV变更分租状态开关时表格回到顶部 2020-10-23 00:02:18 +08:00
buvta
79932a74bc 固定IPTV和源编辑表头 2020-10-22 23:48:19 +08:00
buvta
3f79f31550 IPTV转移总频道数到表头
这PR也太好混了吧
2020-10-22 23:40:28 +08:00
haiyangcui
1d33db0143 IPTV支持从JSON文件导入 2020-10-22 17:07:05 +02:00
haiyangcui
1dc7b38160 批处理开启关闭源是否为自选源 2020-10-22 16:53:57 +02:00
haiyangcui
db7cdab787 批处理视频源的分组 2020-10-22 16:37:54 +02:00
haiyangcui
d1e6ac1ae6 支持源分组 2020-10-22 16:18:24 +02:00
haiyangcui
d63710afe6 统一字体大小 2020-10-22 14:07:14 +02:00
haiyangcui
8abe4b7ef8 IPTV批处理分组 2020-10-22 14:04:45 +02:00
haiyangcui
98b4f5bc1d 改进star页面的排序 2020-10-22 12:27:45 +02:00
haiyangcui
248c0994c9 统一页面字体大小,更新操作栏使其自适应宽度 2020-10-22 12:22:19 +02:00
Hunlongyu
2eba0523bc 🛒 优化分享图片 2020-10-22 14:23:38 +08:00
Hunlongyu
49589102d9 🧶 添加百度统计 2020-10-22 14:22:59 +08:00
Hunlongyu
79b02df628 🧵 优化初次加载请求多次的问题 2020-10-22 13:41:47 +08:00
Hunlongyu
0f456fe7a8 🧵 优化样式 2020-10-22 11:33:30 +08:00
Hunlongyu
850c8d5423 🎨 视频源异常状态处理, 自动重置源 2020-10-22 10:59:29 +08:00
haiyangcui
63cf367f52 自适应列宽 2020-10-21 18:42:50 +02:00
haiyangcui
bd43f06e7d 可以打开或关闭源是否为自选源 2020-10-21 17:34:11 +02:00
haiyangcui
2ed47e64c3 解决Film页面的warning 2020-10-21 17:11:54 +02:00
haiyangcui
8817d39d49 IPTV搜索移到表头位置 2020-10-21 16:25:15 +02:00
haiyangcui
b68525213a 引入需要的element-ui的组件 2020-10-21 16:07:37 +02:00
haiyangcui
0efbc38137 Merge branch 'release_2.5.3' 2020-10-21 13:51:16 +02:00
haiyangcui
cd2cb684a5 v2.5.3 2020-10-21 12:35:07 +02:00
Hunlongyu
500dbfa1ee 🖼 测试代码 2020-10-21 18:23:45 +08:00
Hunlongyu
e970074266 Merge branch 'master' of https://github.com/Hunlongyu/ZY-Player into master 2020-10-21 15:33:58 +08:00
Hunlongyu
9dc7ab4d1e 🎪 升级最新依赖 2020-10-21 09:13:53 +08:00
haiyangcui
ffe821d107 IPTV函数名更新 2020-10-20 21:57:52 +02:00
Hunlongyu
0f015b26e2 🎢 优化 IPTV 的搜索框样式 2020-10-20 09:27:13 +08:00
haiyangcui
f031f9e7fd 修复确定分组的逻辑 2020-10-19 23:40:50 +02:00
haiyangcui
b38de7f393 IPTV分组 2020-10-19 22:57:53 +02:00
haiyangcui
8b5e8fd072 IPTV添加group 2020-10-19 22:15:50 +02:00
haiyangcui
58e556554e IPTV搜索功能 2020-10-19 21:21:59 +02:00
haiyangcui
cceed30d35 IPTV拖曳功能 2020-10-19 13:46:59 +02:00
haiyangcui
980b0a6e50 el-table实现IPTV页面 2020-10-19 13:46:59 +02:00
Hunlongyu
c98236222d 🎡 修复 Film table 模式下, 不加载的 BUG 2020-10-19 18:37:48 +08:00
Hunlongyu
6a7c2afb2d 🎠 代码优化 2020-10-19 18:31:46 +08:00
Hunlongyu
af482a450a 🎟 新增右键菜单 2020-10-19 18:14:42 +08:00
Hunlongyu
42b81b98cf 🎞 修复 Film 视图报错 BUG 2020-10-19 17:42:00 +08:00
Hunlongyu
da7dfed5ba 🎁 修复视频停止播放后, 下次点击按钮失效的问题 2020-10-19 17:28:17 +08:00
Hunlongyu
7d6c5482af 🎀 新增窗口最小化, 暂停视频. 从最小化恢复窗口, 视频播放 2020-10-19 16:57:32 +08:00
Hunlongyu
11e7ffc554 🎑 新增视频停止播放按钮 2020-10-19 16:31:02 +08:00
Hunlongyu
4974d57fbf 🎑 mini 模式修复 2020-10-19 13:41:50 +08:00
Hunlongyu
037bb1a2ff 🎐 升级electron依赖到最新版 2020-10-19 13:40:12 +08:00
Hunlongyu
b19870d228 🎏 优化 table 滚动条 2020-10-19 11:52:28 +08:00
Hunlongyu
de0161c560 🎎 升级依赖, 修复element 2020-10-19 11:28:52 +08:00
Hunlongyu
623a10bd13 🎎 按需引入 element button 2020-10-19 11:09:14 +08:00
Hunlongyu
c69eadbe3e 🎍 新增清理视频缓存功能 2020-10-19 11:00:11 +08:00
Hunlongyu
5f48f46cbc 🎋 table style 2020-10-19 09:35:50 +08:00
haiyangcui
694986d6c5 用el-button实现header部分的按钮 2020-10-18 22:54:21 +02:00
haiyangcui
d4ad68e030 监听EditSites页面sites数据变化 2020-10-18 21:57:39 +02:00
haiyangcui
72089bf53f Code cleanup 2020-10-18 18:05:48 +02:00
haiyangcui
0401ce6d7e Revert "记录窗口大小及位置"
This reverts commit 381b0a8735.
2020-10-18 10:11:26 +02:00
haiyangcui
09e27d4f40 添加overflow-y: auto;到el-table格式定义中 2020-10-18 09:38:06 +02:00
haiyangcui
45de6650bf 统一EditSites页面格式 2020-10-17 23:59:58 +02:00
haiyangcui
4e0fa4d980 支持sites页面拖曳排序 2020-10-17 23:35:01 +02:00
haiyangcui
7a0f8f9644 支持star页面的拖曳排序 2020-10-17 21:19:05 +02:00
haiyangcui
e43ef98ce7 支持历史页面的拖曳排序 2020-10-17 21:11:50 +02:00
haiyangcui
2abbf41ed1 header上的按钮,鼠标划过更改指针模式 2020-10-17 18:37:49 +02:00
haiyangcui
02139d3d24 header部分加入padding 2020-10-17 18:34:27 +02:00
haiyangcui
d86a10d753 el-table实现EditSites页面 2020-10-17 18:09:17 +02:00
haiyangcui
dc8bdb29dc 解决有更新行高亮的问题 2020-10-17 14:12:24 +02:00
haiyangcui
98b019be5f 更新listpage样式 2020-10-17 13:55:04 +02:00
haiyangcui
e6d1698d62 删除star页面无用格式定义 2020-10-17 13:43:37 +02:00
haiyangcui
6c1e6c511f 删除无用的样式 2020-10-17 12:13:52 +02:00
haiyangcui
1a1393615c 套用listpage样式 2020-10-17 12:08:30 +02:00
cuiocean
5930690144 Merge pull request #292 from buvta/patch-3
el重写Star.vue,用排序替代拖拽
2020-10-17 12:07:09 +02:00
haiyangcui
091493fa77 定义listpage样式 2020-10-17 11:23:53 +02:00
buvta
cd1c4eaffe el重写Star.vue,用排序替代拖拽 2020-10-17 13:03:34 +08:00
cuiocean
1bb217d84f Merge pull request #289 from buvta/patch-4
去掉表格底部横线
2020-10-16 18:02:26 +02:00
buvta
92eac6d2dd 去掉表格底部横线 2020-10-16 23:49:12 +08:00
haiyangcui
b067cfa143 解决History页面自适应问题 2020-10-16 16:16:21 +02:00
haiyangcui
99d21fd7fe 设置不显示table的border,无需响应header-click打开关闭border 2020-10-16 14:46:24 +02:00
Hunlongyu
b167f711d0 🎄 修改历史界面样式 2020-10-16 18:03:20 +08:00
Hunlongyu
7d4ffeed87 🎃 移除 element 全局导入, 修改 star 样式 2020-10-16 18:00:13 +08:00
haiyangcui
7e94ef8025 更新el-table背景色 2020-10-15 22:30:54 +02:00
haiyangcui
1a36bc85b9 更新el-table背景色 2020-10-15 22:21:54 +02:00
haiyangcui
f7ed0e1c29 更新el-button的样式 2020-10-15 21:25:14 +02:00
cuiocean
970a359aba Merge pull request #280 from buvta/forPR1
改写History.vue
2020-10-15 21:15:31 +02:00
haiyangcui
be0441d042 设置不同主题下el-table的css样式 2020-10-15 21:12:42 +02:00
buvta
3fc350e6d6 el改写History.vue 2020-10-16 01:07:08 +08:00
buvta
b26a4d4f27 全局引入elementUI 2020-10-16 01:00:28 +08:00
haiyangcui
454ea48891 格式化Detail.vue 2020-10-14 23:02:02 +02:00
haiyangcui
d564d0928b 播放直播源时VideoTitle显示直播频道的名字 2020-10-13 22:08:40 +02:00
haiyangcui
2562119bad 支持导入源时multiSelections 2020-10-13 21:47:22 +02:00
haiyangcui
1a7aaa8dff 导入源时不删除原有源,但会检查源是否有重复,不添加重复的源 2020-10-13 21:44:24 +02:00
haiyangcui
583a768068 改进函数名 2020-10-12 18:26:27 +02:00
haiyangcui
6216ad96d6 源编辑页面添加清空功能 2020-10-12 18:25:24 +02:00
haiyangcui
766b1d458f IPTV添加置顶功能 2020-10-11 14:46:52 +02:00
haiyangcui
6a0699ec20 添加源置顶功能 2020-10-11 14:46:13 +02:00
haiyangcui
a6fd748e09 统一按钮名称和对话框名称 2020-10-11 13:47:18 +02:00
cuiocean
064ff38650 Merge pull request #271 from buvta/master
使用对话框新增或修改源
2020-10-11 13:39:25 +02:00
buvta
1c74174a3a 使用对话框新增或编辑源
bug已解决
2020-10-11 14:11:30 +08:00
haiyangcui
0625c4945f 支持'极品''喜欢看' 2020-10-11 00:05:49 +02:00
Hunlongyu
e1d0643c68 🍔 电视直播位置移动考上 2020-10-10 17:01:41 +08:00
Hunlongyu
bce10b906c 🍛 移除二维码 2020-10-10 16:54:18 +08:00
haiyangcui
d485a5733e 支持'喜欢看' 2020-10-10 10:15:09 +02:00
haiyangcui
5ab5cee6dc 支持'极品' 2020-10-09 21:06:11 +02:00
haiyangcui
235e894f66 修复IPTV页面高度问题 2020-10-09 17:34:04 +02:00
haiyangcui
ee62ae0c8f Revert "格式化vue文件"
This reverts commit 8b78aafda4.

# Conflicts:
#	src/components/IPTV.vue
2020-10-09 17:29:53 +02:00
haiyangcui
f8b95fe430 v2.5.2-1 2020-10-09 17:23:36 +02:00
haiyangcui
a3fc5dba79 v2.5.2.1 2020-10-09 16:56:09 +02:00
haiyangcui
e1cee12222 加入占位按钮,以免不小心点到重置 2020-10-09 16:43:53 +02:00
haiyangcui
6d2b1720b7 恢复m3u8限制 2020-10-09 16:27:14 +02:00
haiyangcui
1c7024a68a 删除多余空白按钮 2020-10-09 16:21:39 +02:00
haiyangcui
8729184ba9 修复列表主题的问题 2020-10-09 16:16:58 +02:00
haiyangcui
618fdf03d9 移除m3u8的限制 2020-10-09 16:10:20 +02:00
haiyangcui
ac573b0de4 v2.5.2 2020-10-09 14:30:54 +02:00
haiyangcui
6b225d5076 添加605资源 2020-10-09 13:35:15 +02:00
haiyangcui
cb2ce525ae 修复设置更新问题 2020-10-09 13:04:23 +02:00
haiyangcui
8b78aafda4 格式化vue文件 2020-10-08 23:35:22 +02:00
haiyangcui
3a02a5d1cf 统一收藏页面和IPTV页面的样式 2020-10-08 23:19:08 +02:00
haiyangcui
4212cc681a 更新setting数据 2020-10-08 23:01:33 +02:00
haiyangcui
015595eb0a 支持IPTV搜索 2020-10-08 21:00:43 +02:00
haiyangcui
4ea00a9d8f 更新内置频道 2020-10-08 13:24:27 +02:00
haiyangcui
6e19a08186 更多IPTV资源 2020-10-08 12:58:09 +02:00
haiyangcui
940dbe3d17 内置更多频道 2020-10-08 12:57:24 +02:00
haiyangcui
222e89c24d 支持导入m3u8文件 2020-10-08 12:57:06 +02:00
haiyangcui
24af7c3084 支持导出为json文件 2020-10-07 23:13:05 +02:00
haiyangcui
34d981c6a6 支持一次导入多个m3u文件 2020-10-07 23:04:08 +02:00
haiyangcui
2e5f5a8d6d 支持快捷键播放上一频道下一频道 2020-10-07 22:36:54 +02:00
haiyangcui
1565d39ba7 支持点击列表里的频道播放 2020-10-07 22:16:11 +02:00
haiyangcui
24b84e4b12 播放电视直播时,列表为频道列表 2020-10-07 22:10:11 +02:00
haiyangcui
c138f1beb5 Merge branch 'master' into dev 2020-10-07 20:51:16 +02:00
haiyangcui
4589856721 屏蔽主分类设置 2020-10-07 18:20:57 +02:00
haiyangcui
f2fbf96a04 错开重置和搜索 2020-10-07 18:09:04 +02:00
cuiocean
8a0bb9a3f1 Merge pull request #254 from Hunlongyu/dependabot/npm_and_yarn/electron-9.3.1
Bump electron from 9.1.0 to 9.3.1
2020-10-07 16:27:47 +02:00
haiyangcui
8cf2a92673 显示总频道数目 2020-10-07 13:17:22 +02:00
haiyangcui
40c32a9085 导入列表时,合并到当前列表,并删除重复的url项 2020-10-07 13:08:12 +02:00
haiyangcui
7ef5283562 Merge branch 'dev' of https://github.com/Hunlongyu/ZY-Player into dev 2020-10-06 23:34:58 +02:00
haiyangcui
454287ede5 删除添加新频道功能 2020-10-06 23:34:41 +02:00
haiyangcui
77792f0ca4 IPTV支持导出为m3u文件 2020-10-06 21:14:35 +02:00
dependabot[bot]
d793605367 Bump electron from 9.1.0 to 9.3.1
Bumps [electron](https://github.com/electron/electron) from 9.1.0 to 9.3.1.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/master/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v9.1.0...v9.3.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-06 18:46:36 +00:00
haiyangcui
0a13bac9e6 不再占用固定端口 2020-10-06 16:59:03 +02:00
haiyangcui
5b54279e9a 修复源导出问题 2020-10-05 16:22:12 +02:00
haiyangcui
e1e115643e 修复某些设置无法保存的问题 2020-10-05 15:12:53 +02:00
haiyangcui
826375c233 更新页面title 2020-10-05 12:32:47 +02:00
haiyangcui
ae33d47186 转移源相关操作到源编辑页面 2020-10-05 12:05:39 +02:00
haiyangcui
a7d07ed964 IPTV添加搜索功能 2020-10-04 23:11:06 +02:00
haiyangcui
95db790529 添加'电视频道_2_高清.m3u' 2020-10-04 22:54:01 +02:00
haiyangcui
2d406c0c24 v2.5.1 2020-10-04 16:59:17 +02:00
haiyangcui
7b39be271f 添加额外在线直播源文件 2020-10-04 16:55:50 +02:00
haiyangcui
d8367414a2 修复无法正确导入直播源的问题 2020-10-04 16:53:11 +02:00
haiyangcui
d647d2ecec v2.5.0 2020-10-04 12:49:21 +02:00
haiyangcui
7f9f847d73 内置腾讯云直播源 2020-10-04 12:29:10 +02:00
haiyangcui
36e0b140cd 解决中文乱码问题 2020-10-04 12:20:24 +02:00
haiyangcui
99948770ff 读取m3u文件 2020-10-04 11:08:21 +02:00
haiyangcui
5300d777ce 移除无用链接 2020-10-04 10:30:49 +02:00
haiyangcui
64da42524d 添加赞赏码 2020-10-04 10:30:29 +02:00
haiyangcui
1ebdfee7bc 支持播放器内播放直播 2020-10-03 23:17:19 +02:00
haiyangcui
17ba319157 添加"导入" "导出" "重置" 2020-10-01 23:33:24 +02:00
haiyangcui
27bdc3559d 添加新频道页面 2020-10-01 23:33:21 +02:00
haiyangcui
ca53a22598 添加删除功能 2020-10-01 23:33:18 +02:00
haiyangcui
6632318cf6 添加简单的IPTV页面 2020-10-01 23:33:15 +02:00
haiyangcui
cb7a4af7ae 2.4.10.1 国庆版 2020-10-01 13:34:21 +02:00
haiyangcui
25340b79aa v2.4.9 2020-09-30 21:33:08 +02:00
haiyangcui
381b0a8735 记录窗口大小及位置 2020-09-30 21:11:54 +02:00
haiyangcui
c7b99244bb 更新style 2020-09-29 23:08:23 +02:00
haiyangcui
5b5826e9a6 改进checkbox的点击效果 2020-09-29 17:43:14 +02:00
haiyangcui
03e2f2673b 更新style 2020-09-29 17:37:47 +02:00
haiyangcui
503a90d8da 转移收藏相关操作到收藏页面 2020-09-29 15:23:09 +02:00
haiyangcui
afb92d59ff 可设置快进快退的步长 2020-09-28 23:30:24 +02:00
haiyangcui
d26f1cbdf7 简影 2020-09-28 21:11:48 +02:00
haiyangcui
7f821b05ad 哆咪动漫 2020-09-28 20:53:48 +02:00
haiyangcui
746c93c9d2 樱花动漫 2020-09-28 20:53:15 +02:00
haiyangcui
9fb51ed8fc 点击'播放在线高清视频'也可以控制check box的开关 2020-09-28 17:51:56 +02:00
haiyangcui
6a1c045e0b 解析网站的代码放到onlineVideo里 2020-09-28 16:38:31 +02:00
haiyangcui
756b8ecc33 添加"素白白"的支持 2020-09-27 17:59:13 +02:00
haiyangcui
b4946a6c99 比较在线搜索结果时,忽略空格 2020-09-27 15:11:56 +02:00
haiyangcui
cbde4180ab 2.4.8 2020-09-27 15:02:24 +02:00
haiyangcui
00dab782e8 搜索的时候设置timeout,解决全局搜索结果无法打开的问题 2020-09-27 14:55:56 +02:00
haiyangcui
89d6183841 支持播放在线高清视频 2020-09-27 13:44:38 +02:00
haiyangcui
efd2095261 v2.4.7 2020-09-18 19:09:51 +02:00
haiyangcui
cbedb859c3 电影列表页面屏蔽福利片 2020-09-17 16:08:12 +02:00
haiyangcui
65aedc84cf 有最新版本时,在设置页面有提示 2020-09-16 22:17:04 +02:00
haiyangcui
95c58095ee 屏蔽福利片选项 2020-09-16 20:00:22 +02:00
haiyangcui
b5da3c7f81 屏蔽主分类 2020-09-13 15:05:54 +02:00
haiyangcui
5b0211b2ed 如果编辑源页面没有打开,无需更新 2020-09-13 14:51:22 +02:00
haiyangcui
0bb6409687 只有EditSites的资源列表变化时才更新Film页面 2020-09-13 08:19:57 +02:00
haiyangcui
7078e05668 修复编辑第三方播放器地址的bug 2020-09-12 22:35:54 +02:00
72 changed files with 18796 additions and 3580 deletions

View File

@@ -12,6 +12,7 @@ module.exports = {
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'standard/no-callback-literal': 0
}
}

28
.github/ISSUE_TEMPLATE/bug.md vendored Normal file
View File

@@ -0,0 +1,28 @@
---
name: 报告Bug(请先查看常见问题及搜索已关闭issue列表中有无你要提的问题)
about: 创建报告以帮助我们改进
title: '(未回答的问题请删除,减少多余信息干扰)'
labels: bug
assignees: ''
---
**描述错误**
清楚简洁地说明错误是什么。
**重现**
重现行为的步骤
**预期行为**
对您期望发生的事情的简洁明了的描述。
**截图**
如果适用,请添加屏幕截图以帮助解释您的问题(直接把图片拖到编辑框即可添加图片)。
**环境:**
-操作系统及版本:[例如Windows 10 64位 18362.156]
-软件安装包及版本:[例如Windows 64位绿色版 1.0.0]
**其他内容**
在此处添加有关该问题的任何其他上下文。

17
.github/ISSUE_TEMPLATE/feature.md vendored Normal file
View File

@@ -0,0 +1,17 @@
---
name: 功能请求(请先查看常见问题及搜索issue列表中有无你要提的问题)
about: 为这个项目提出一个想法
title: 例如添加xxx功能、优化xxx功能未回答的问题请删除
labels: enhancement
assignees: ''
---
**描述您想要的解决方案**
简洁明了地描述您要发生的事情。
**描述您考虑过的替代方案**
对您考虑过的所有替代解决方案或功能的简洁明了的描述。
**其他内容**
在此处添加有关功能请求的任何其他上下文或屏幕截图(直接把图片拖到编辑框即可添加图片)。

19
.github/ISSUE_TEMPLATE/help.md vendored Normal file
View File

@@ -0,0 +1,19 @@
---
name: 需要帮助
about: "其它问题"
labels: help wanted
---
### 版本、安装方式、系统
1. 你在使用什么版本的
2. 你通过什么方式安装
3. 你所使用的操作系统
### 描述问题:
<!-- 在下方描述问题 -->

View File

@@ -29,6 +29,7 @@
### ✨特性
- 🍕 全平台支持. Windows, Mac, Linux
- 🍥 支持 IPTV, 卫视直播
- 🍔 视频源支持自定义, 支持导入, 导出
- 🍟 支持海报模式和列表模式浏览资源
- 🌭 播放历史, 自动跳转历史进度
@@ -41,9 +42,19 @@
### 🌴 下载
- 🍓 [Github -- 官方下载](https://github.com/Hunlongyu/ZY-Player/releases)
- 🍉 [蓝奏云 -- 快速下载](https://www.lanzoux.com/b04s6a3re) 密码:95px
- 🍒 适用于32位操作系统的x86软件,在蓝奏云网盘里, 后缀名: ZY Player * 32位.exe
- 🎃 软件暂时关闭下载通道. 请大家支持正版.
- 🎭 所有资源来自网上, 该软件不参与任何制作, 上传, 储存等内容, 禁止传播违法资源. 该软件仅供学习参考, 请于安装后24小时内删除.
### 🎠 平台
| 平台 | 链接 |
| :------------------------------------ | :---------------------------------------------------------- |
| 🖥️ 电脑端 ( Windows & Mac & Linux ) | [ZY Player](https://github.com/Hunlongyu/ZY-Player) |
| 📱 手机端 ( Android & IOS ) | [ZY Player APP](https://github.com/Hunlongyu/ZY-Player-APP) |
| 📺 电视端 ( Android & Mac ) ( 进行中 ) | [ZY Player TV](https://github.com/cuiocean/ZY-Player-TV) |
| 🌐 浏览器 ( Web ) | [ZY Player Web](https://github.com/Hunlongyu/ZY-Player-Web) |
### 🚀 快捷键
@@ -80,13 +91,8 @@
### 🍭 开发者
| [Hunlongyu](https://github.com/Hunlongyu) | [cuiocean](https://github.com/cuiocean) |
| :----------------------------------------------------------: | :----------------------------------------------------------: |
| <img width="120" src="https://avatars2.githubusercontent.com/u/15273630?s=460&u=48cf3299e2a842c0252233d8be42ef4c5d792138&v=4"/> | <img width="120" src="https://avatars0.githubusercontent.com/u/5760235?s=460&u=9d969dd8d83f069ce7ebd60516770c93ac07a330&v=4" /> |
| 💻 🎨 🐛 | 💻 🐛 |
| [Hunlongyu](https://github.com/Hunlongyu) | [cuiocean](https://github.com/cuiocean) | [buvta](https://github.com/buvta) |
| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: |
| <img width="120" src="https://avatars2.githubusercontent.com/u/15273630?s=460&u=48cf3299e2a842c0252233d8be42ef4c5d792138&v=4"/> | <img width="120" src="https://avatars0.githubusercontent.com/u/5760235?s=460&u=9d969dd8d83f069ce7ebd60516770c93ac07a330&v=4" /> | <img width="120" src="https://avatars3.githubusercontent.com/u/12312540?s=400&v=4" /> |
| 💻 🎨 🐛 | 💻 🐛 | 💻 🐛 |
### 🧧 赞助
[![LATOPAY](https://latopay.com/w/lt-bg-2062.png)](https://latopay.com/@Hunlongyu)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 927 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@@ -89,7 +89,7 @@
<div class="section-title">
<h2>软件特色</h2>
<p>经过三个大版本更迭, 软件功能丰富, 操作简单.</p>
<p>软件功能丰富, 操作简单.</p>
</div>
<div class="row no-gutters">
@@ -99,7 +99,7 @@
<div class="col-md-6 icon-box" data-aos="fade-up">
<i class="bx bx-receipt"></i>
<h4>浏览</h4>
<p>浏览全网热门视频, 支持切换视频源. 详细的电影分类.支持搜索电影名和演员名称. </p>
<p>浏览全网热门视频, 支持切换视频源. 详细的电影分类. </p>
</div>
<div class="col-md-6 icon-box" data-aos="fade-up" data-aos-delay="100">
<i class="icofont-play-alt-3"></i>
@@ -124,7 +124,7 @@
<div class="col-md-6 icon-box" data-aos="fade-up" data-aos-delay="500">
<i class="icofont-cubes"></i>
<h4>其他</h4>
<p>多主题, 多语言, 自动更新</p>
<p>多主题, 自动更新</p>
</div>
</div>
</div>
@@ -146,14 +146,14 @@
</div>
<div class="owl-carousel gallery-carousel" data-aos="fade-up">
<a href="assets/img/gallery/001.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/001.png" alt=""></a>
<a href="assets/img/gallery/002.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/002.png" alt=""></a>
<a href="assets/img/gallery/003.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/003.png" alt=""></a>
<a href="assets/img/gallery/004.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/004.png" alt=""></a>
<a href="assets/img/gallery/005.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/005.png" alt=""></a>
<a href="assets/img/gallery/006.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/006.png" alt=""></a>
<a href="assets/img/gallery/007.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/007.png" alt=""></a>
<a href="assets/img/gallery/008.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/008.png" alt=""></a>
<a href="assets/img/gallery/01.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/01.png" alt=""></a>
<a href="assets/img/gallery/02.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/02.png" alt=""></a>
<a href="assets/img/gallery/03.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/03.png" alt=""></a>
<a href="assets/img/gallery/04.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/04.png" alt=""></a>
<a href="assets/img/gallery/05.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/05.png" alt=""></a>
<a href="assets/img/gallery/06.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/06.png" alt=""></a>
<a href="assets/img/gallery/07.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/07.png" alt=""></a>
<a href="assets/img/gallery/08.png" class="venobox" data-gall="gallery-carousel"><img src="assets/img/gallery/08.png" alt=""></a>
</div>
</div>
@@ -193,7 +193,7 @@
<i class="bx bx-help-circle icon-help"></i> <a data-toggle="collapse" href="#accordion-list-3" class="collapsed">跨平台<i class="bx bx-chevron-down icon-show"></i><i class="bx bx-chevron-up icon-close"></i></a>
<div id="accordion-list-3" class="collapse" data-parent=".accordion-list">
<p>
目前支持 Windows, Mac, Linux 桌面系统. 暂不支持手机端或者电视端. 未来会考虑实现全平台.
目前支持 Windows, Mac, Linux, Android, IOS, TV, Web 全平台.
</p>
</div>
</li>
@@ -236,6 +236,7 @@
<li><i class="bx bx-chevron-right"></i> <a target="_blank" href="#">Home</a></li>
<li><i class="bx bx-chevron-right"></i> <a target="_blank" href="https://www.ghpym.com/zyplayer.html">果核剥壳</a></li>
<li><i class="bx bx-chevron-right"></i> <a target="_blank" href="https://www.iplaysoft.com/zy-player.html">异次元软件世界</a></li>
<li><i class="bx bx-chevron-right"></i> <a target="_blank" href="https://xydh.fun/">炫辕</a></li>
</ul>
</div>

View File

@@ -1,6 +1,6 @@
{
"name": "zy",
"version": "2.4.6",
"version": "2.7.5",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
@@ -17,48 +17,56 @@
},
"main": "background.js",
"dependencies": {
"axios": "^0.19.2",
"cheerio": "^1.0.0-rc.3",
"child_process": "^1.0.2",
"core-js": "^3.6.5",
"cors": "^2.8.5",
"dexie": "^3.0.1",
"axios": "^0.21.1",
"cheerio": "^1.0.0-rc.5",
"core-js": "^3.9.0",
"dexie": "^3.0.3",
"electron-localshortcut": "^3.2.1",
"element-ui": "^2.13.2",
"express": "^4.17.1",
"fast-xml-parser": "^3.17.4",
"html2canvas": "^1.0.0-rc.5",
"modern-normalize": "^0.6.0",
"electron-proxy-agent": "^1.2.0",
"electron-updater": "^4.3.5",
"element-ui": "^2.15.0",
"fast-xml-parser": "^3.18.0",
"html2canvas": "^1.0.0-rc.7",
"iptv-playlist-parser": "^0.6.0",
"m3u": "0.0.2",
"m3u8-parser": "^4.5.2",
"memcached": "^2.2.2",
"modern-normalize": "^1.0.0",
"mousetrap": "^1.6.5",
"pinyin-match": "^1.2.0",
"qrcode.vue": "^1.7.0",
"randomstring": "^1.1.5",
"vue": "^2.6.11",
"session": "^0.1.0",
"sortablejs": "^1.13.0",
"v-fit-columns": "^0.2.0",
"vue": "^2.6.12",
"vue-infinite-loading": "^2.4.5",
"vue-waterfall-plugin": "^1.0.7",
"vuedraggable": "^2.24.1",
"vuex": "^3.4.0",
"xgplayer": "^2.9.10",
"xgplayer-hls.js": "^2.2.3"
"vue-waterfall-plugin": "^1.1.0",
"vuedraggable": "^2.24.3",
"vuex": "^3.6.2",
"xgplayer": "^2.18.0",
"xgplayer-flv.js": "^2.2.0",
"xgplayer-hls.js": "^2.4.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.4.0",
"@vue/cli-plugin-eslint": "~4.4.0",
"@vue/cli-plugin-vuex": "~4.4.0",
"@vue/cli-service": "~4.4.0",
"@vue/eslint-config-standard": "^5.1.2",
"@vue/cli-plugin-babel": "~4.5.11",
"@vue/cli-plugin-eslint": "~4.5.11",
"@vue/cli-plugin-vuex": "~4.5.11",
"@vue/cli-service": "~4.5.11",
"@vue/eslint-config-standard": "^6.0.0",
"babel-eslint": "^10.1.0",
"babel-plugin-component": "^1.1.1",
"electron": "^9.0.5",
"electron-devtools-installer": "^3.1.0",
"eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.2",
"electron": "^11.3.0",
"electron-devtools-installer": "^3.1.1",
"eslint": "^7.20.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^6.2.2",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"vue-cli-plugin-electron-builder": "2.0.0-rc.4",
"vue-template-compiler": "^2.6.11"
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-standard": "^4.1.0",
"eslint-plugin-vue": "^7.6.0",
"sass": "^1.30.0",
"sass-loader": "^10.1.0",
"vue-cli-plugin-electron-builder": "2.0.0-rc.6",
"vue-template-compiler": "^2.6.12"
}
}

View File

@@ -4,8 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="referrer" content="same-origin"/>
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>

View File

@@ -8,6 +8,9 @@
<Star v-show="view === 'Star'" />
<History v-show="view === 'History'" />
<Setting v-show="view === 'Setting'" />
<IPTV v-show="view === 'IPTV'" />
<EditSites v-if="view === 'EditSites'"/>
<Recommendation v-show="view === 'Recommendation'" />
</div>
<transition name="slide">
<Detail v-if="detail.show"/>
@@ -15,9 +18,6 @@
<transition name="slide">
<Share v-if="share.show"/>
</transition>
<transition name="slide">
<EditSites v-if="editSites.show"/>
</transition>
</div>
</template>
@@ -44,6 +44,9 @@ export default {
},
editSites () {
return this.$store.getters.getEditSites
},
recommendation () {
return this.$store.getters.recommendation
}
},
watch: {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

View File

@@ -78,99 +78,27 @@
}
}
}
.zy-checkbox{
.zy-input{
position: relative;
display: flex;
display: inline-block;
white-space: nowrap;
width: 200px;
height: 30px;
vertical-align: middle;
align-items: center;
.search-all-check-input{
cursor: pointer;
}
}
.zy-highlighted{
color: var(--highlight-color);
}
// table
.zy-table{
display: flex;
flex-direction: column;
height: 100%;
font-size: 15px;
.tHeader{
display: flex;
align-items: center;
justify-content: flex-end;
height: 50px;
min-height: 50px;
width: 100%;
border-bottom: 1px solid;
.btn{
user-select: none;
margin-right: 15px;
cursor: pointer;
font-size: 14px;
}
}
.tBody{
flex: 1;
border-bottom: 1px solid;
overflow: auto;
ul{
list-style: none;
padding: 0;
margin: 0;
li{
display: flex;
justify-content: flex-start;
align-items: center;
flex-direction: row;
height: 50px;
border-bottom: 1px solid;
cursor: pointer;
span{
display: flex;
font-size: 13px;
height: 50px;
line-height: 50px;
overflow: hidden;
margin-right: 5px;
&.name{
flex: 1;
min-width: 100px;
white-space: nowrap;
margin-left: 10px;
}
&.type{
width: 10%;
}
&.time{
width: 10%;
}
&.last{
width: 10%;
}
&.site{
width: 10%;
}
&.note{
width: 10%;
}
&.operate{
.btn{
width: 40px;
}
}
}
}
}
cursor: pointer;
input{
vertical-align: bottom;
position: relative;
border: none;
width: 20px;
height: 15px;
background-color: #ffffff00;
text-indent: 10px;
}
}
// scroll
.zy-scroll{
&::-webkit-scrollbar{
width: 5px;
width: 10px;
height: 1px;
}
&::-webkit-scrollbar-thumb {
@@ -182,6 +110,292 @@
position: absolute;
}
}
// Page of list using el-table
.listpage{
position: absolute;
left: 80px;
right: 20px;
top: 40px;
bottom: 20px;
width: calc(100% - 100px);
height: calc(100% - 60px);
border-radius: 5px;
display: flex;
flex-direction: column;
.listpage-header, .toolbar{
height: 60px;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
z-index: 10;
.header-box{
height: 100%;
width: 100%;
align-items: center;
justify-content: space-between;
}
.el-button{
font-size: 1rem;
border: none;
&:hover{
cursor: pointer;
}
}
.el-autocomplete{
.el-input-group__prepend{
border: none;
.el-select{
width: 100px;
.el-input, .el-input__inner{
width: 100%;
border: none;
}
}
}
.el-input .el-input__inner{
width: 200px;
}
.el-input-group__append{
border: none;
}
}
.is-loading:before {
background-color: none !important;
}
.el-input{
font-size: 1rem;
width: 200px;
}
.popper {
font-size: 1rem;;
border: none;
li {
font-size: 1rem;
border: none;
}
.el-select-dropdown__item.selected.hover{ //是上游的bug吗临时性修补
background-color: transparent;
}
.el-select-dropdown__wrap{
max-height: 574px
}
}
> span{
.el-input-number{
width:120px;
.el-input{
width: 100px;
}
.el-input__inner{
padding-left: 5px;
padding-right: 5px;
width: 88px;
}
.el-input-number__increase, .el-input-number__decrease {
background-color: inherit;
border: none;
}
}
}
}
.el-divider{
.el-divider--horizontal{
margin: 12px 0;
}
}
.toolbar{
z-index: 5;
}
.listpage-body{
height: calc(100% - 60px);
overflow-y: auto;
position: relative;
font-size: 1rem;
&::-webkit-scrollbar{
width: 5px;
height: 1px;
}
&::-webkit-scrollbar-thumb {
border-radius: 10px;
position: absolute;
}
&::-webkit-scrollbar-track {
border-radius: 10px;
position: absolute;
}
.show-table{
height: 100%;
width: 100%;
.el-table::before{
height: 0px;
}
.el-table{
height: 100%;
width: 100%;
overflow: hidden;
font-size: 1rem;
}
.el-table__body-wrapper{
height: 100%;
width: 100%;
&::-webkit-scrollbar{
width: 5px;
height: 1px;
}
&::-webkit-scrollbar-thumb {
border-radius: 10px;
position: absolute;
}
&::-webkit-scrollbar-track {
border-radius: 10px;
position: absolute;
}
}
.disableExpand div.el-table__expand-icon{
display: none;
}
.el-input{
width: 200px;
}
.el-table__body td,.el-table__body th{
border-bottom: 1px solid;
}
.el-table--enable-row-hover .el-table__body tr:hover>td{
transform: scale(1.02);
}
.el-table .highlight{
color: var(--highlight-color) !important;
}
.el-button{
font-size: 1rem;
}
}
.show-picture{
height: 100%;
width: 100%;
padding: 10px;
.card{
border-radius: 6px;
overflow: hidden;
position: relative;
cursor: pointer;
transition: 0.2s;
&:hover {
top: -3px;
}
.img{
position: relative;
min-height: 40px;
img{
width: 100%;
height: auto;
cursor: pointer;
}
.rate{
position: absolute;
top: 3%;
right: -40%;
width: 100%;
background-color: #111111aa;
color:#2f90b9;
height: 30px;
line-height: 30px;
font-size: 14px;
font-weight: bolder;
text-align: center;
transform: rotate(45deg);
}
.site{
position: absolute;
top: 0%;
left: 0%;
width: 100%;
background-color: #111111aa;
color:#2f90b9;
height: 30px;
line-height: 30px;
font-size: 14px;
font-weight: bolder;
text-align: center;
}
.progress{
position: absolute;
bottom: 10%;
left: 0%;
width: 40%;
background-color: #111111aa;
color: #f8df70;
height: 30px;
line-height: 30px;
font-size: 14px;
font-weight: bolder;
text-align: left;
}
.update{
position: absolute;
top: 5%;
left: -40%;
width: 100%;
background-color: #68b88e;
color: #cdcdcd;
height: 30px;
line-height: 30px;
font-size: 14px;
text-align: center;
transform: rotate(-45deg);
}
.operate{
display: none;
position: absolute;
left: 0;
bottom: 0;
background-color: #111111aa;
width: 100%;
font-size: 13px;
.operate-wrap{
display: flex;
justify-content: space-between;
.o-play, .o-star, .o-share{
cursor: pointer;
display: inline-block;
width: 80px;
height: 36px;
text-align: center;
line-height: 36px;
color: #cdcdcd;
&:hover{
background-color: #111;
}
}
}
}
}
.name{
font-size: 16px;
padding: 10px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.info{
display: flex;
justify-content: space-between;
font-size: 12px;
padding: 10px;
}
&:hover{
.operate{
display: block;
}
}
}
}
}
}
// loading
.zy-loading{
width: 100%;
@@ -226,4 +440,4 @@
box-shadow: 0em -3em 0 0, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0, -2em -2em 0 0.2em;
}
}
}
}

View File

@@ -1,6 +1,6 @@
:root{
// general
--highlight-color: #38dd77;
--highlight-color:#1677b3;
// light
--l-c-0: #823aa0;
--l-c-1: #823aa011;
@@ -65,7 +65,7 @@
--p-c-9: #f4f7f799;
--p-fc-1: #ffffff;
--p-fc-2: #FFFFF3;
--p-fc-3: #f15c5c;
--p-fc-3: #177ea7;
--p-bgc-1: #ff8499;
--p-bgc-2: #fea1b2;
--p-bsc: 0 1px 3px #ef528533, 0 1px 2px #ef528544;

View File

@@ -24,6 +24,8 @@
}
}
.vs-input{
color: var(--d-fc-1);
background-color: var(--d-bgc-1);
input{
color: var(--d-fc-1);
&::-webkit-input-placeholder{
@@ -32,36 +34,11 @@
}
}
}
.zy-checkbox{
.zy-input{
color: var(--d-fc-1);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}
.zy-table{
color: var(--d-fc-2);
.tHeader{
border-bottom-color: var(--d-c-3);
.btn{
&:hover{
color: var(--d-fc-3)
}
}
}
.tBody{
border-bottom-color: var(--d-c-3);
ul{
li{
border-bottom-color: var(--d-c-2);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
&:hover{
box-shadow: var(--d-bsc-hover);
}
span{
&.btn:hover{
color: var(--d-fc-3)
}
}
}
}
background-color: var(--d-bgc-1);
input{
color: var(--d-fc-1);
}
}
.zy-scroll{
@@ -154,23 +131,12 @@
border-color: var(--d-c-8);
}
}
}
}
}
}
}
.film{
.body{
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
.show-img{
color: var(--d-fc-1);
.card{
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
&:hover{
box-shadow: var(--d-bsc-hover);
.selected {
background-color: var(--d-c-5);
&:hover{
background-color: var(--d-c-5);
}
}
}
}
}
@@ -179,6 +145,19 @@
.play{
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
.el-switch__label {
color: var(--d-fc-2)
}
.el-switch__label.is-active {
color: #409EFF
}
.el-input{
input{
background-color: var(--d-bgc-1);
border: 1px solid var(--d-bgc-1);
color: var(--d-fc-2);
}
}
.title{
color: var(--d-fc-1);
.right {
@@ -188,6 +167,21 @@
}
}
.box{
.title{
.right{
color: var(--d-fc-2);
svg{
stroke: var(--d-c-5);
stroke-width: 1;
fill: none;
&:hover{
stroke: var(--d-c-8);
stroke-width: 1.5;
fill: var(--d-c-2);
}
}
}
}
.more{
span{
svg{
@@ -247,6 +241,14 @@
}
}
}
.list-channels{
.btn{
color: var(--d-fc-1);
&:hover{
text-decoration:underline;
}
}
}
.list-history{
li{
.title{
@@ -275,10 +277,6 @@
}
}
}
.star{
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
}
.setting{
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
@@ -344,4 +342,133 @@
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
}
// Page of list using table and picture
.listpage{
color: var(--d-fc-2);
.listpage-header-divider{
background-color: var(--d-bgc-1);
.el-divider__text {
background-color: var(--d-bgc-2);
}
.el-button{
background-color: var(--d-bgc-2);
color: var(--d-fc-2);
&:hover{
color: var(--d-fc-3)
}
}
}
.listpage-header, .toolbar{
border-bottom-color: var(--d-c-3);
.btn{
&:hover{
color: var(--d-fc-3)
}
}
.el-switch__label {
color: var(--d-fc-2)
}
.el-switch__label.is-active {
color: #409EFF
}
.el-button{
background-color: var(--d-bgc-2);
color: var(--d-fc-2);
&:hover{
color: var(--d-fc-3)
}
}
.el-input{
input{
background-color: var(--d-bgc-1);
border: 1px solid var(--d-bgc-1);
color: var(--d-fc-2);
}
}
.el-input-group__prepend{
background-color: var(--d-bgc-1);
}
.popper {
color: var(--d-fc-1);
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
li {
color: var(--d-fc-1);
background-color: var(--d-bgc-1);
&:hover{
background-color: var(--d-bgc-2);
}
}
}
.popper__arrow, .popper__arrow::after{
border-bottom-color: var(--d-bgc-1);
}
}
.listpage-body{
color: var(--d-fc-1);
background-color: var(--d-bgc-1);
&:hover{
&::-webkit-scrollbar-thumb {
box-shadow: var(--d-bsc-scroll);
background: var(--d-c-5);
}
&::-webkit-scrollbar-track {
box-shadow: var(--d-bsc-scroll);
background: var(--d-bgc-1);
}
}
/* 设置el-table的样式*/
.show-table{
.el-table{
color: var(--d-fc-1);
background-color: var(--d-bgc-1);
}
.el-table__body-wrapper{
&:hover{
&::-webkit-scrollbar-thumb {
box-shadow: var(--d-bsc-scroll);
background: var(--d-c-5);
}
&::-webkit-scrollbar-track {
box-shadow: var(--d-bsc-scroll);
background: var(--d-bgc-1);
}
}
}
.el-input{
input{
background-color: var(--d-bgc-2);
border: 1px solid var(--d-bgc-2);
color: var(--d-fc-1);
}
}
.el-table__header th, .el-table__header tr, .el-table__body td,.el-table__body th{
color: var(--d-fc-1);
background-color: var(--d-bgc-1);
border-bottom-color: var(--d-c-2);
}
.el-table--enable-row-hover .el-table__body tr:hover>td{
background-color: var(--d-bgc-2);
}
.el-button{
color: var(--d-fc-1);
&:hover{
color: var(--d-fc-3)
}
}
}
.show-picture{
color: var(--d-fc-1);
.card{
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
&:hover{
box-shadow: var(--d-bsc-hover);
}
}
}
}
}
}

View File

@@ -24,6 +24,8 @@
}
}
.vs-input{
color: var(--g-fc-1);
background-color: var(--g-bgc-1);
input{
color: var(--g-fc-1);
&::-webkit-input-placeholder{
@@ -32,35 +34,11 @@
}
}
}
.zy-checkbox{
.zy-input{
color: var(--g-fc-1);
}
.zy-table{
color: var(--g-fc-2);
.tHeader{
border-bottom-color: var(--g-c-3);
.btn{
&:hover{
color: var(--g-fc-3)
}
}
}
.tBody{
border-bottom-color: var(--g-c-3);
ul{
li{
border-bottom-color: var(--g-c-2);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
&:hover{
box-shadow: var(--g-bsc-hover);
}
span{
&.btn:hover{
color: var(--g-fc-3)
}
}
}
}
background-color: var(--g-bgc-1);
input{
color: var(--g-fc-1);
}
}
.zy-scroll{
@@ -153,23 +131,12 @@
border-color: var(--g-c-8);
}
}
}
}
}
}
}
.film{
.body{
background-color: var(--g-bgc-1);
box-shadow: var(--g-bsc);
.show-img{
color: var(--g-fc-1);
.card{
background-color: var(--g-bgc-1);
box-shadow: var(--g-bsc);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
&:hover{
box-shadow: var(--g-bsc-hover);
.selected {
background-color: var(--g-c-5);
&:hover{
background-color: var(--g-c-5);
}
}
}
}
}
@@ -178,6 +145,13 @@
.play{
background-color: var(--g-bgc-1);
box-shadow: var(--g-bsc);
.el-input{
input{
background-color: var(--g-bgc-1);
border: 1px solid var(--g-bgc-1);
color: var(--g-fc-2);
}
}
.title{
color: var(--g-fc-1);
.right {
@@ -187,6 +161,21 @@
}
}
.box{
.title{
.right{
color: var(--g-fc-2);
svg{
stroke: var(--g-c-5);
stroke-width: 1;
fill: none;
&:hover{
stroke: var(--g-c-8);
stroke-width: 1.5;
fill: var(--g-c-2);
}
}
}
}
.more{
span{
svg{
@@ -242,7 +231,15 @@
color: var(--g-fc-3);
}
&:hover{
background-color: var(--d-c-3);
background-color: var(--g-c-3);
}
}
}
.list-channels{
.btn{
color: var(--g-fc-1);
&:hover{
text-decoration:underline;
}
}
}
@@ -274,10 +271,6 @@
}
}
}
.star{
background-color: var(--g-bgc-1);
box-shadow: var(--g-bsc);
}
.setting{
background-color: var(--g-bgc-1);
box-shadow: var(--g-bsc);
@@ -343,4 +336,127 @@
background-color: var(--g-bgc-1);
box-shadow: var(--g-bsc);
}
// Page of list using table and picture
.listpage{
color: var(--g-fc-2);
.listpage-header-divider{
background-color: var(--g-bgc-1);
.el-divider__text {
background-color: var(--g-bgc-2);
}
.el-button{
background-color: var(--g-bgc-2);
color: var(--g-fc-2);
&:hover{
color: var(--g-fc-3)
}
}
}
.listpage-header, .toolbar{
border-bottom-color: var(--g-c-3);
.btn{
&:hover{
color: var(--g-fc-3)
}
}
.el-button{
background-color: var(--g-bgc-2);
color: var(--g-fc-2);
&:hover{
color: var(--g-fc-3)
}
}
.el-input{
input{
background-color: var(--g-bgc-1);
border: 1px solid var(--g-bgc-1);
color: var(--g-fc-2);
}
}
.el-input-group__prepend{
background-color: var(--g-bgc-1);
}
.popper {
color: var(--g-fc-1);
background-color: var(--g-bgc-1);
box-shadow: var(--g-bsc);
li {
color: var(--g-fc-1);
background-color: var(--g-bgc-1);
&:hover{
background-color: var(--g-bgc-2);
}
}
}
.popper__arrow, .popper__arrow::after{
border-bottom-color: var(--g-bgc-1);
}
}
.listpage-body{
color: var(--g-fc-1);
background-color: var(--g-bgc-1);
&:hover{
&::-webkit-scrollbar-thumb {
box-shadow: var(--g-bsc-scroll);
background: var(--g-c-5);
}
&::-webkit-scrollbar-track {
box-shadow: var(--g-bsc-scroll);
background: var(--g-bgc-1);
}
}
/* 设置el-table的样式*/
.show-table{
.el-table{
color: var(--g-fc-1);
background-color: var(--g-bgc-1);
}
.el-table__body-wrapper{
&:hover{
&::-webkit-scrollbar-thumb {
box-shadow: var(--g-bsc-scroll);
background: var(--g-c-5);
}
&::-webkit-scrollbar-track {
box-shadow: var(--g-bsc-scroll);
background: var(--g-bgc-1);
}
}
}
.el-input{
input{
background-color: var(--g-bgc-2);
border: 1px solid var(--g-bgc-2);
color: var(--g-fc-1);
}
}
.el-table__header th, .el-table__header tr, .el-table__body td,.el-table__body th{
color: var(--g-fc-1);
background-color: var(--g-bgc-1);
border-bottom-color: var(--g-c-2);
}
.el-table--enable-row-hover .el-table__body tr:hover>td{
background-color: var(--g-bgc-2);
}
.el-button{
color: var(--g-fc-1);
&:hover{
color: var(--g-fc-3)
}
}
}
.show-picture{
color: var(--g-fc-1);
.card{
background-color: var(--g-bgc-1);
box-shadow: var(--g-bsc);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
&:hover{
box-shadow: var(--g-bsc-hover);
}
}
}
}
}
}

View File

@@ -24,6 +24,8 @@
}
}
.vs-input{
color: var(--l-fc-1);
background-color: var(--l-bgc-1);
input{
color: var(--l-fc-1);
&::-webkit-input-placeholder{
@@ -32,35 +34,11 @@
}
}
}
.zy-checkbox{
.zy-input{
color: var(--l-fc-1);
}
.zy-table{
color: var(--l-fc-2);
.tHeader{
border-bottom-color: var(--l-c-3);
.btn{
&:hover{
color: var(--l-fc-3)
}
}
}
.tBody{
border-bottom-color: var(--l-c-3);
ul{
li{
border-bottom-color: var(--l-c-2);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
&:hover{
box-shadow: var(--l-bsc-hover);
}
span{
&.btn:hover{
color: var(--l-fc-3)
}
}
}
}
background-color: var(--l-bgc-1);
input{
color: var(--l-fc-1);
}
}
.zy-scroll{
@@ -153,23 +131,12 @@
border-color: var(--l-c-8);
}
}
}
}
}
}
}
.film{
.body{
background-color: var(--l-bgc-1);
box-shadow: var(--l-bsc);
.show-img{
color: var(--l-fc-1);
.card{
background-color: var(--l-bgc-1);
box-shadow: var(--l-bsc);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
&:hover{
box-shadow: var(--l-bsc-hover);
.selected {
background-color: var(--l-c-5);
&:hover{
background-color: var(--l-c-5);
}
}
}
}
}
@@ -178,6 +145,13 @@
.play{
background-color: var(--l-bgc-1);
box-shadow: var(--l-bsc);
.el-input{
input{
background-color: var(--l-bgc-1);
border: 1px solid var(--l-bgc-1);
color: var(--l-fc-2);
}
}
.title{
color: var(--l-fc-1);
.right {
@@ -187,6 +161,21 @@
}
}
.box{
.title{
.right{
color: var(--l-fc-2);
svg{
stroke: var(--l-c-5);
stroke-width: 1;
fill: none;
&:hover{
stroke: var(--l-c-8);
stroke-width: 1.5;
fill: var(--l-c-2);
}
}
}
}
.more{
span{
svg{
@@ -242,7 +231,15 @@
color: var(--l-fc-3);
}
&:hover{
background-color: var(--d-c-3);
background-color: var(--l-c-3);
}
}
}
.list-channels{
.btn{
color: var(--l-fc-1);
&:hover{
text-decoration:underline;
}
}
}
@@ -274,10 +271,6 @@
}
}
}
.star{
background-color: var(--l-bgc-1);
box-shadow: var(--l-bsc);
}
.setting{
background-color: var(--l-bgc-1);
box-shadow: var(--l-bsc);
@@ -343,4 +336,127 @@
background-color: var(--l-bgc-1);
box-shadow: var(--l-bsc);
}
// Page of list using table and picture
.listpage{
color: var(--l-fc-2);
.listpage-header-divider{
background-color: var(--l-bgc-1);
.el-divider__text {
background-color: var(--l-bgc-2);
}
.el-button{
background-color: var(--l-bgc-2);
color: var(--l-fc-2);
&:hover{
color: var(--l-fc-3)
}
}
}
.listpage-header, .toolbar{
border-bottom-color: var(--l-c-3);
.btn{
&:hover{
color: var(--l-fc-3)
}
}
.el-button{
background-color: var(--l-bgc-2);
color: var(--l-fc-2);
&:hover{
color: var(--l-fc-3)
}
}
.el-input{
input{
background-color: var(--l-bgc-1);
border: 1px solid var(--l-bgc-1);
color: var(--l-fc-2);
}
}
.el-input-group__prepend{
background-color: var(--l-bgc-1);
}
.popper {
color: var(--l-fc-1);
background-color: var(--l-bgc-1);
box-shadow: var(--l-bsc);
li {
color: var(--l-fc-1);
background-color: var(--l-bgc-1);
&:hover{
background-color: var(--l-bgc-2);
}
}
}
.popper__arrow, .popper__arrow::after{
border-bottom-color: var(--l-bgc-1);
}
}
.listpage-body{
color: var(--l-fc-1);
background-color: var(--l-bgc-1);
&:hover{
&::-webkit-scrollbar-thumb {
box-shadow: var(--l-bsc-scroll);
background: var(--l-c-5);
}
&::-webkit-scrollbar-track {
box-shadow: var(--l-bsc-scroll);
background: var(--l-bgc-1);
}
}
/* 设置el-table的样式*/
.show-table{
.el-table{
color: var(--l-fc-1);
background-color: var(--l-bgc-1);
}
.el-table__body-wrapper{
&:hover{
&::-webkit-scrollbar-thumb {
box-shadow: var(--l-bsc-scroll);
background: var(--l-c-5);
}
&::-webkit-scrollbar-track {
box-shadow: var(--l-bsc-scroll);
background: var(--l-bgc-1);
}
}
}
.el-input{
input{
background-color: var(--l-bgc-2);
border: 1px solid var(--l-bgc-2);
color: var(--l-fc-1);
}
}
.el-table__header th, .el-table__header tr, .el-table__body td,.el-table__body th{
color: var(--l-fc-1);
background-color: var(--l-bgc-1);
border-bottom-color: var(--l-c-2);
}
.el-table--enable-row-hover .el-table__body tr:hover>td{
background-color: var(--l-bgc-2);
}
.el-button{
color: var(--l-fc-1);
&:hover{
color: var(--l-fc-3)
}
}
}
.show-picture{
color: var(--l-fc-1);
.card{
background-color: var(--l-bgc-1);
box-shadow: var(--l-bsc);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
&:hover{
box-shadow: var(--l-bsc-hover);
}
}
}
}
}
}

View File

@@ -24,6 +24,8 @@
}
}
.vs-input{
color: var(--p-fc-1);
background-color: var(--p-bgc-1);
input{
color: var(--p-fc-1);
&::-webkit-input-placeholder{
@@ -32,35 +34,11 @@
}
}
}
.zy-checkbox{
.zy-input{
color: var(--p-fc-1);
}
.zy-table{
color: var(--p-fc-2);
.tHeader{
border-bottom-color: var(--p-c-3);
.btn{
&:hover{
color: var(--p-fc-3)
}
}
}
.tBody{
border-bottom-color: var(--p-c-3);
ul{
li{
border-bottom-color: var(--p-c-2);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
&:hover{
box-shadow: var(--p-bsc-hover);
}
span{
&.btn:hover{
color: var(--p-fc-3)
}
}
}
}
background-color: var(--p-bgc-1);
input{
color: var(--p-fc-1);
}
}
.zy-scroll{
@@ -153,23 +131,12 @@
border-color: var(--p-c-8);
}
}
}
}
}
}
}
.film{
.body{
background-color: var(--p-bgc-1);
box-shadow: var(--p-bsc);
.show-img{
color: var(--p-fc-1);
.card{
background-color: var(--p-bgc-1);
box-shadow: var(--p-bsc);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
&:hover{
box-shadow: var(--p-bsc-hover);
.selected {
background-color: var(--p-c-5);
&:hover{
background-color: var(--p-c-5);
}
}
}
}
}
@@ -178,6 +145,13 @@
.play{
background-color: var(--p-bgc-1);
box-shadow: var(--p-bsc);
.el-input{
input{
background-color: var(--p-bgc-1);
border: 1px solid var(--p-bgc-1);
color: var(--p-fc-2);
}
}
.title{
color: var(--p-fc-1);
.right {
@@ -187,6 +161,21 @@
}
}
.box{
.title{
.right{
color: var(--p-fc-2);
svg{
stroke: var(--p-c-5);
stroke-width: 1;
fill: none;
&:hover{
stroke: var(--p-c-8);
stroke-width: 1.5;
fill: var(--p-c-2);
}
}
}
}
.more{
span{
svg{
@@ -242,7 +231,15 @@
color: var(--p-fc-3);
}
&:hover{
background-color: var(--d-c-3);
background-color: var(--p-c-3);
}
}
}
.list-channels{
.btn{
color: var(--p-fc-1);
&:hover{
text-decoration:underline;
}
}
}
@@ -274,10 +271,6 @@
}
}
}
.star{
background-color: var(--p-bgc-1);
box-shadow: var(--p-bsc);
}
.setting{
background-color: var(--p-bgc-1);
box-shadow: var(--p-bsc);
@@ -343,4 +336,127 @@
background-color: var(--p-bgc-1);
box-shadow: var(--p-bsc);
}
// Page of list using table and picture
.listpage{
color: var(--p-fc-2);
.listpage-header-divider{
background-color: var(--p-bgc-1);
.el-divider__text {
background-color: var(--p-bgc-2);
}
.el-button{
background-color: var(--p-bgc-2);
color: var(--p-fc-2);
&:hover{
color: var(--p-fc-3)
}
}
}
.listpage-header, .toolbar{
border-bottom-color: var(--p-c-3);
.btn{
&:hover{
color: var(--p-fc-3)
}
}
.el-button{
background-color: var(--p-bgc-2);
color: var(--p-fc-2);
&:hover{
color: var(--p-fc-3)
}
}
.el-input{
input{
background-color: var(--p-bgc-1);
border: 1px solid var(--p-bgc-1);
color: var(--p-fc-2);
}
}
.el-input-group__prepend{
background-color: var(--p-bgc-1);
}
.popper {
color: var(--p-fc-1);
background-color: var(--p-bgc-1);
box-shadow: var(--p-bsc);
li {
color: var(--p-fc-1);
background-color: var(--p-bgc-1);
&:hover{
background-color: var(--p-bgc-2);
}
}
}
.popper__arrow, .popper__arrow::after{
border-bottom-color: var(--p-bgc-1);
}
}
.listpage-body{
color: var(--p-fc-1);
background-color: var(--p-bgc-1);
&:hover{
&::-webkit-scrollbar-thumb {
box-shadow: var(--p-bsc-scroll);
background: var(--p-c-5);
}
&::-webkit-scrollbar-track {
box-shadow: var(--p-bsc-scroll);
background: var(--p-bgc-1);
}
}
/* 设置el-table的样式*/
.show-table{
.el-table{
color: var(--p-fc-1);
background-color: var(--p-bgc-1);
}
.el-table__body-wrapper{
&:hover{
&::-webkit-scrollbar-thumb {
box-shadow: var(--p-bsc-scroll);
background: var(--p-c-5);
}
&::-webkit-scrollbar-track {
box-shadow: var(--p-bsc-scroll);
background: var(--p-bgc-1);
}
}
}
.el-input{
input{
background-color: var(--p-bgc-2);
border: 1px solid var(--p-bgc-2);
color: var(--p-fc-1);
}
}
.el-table__header th, .el-table__header tr, .el-table__body td,.el-table__body th{
color: var(--p-fc-1);
background-color: var(--p-bgc-1);
border-bottom-color: var(--p-c-2);
}
.el-table--enable-row-hover .el-table__body tr:hover>td{
background-color: var(--p-bgc-2);
}
.el-button{
color: var(--p-fc-1);
&:hover{
color: var(--p-fc-3)
}
}
}
.show-picture{
color: var(--p-fc-1);
.card{
background-color: var(--p-bgc-1);
box-shadow: var(--p-bsc);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
&:hover{
box-shadow: var(--p-bsc-hover);
}
}
}
}
}
}

View File

@@ -1,16 +1,16 @@
'use strict'
import './lib/site/server'
import { app, protocol, BrowserWindow, globalShortcut, ipcMain } from 'electron'
import { app, protocol, BrowserWindow, globalShortcut } from 'electron'
import { createProtocol } from 'vue-cli-plugin-electron-builder/lib'
import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
import { initUpdater } from './lib/update/update'
const isDevelopment = process.env.NODE_ENV !== 'production'
// const log = require('electron-log') // 用于调试主程序
// 允许跨域
app.commandLine.appendSwitch('disable-features', 'OutOfBlinkCors')
app.commandLine.appendSwitch('disable-features', 'OutOfBlinkCors') // 允许跨域
app.commandLine.appendSwitch('--ignore-certificate-errors', 'true') // 忽略证书相关错误
let win
let mini
protocol.registerSchemesAsPrivileged([{ scheme: 'app', privileges: { secure: true, standard: true } }])
@@ -22,7 +22,9 @@ function createWindow () {
resizable: true,
webPreferences: {
webSecurity: false,
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
enableRemoteModule: true,
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION,
allowRunningInsecureContent: false
}
})
@@ -34,43 +36,36 @@ function createWindow () {
win.loadURL('app://./index.html')
}
// 修改request headers
// Sec-Fetch下禁止修改浏览器自动加上请求头 https://www.cnblogs.com/fulu/p/13879080.html 暂时先用index.html的meta referer policy替代
const filter = {
urls: ['http://*/*', 'http://*/*']
}
win.webContents.session.webRequest.onBeforeSendHeaders(filter, (details, callback) => {
const url = new URL(details.url)
details.requestHeaders.Origin = url.origin
if (!details.url.includes('//localhost') && details.requestHeaders.Referer && details.requestHeaders.Referer.includes('//localhost')) {
details.requestHeaders.Referer = url.origin
}
callback({ // https://github.com/electron/electron/issues/23988 回调似乎无法修改headers暂时先用index.html的meta referer policy替代
cancel: false,
requestHeaders: details.requestHeaders
})
})
initUpdater(win)
win.on('closed', () => {
win = null
})
}
function createMini () {
mini = new BrowserWindow({
width: 550,
miniWidth: 860,
height: 340,
miniHeight: 180,
frame: false,
resizable: true,
webPreferences: {
webSecurity: false,
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
}
})
if (process.env.WEBPACK_DEV_SERVER_URL) {
mini.loadURL(process.env.WEBPACK_DEV_SERVER_URL + 'mini')
if (!process.env.IS_TEST) mini.webContents.openDevTools()
} else {
createProtocol('app')
mini.loadURL('app://./mini.html')
}
mini.on('closed', () => {
mini = null
})
}
if (process.platform === 'darwin') {
app.dock.show()
}
if (process.platform === 'Linux') {
app.disableHardwareAcceleration()
app.commandLine.appendSwitch('--no-sandbox') // linux 关闭沙盒模式
}
app.allowRendererProcessReuse = true
@@ -84,17 +79,6 @@ app.on('activate', () => {
}
})
ipcMain.on('mini', () => {
createMini()
win.hide()
})
ipcMain.on('win', () => {
mini.destroy()
win.show()
win.webContents.send('miniClosed')
})
const gotTheLock = app.requestSingleInstanceLock()
if (!gotTheLock) {
app.quit()
@@ -118,9 +102,6 @@ if (!gotTheLock) {
if (win) {
win.isFocused() ? win.blur() : win.focus()
}
if (mini) {
mini.isFocused() ? mini.blur() : mini.focus()
}
})
})
}

View File

@@ -2,7 +2,7 @@
<div class="aside">
<span :class="[view === 'Film' ? 'active ': ''] + 'zy-svg'" @click="changeView('Film')">
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="apertureIconTitle">
<title id="apertureIconTitle">view</title>
<title id="apertureIconTitle">电影</title>
<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"></path>
<g stroke-linecap="round">
<path d="M3 16H14.3164"></path>
@@ -14,15 +14,22 @@
</g>
</svg>
</span>
<span :class="[view === 'Recommendation' ? 'active ': ''] + 'zy-svg'" @click="changeView('Recommendation')">
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="48px" height="48px" viewBox="0 0 24 24" aria-labelledby="thumbUpIconTitle" stroke="#2329D6" stroke-width="1" stroke-linecap="square" stroke-linejoin="miter" fill="none" color="#2329D6">
<title id="thumbUpIconTitle">影视推荐</title>
<path d="M8,8.73984815 C8,8.26242561 8.17078432,7.80075162 8.4814868,7.43826541 L13.2723931,1.84887469 C13.7000127,1.34998522 14.4122932,1.20614658 15,1.5 C15.5737957,1.78689785 15.849314,2.45205792 15.6464466,3.06066017 L14,8 L18.6035746,8 C18.7235578,8 18.8432976,8.01079693 18.9613454,8.03226018 C20.0480981,8.22985158 20.7689058,9.27101818 20.5713144,10.3577709 L19.2985871,17.3577709 C19.1256814,18.3087523 18.2974196,19 17.3308473,19 L10,19 C8.8954305,19 8,18.1045695 8,17 L8,8.73984815 Z"/>
<path d="M4,18 L4,9"/>
</svg>
</span>
<span :class="[view === 'Play' ? 'active ': ''] + 'zy-svg'" @click="changeView('Play')">
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="playIconTitle">
<title id="playIconTitle">play</title>
<title id="playIconTitle">播放</title>
<path d="M20 12L5 21V3z"></path>
</svg>
</span>
<span :class="[view === 'Star' ? 'active ': ''] + 'zy-svg'" @click="changeView('Star')">
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="favouriteIconTitle">
<title id="favouriteIconTitle">star</title>
<title id="favouriteIconTitle">收藏</title>
<path d="M12,21 L10.55,19.7051771 C5.4,15.1242507 2,12.1029973 2,8.39509537 C2,5.37384196 4.42,3 7.5,3 C9.24,3 10.91,3.79455041 12,5.05013624 C13.09,3.79455041 14.76,3 16.5,3 C19.58,3 22,5.37384196 22,8.39509537 C22,12.1029973 18.6,15.1242507 13.45,19.7149864 L12,21 Z"></path>
</svg>
</span>
@@ -35,7 +42,7 @@
</span>
<span :class="[view === 'Setting' ? 'active ': ''] + 'zy-svg'" @click="changeView('Setting')">
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="settingsIconTitle">
<title id="settingsIconTitle">setting</title>
<title id="settingsIconTitle">设置</title>
<path d="M5.03506429,12.7050339 C5.01187484,12.4731696 5,12.2379716 5,12 C5,11.7620284 5.01187484,11.5268304 5.03506429,11.2949661 L3.20577137,9.23205081 L5.20577137,5.76794919 L7.9069713,6.32070904 C8.28729123,6.0461342 8.69629298,5.80882212 9.12862533,5.61412402 L10,3 L14,3 L14.8713747,5.61412402 C15.303707,5.80882212 15.7127088,6.0461342 16.0930287,6.32070904 L18.7942286,5.76794919 L20.7942286,9.23205081 L18.9649357,11.2949661 C18.9881252,11.5268304 19,11.7620284 19,12 C19,12.2379716 18.9881252,12.4731696 18.9649357,12.7050339 L20.7942286,14.7679492 L18.7942286,18.2320508 L16.0930287,17.679291 C15.7127088,17.9538658 15.303707,18.1911779 14.8713747,18.385876 L14,21 L10,21 L9.12862533,18.385876 C8.69629298,18.1911779 8.28729123,17.9538658 7.9069713,17.679291 L5.20577137,18.2320508 L3.20577137,14.7679492 L5.03506429,12.7050339 Z"></path>
<circle cx="12" cy="12" r="1"></circle>
</svg>
@@ -46,6 +53,12 @@
import { mapMutations } from 'vuex'
export default {
name: 'Aside',
data () {
return {
lastViewOpenDetail: '',
savedDetail: {}
}
},
computed: {
view: {
get () {
@@ -62,26 +75,24 @@ export default {
set (val) {
this.SET_DETAIL(val)
}
},
editSites: {
get () {
return this.$store.getters.getEditSites
},
set (val) {
this.SET_EDITSITES(val)
}
}
},
methods: {
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_EDITSITES']),
...mapMutations(['SET_VIEW', 'SET_DETAIL']),
changeView (e) {
this.view = e
// ChangeView 的时候关闭Detail和EditSites页面
this.detail = {
show: false
// 记录打开detail的view
if (this.detail.show === true) {
this.lastViewOpenDetail = this.view
this.savedDetail = this.detail
}
this.editSites = {
show: false
this.view = e
// 如果回到上一次打开detail的试图页面,恢复detail页面
if (e === this.lastViewOpenDetail) {
this.detail = this.savedDetail
} else {
this.detail = {
show: false
}
}
}
}

View File

@@ -4,7 +4,14 @@
<div class="detail-header">
<span class="detail-title">详情</span>
<span class="detail-close zy-svg" @click="close">
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="closeIconTitle">
<svg
role="img"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
aria-labelledby="closeIconTitle"
>
<title id="closeIconTitle">关闭</title>
<path d="M6.34314575 6.34314575L17.6568542 17.6568542M6.34314575 17.6568542L17.6568542 6.34314575"></path>
</svg>
@@ -29,16 +36,32 @@
</div>
</div>
<div class="operate">
<span @click="playEvent(0)">播放</span>
<span @click="playEvent(selectedEpisode)">播放</span>
<span @click="starEvent">收藏</span>
<span @click="downloadEvent">下载</span>
<span @click="shareEvent">分享</span>
<span @click="doubanLinkEvent">豆瓣</span>
<span @click="togglePlayOnlineEvent">
<input type="checkbox" v-model="playOnline"> 播放在线高清视频
</span>
<span>
<select v-model="selectedOnlineSite" class="vs-options">
<option disabled value="">Please select one</option>
<option v-for="(i, j) in onlineSites" :key="j">{{i}}</option>
</select>
</span>
</div>
<div
class="desc" v-show="info.des">{{info.des}}
</div>
<div class="m3u8" v-if="videoFullList.length > 1">
<div class="box">
<span v-bind:class="{ selected: i.flag === videoFlag }" v-for="(i, j) in videoFullList" :key="j" @click="updateVideoList(i)">{{i.flag}}</span>
</div>
</div>
<div class="desc" v-show="info.des">{{info.des}}</div>
<div class="m3u8">
<div class="box">
<span v-for="(i, j) in m3u8List" :key="j" @click="playEvent(j)">{{i | ftName}}</span>
<span v-bind:class="{ selected: j === selectedEpisode }" v-for="(i, j) in videoList" :key="j" @click="playEvent(j)" @mouseenter="() => { selectedEpisode = j }">{{ i | ftName(j) }}</span>
</div>
</div>
</div>
@@ -51,6 +74,7 @@
<script>
import { mapMutations } from 'vuex'
import zy from '../lib/site/tools'
import onlineVideo from '../lib/site/onlineVideo'
import { star, history } from '../lib/dexie'
const { clipboard } = require('electron')
export default {
@@ -58,14 +82,24 @@ export default {
data () {
return {
loading: true,
m3u8List: [],
info: {}
videoFlag: '',
videoList: [],
videoFullList: [],
info: {},
playOnline: false,
selectedEpisode: 0, // 选定集数
selectedOnlineSite: '哔嘀',
onlineSites: ['哔嘀', '素白白', '简影', '极品', '喜欢看', '1080影视']
}
},
filters: {
ftName (e) {
const name = e.split('$')[0]
return name
ftName (e, n) {
const num = e.split('$')
if (num.length > 1) {
return e.split('$')[0]
} else {
return `${(n + 1)}`
}
}
},
computed: {
@@ -100,164 +134,174 @@ export default {
set (val) {
this.SET_SHARE(val)
}
},
DetailCache: {
get () {
return this.$store.getters.getDetailCache
},
set (val) {
this.SET_DetailCache(val)
}
}
},
methods: {
...mapMutations(['SET_VIEW', 'SET_VIDEO', 'SET_DETAIL', 'SET_SHARE']),
...mapMutations(['SET_VIEW', 'SET_VIDEO', 'SET_DETAIL', 'SET_SHARE', 'SET_DetailCache']),
addClass (flag) {
if (flag === this.videoFlag) {
return 'selectedBox'
} else {
return 'box'
}
},
close () {
this.detail.show = false
},
m3u8Parse (e) {
const dd = e.dl.dd
const type = Object.prototype.toString.call(dd)
if (type === '[object Array]') {
for (const i of dd) {
if (i._flag.indexOf('m3u8') >= 0) {
this.m3u8List = i._t.split('#')
}
}
} else {
this.m3u8List = dd._t.split('#')
async updateVideoList (e) {
this.videoFlag = e.flag
this.videoList = e.list
const db = await history.find({ site: this.detail.key, ids: this.detail.info.id })
if (db) {
const doc = { ...db }
doc.videoFlag = e.flag
delete doc.id
history.update(db.id, doc)
}
},
playEvent (n) {
history.find({ site: this.detail.key, ids: this.detail.info.id }).then(res => {
if (res) {
this.video = { key: res.site, info: { id: res.ids, name: res.name, index: n, site: this.detail.site } }
async playEvent (n) {
if (!this.playOnline) {
const db = await history.find({ site: this.detail.key, ids: this.detail.info.id })
if (db) {
this.video = { key: db.site, info: { id: db.ids, name: db.name, index: n, site: this.detail.site, videoFlag: this.videoFlag } }
} else {
this.video = { key: this.detail.key, info: { id: this.detail.info.id, name: this.detail.info.name, index: n, site: this.detail.site } }
this.video = { key: this.detail.key, info: { id: this.detail.info.id, name: this.detail.info.name, index: n, site: this.detail.site, videoFlag: this.videoFlag } }
}
})
this.view = 'Play'
this.detail.show = false
},
starEvent () {
star.find({ key: this.detail.key, ids: this.info.id }).then(res => {
if (res) {
this.$message.info('该影片已被收藏')
this.video.detail = this.info
this.view = 'Play'
this.detail.show = false
} else {
const db = await history.find({ site: this.detail.key, ids: this.info.id })
if (db) {
db.index = n
db.detail = this.info
history.update(db.id, db)
} else {
const docs = {
key: this.detail.key,
ids: this.info.id,
name: this.info.name,
type: this.info.type,
year: this.info.year,
last: this.info.last,
note: this.info.note
const doc = {
site: this.detail.key,
ids: this.detail.info.id,
name: this.detail.info.name,
type: this.detail.info.type,
year: this.detail.info.year,
index: n,
time: '',
detail: this.info
}
star.add(docs).then(res => {
this.$message.success('收藏成功')
})
history.add(doc)
}
}).catch(() => {
this.$message.warning('收藏失败')
})
onlineVideo.playVideoOnline(this.selectedOnlineSite, this.detail.info.name, n)
}
},
async starEvent () {
const db = await star.find({ key: this.detail.key, ids: this.info.id })
const doc = {
key: this.detail.key,
ids: this.info.id,
site: this.detail.site,
name: this.info.name,
detail: this.info,
rate: this.info.rate
}
if (db) {
star.update(db.id, doc)
this.$message.success('收藏更新成功')
} else {
star.add(doc).then(res => {
this.$message.success('收藏成功')
})
}
},
togglePlayOnlineEvent () {
this.playOnline = !this.playOnline
},
playVideoOnline (videoName, videoIndex) {
switch (this.selectedOnlineSite) {
case '哔嘀':
onlineVideo.playVideoOnBde4(videoName, videoIndex)
break
case '1080影视':
onlineVideo.playVideoOnK1080(videoName, videoIndex)
break
case '素白白':
onlineVideo.playVideoOnSubaibai(videoName, videoIndex)
break
case '哆咪动漫':
onlineVideo.playVideoOndmdm2020(videoName, videoIndex)
break
case '樱花动漫':
onlineVideo.playVideoOnYhdm(videoName, videoIndex)
break
case '简影':
onlineVideo.playVideoOnSyrme(videoName, videoIndex)
break
case '极品':
onlineVideo.playVideoOnJpysvip(videoName, videoIndex)
break
default:
this.$message.console.error(`不支持该网站:${this.selectedOnlineSite}`)
}
},
downloadEvent () {
zy.download(this.detail.key, this.info.id).then(res => {
if (res && res.dl && res.dl.dd) {
const text = res.dl.dd._t
if (text) {
const list = text.split('#')
let downloadUrl = res.name + '\n'
for (const i of list) {
const url = encodeURI(i.split('$')[1])
downloadUrl += (url + '\n')
}
clipboard.writeText(downloadUrl)
this.$message.success('『MP4』格式的链接已复制, 快去下载吧!')
} else {
this.$message.warning('没有查询到下载链接.')
}
} else {
const list = [...this.m3u8List]
let downloadUrl = this.detail.info.name + '\n'
for (const i of list) {
const url = encodeURI(i.split('$')[1])
downloadUrl += (url + '\n')
}
clipboard.writeText(downloadUrl)
this.$message.success('『M3U8』格式的链接已复制, 快去下载吧!')
}
zy.download(this.detail.key, this.info.id, this.videoFlag).then(res => {
clipboard.writeText(res.downloadUrls)
this.$message.success(res.info)
}).catch((err) => {
this.$message.error(err.info)
})
},
shareEvent () {
this.share = {
show: true,
key: this.detail.key,
info: this.detail.info
info: this.info,
index: this.selectedEpisode
}
},
doubanLinkEvent () {
const open = require('open')
const axios = require('axios')
const cheerio = require('cheerio')
const name = this.detail.info.name.trim()
// 豆瓣搜索链接
var doubanSearchLink = 'https://www.douban.com/search?q=' + name
var link = doubanSearchLink
axios.get(doubanSearchLink).then(res => {
const $ = cheerio.load(res.data)
// 比较第一和第二豆瓣搜索结果, 如果名字相符, 就打开该链接,否则打开搜索页面
var nameInDouban = $($('div.result')[0]).find('div>div>h3>a').first()
if (name.replace(/\s/g, '') === nameInDouban.text().replace(/\s/g, '')) {
link = nameInDouban.attr('href')
} else {
nameInDouban = $($('div.result')[1]).find('div>div>h3>a').first()
if (name.replace(/\s/g, '') === nameInDouban.text().replace(/\s/g, '')) {
link = nameInDouban.attr('href')
}
}
const name = this.info.name.trim()
const year = this.info.year
zy.doubanLink(name, year).then(link => {
const open = require('open')
open(link)
})
},
getDoubanRate () {
const axios = require('axios')
const cheerio = require('cheerio')
const name = this.detail.info.name.trim()
// 豆瓣搜索链接
var doubanSearchLink = 'https://www.douban.com/search?q=' + name
axios.get(doubanSearchLink).then(res => {
const $ = cheerio.load(res.data)
// 比较第一和第二给豆瓣搜索结果, 看名字是否相符
var link = ''
var nameInDouban = $($('div.result')[0]).find('div>div>h3>a').first()
if (name.replace(/\s/g, '') === nameInDouban.text().replace(/\s/g, '')) {
link = nameInDouban.attr('href')
} else {
nameInDouban = $($('div.result')[1]).find('div>div>h3>a').first()
if (name.replace(/\s/g, '') === nameInDouban.text().replace(/\s/g, '')) {
link = nameInDouban.attr('href')
}
}
// 如果找到链接,就打开该链接获取评分
if (link) {
axios.get(link).then(response => {
const parsedHtml = cheerio.load(response.data)
var rating = parsedHtml('body').find('#interest_sectl').first().find('strong').first()
if (rating.text()) {
this.info.rate = rating.text()
} else {
this.info.rate = '暂无评分'
}
})
} else {
this.info.rate = '暂无评分'
}
})
async getDoubanRate () {
const name = this.info.name.trim()
const year = this.info.year
this.info.rate = await zy.doubanRate(name, year)
},
getDetailInfo () {
async getDetailInfo () {
const id = this.detail.info.ids || this.detail.info.id
zy.detail(this.detail.key, id).then(res => {
if (res) {
this.info = res
this.$set(this.info, 'rate', '')
this.m3u8Parse(res)
this.getDoubanRate()
this.loading = false
const cacheKey = this.detail.key + '@' + id
const db = await history.find({ site: this.detail.key, ids: id })
if (db) {
this.videoFlag = db.videoFlag
this.selectedEpisode = db.index
}
if (!this.DetailCache[cacheKey]) {
this.DetailCache[cacheKey] = await zy.detail(this.detail.key, id)
}
const res = this.DetailCache[cacheKey]
if (res) {
this.info = res
this.$set(this.info, 'rate', this.DetailCache[cacheKey].rate || '')
this.videoFlag = this.videoFlag || res.fullList[0].flag
this.videoList = res.fullList[0].list
this.videoFullList = res.fullList
this.loading = false
if (!this.info.rate) {
await this.getDoubanRate()
this.DetailCache[cacheKey].rate = this.info.rate
}
})
}
}
},
created () {
@@ -266,7 +310,7 @@ export default {
}
</script>
<style lang="scss" scoped>
.detail{
.detail {
position: absolute;
left: 80px;
right: 20px;
@@ -274,28 +318,28 @@ export default {
width: calc(100% - 100px);
height: calc(100% - 40px);
z-index: 888;
.detail-content{
.detail-content {
height: calc(100% - 10px);
padding: 0 60px;
position: relative;
.detail-header{
.detail-header {
width: 100%;
height: 40px;
display: flex;
align-items: center;
justify-content: space-between;
.detail-title{
.detail-title {
font-size: 16px;
}
.detail-close{
.detail-close {
cursor: pointer;
}
}
}
.detail-body{
.detail-body {
height: calc(100% - 50px);
overflow-y: auto;
.info{
.info {
width: 100%;
padding: 10px;
display: flex;
@@ -306,47 +350,54 @@ export default {
border-radius: 2px;
margin-bottom: 10px;
height: auto;
.info-left{
.info-left {
width: 200px;
height: 100%;
img{
img {
width: 100%;
height: auto;
}
}
.info-right{
.info-right {
flex: 1;
margin-left: 20px;
.name{
.name {
font-size: 20px;
margin-bottom: 10px;
font-weight: bold;
}
.director, .actor, .type, .area, .lang, .year, .last, .note{
.director,
.actor,
.type,
.area,
.lang,
.year,
.last,
.note {
font-size: 14px;
line-height: 26px;
}
.rate{
.rate {
font-size: 16px;
line-height: 26px;
font-weight: bolder;
}
}
}
.operate{
.operate {
border: 1px solid;
padding: 10px;
width: 100%;
margin-bottom: 10px;
border-radius: 2px;
span{
span {
margin-right: 20px;
font-size: 14px;
cursor: pointer;
user-select: none;
}
}
.desc{
.desc {
border: 1px solid;
padding: 10px;
width: 100%;
@@ -355,15 +406,24 @@ export default {
font-size: 14px;
line-height: 20px;
}
.m3u8{
.m3u8 {
border: 1px solid;
padding: 10px 0 10px 10px;
width: 100%;
margin-bottom: 10px;
border-radius: 2px;
.box{
.box {
width: 100%;
span{
span {
display: inline-block;
font-size: 12px;
border: 1px solid;
border-radius: 2px;
cursor: pointer;
margin: 6px 10px 0px 0px;
padding: 8px 22px;
}
.selected {
display: inline-block;
font-size: 12px;
border: 1px solid;
@@ -375,7 +435,7 @@ export default {
}
}
}
.detail-mask{
.detail-mask {
position: absolute;
top: 50px;
left: 0;
@@ -397,28 +457,37 @@ export default {
@keyframes load4 {
0%,
100% {
box-shadow: 0 -3em 0 0.2em, 2em -2em 0 0em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 0;
box-shadow: 0 -3em 0 0.2em, 2em -2em 0 0em, 3em 0 0 -1em, 2em 2em 0 -1em,
0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 0;
}
12.5% {
box-shadow: 0 -3em 0 0, 2em -2em 0 0.2em, 3em 0 0 0, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 -1em;
box-shadow: 0 -3em 0 0, 2em -2em 0 0.2em, 3em 0 0 0, 2em 2em 0 -1em,
0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 -1em;
}
25% {
box-shadow: 0 -3em 0 -0.5em, 2em -2em 0 0, 3em 0 0 0.2em, 2em 2em 0 0, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 -1em;
box-shadow: 0 -3em 0 -0.5em, 2em -2em 0 0, 3em 0 0 0.2em, 2em 2em 0 0,
0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 -1em;
}
37.5% {
box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 0, 2em 2em 0 0.2em, 0 3em 0 0em, -2em 2em 0 -1em, -3em 0em 0 -1em, -2em -2em 0 -1em;
box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 0, 2em 2em 0 0.2em,
0 3em 0 0em, -2em 2em 0 -1em, -3em 0em 0 -1em, -2em -2em 0 -1em;
}
50% {
box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 0em, 0 3em 0 0.2em, -2em 2em 0 0, -3em 0em 0 -1em, -2em -2em 0 -1em;
box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 0em,
0 3em 0 0.2em, -2em 2em 0 0, -3em 0em 0 -1em, -2em -2em 0 -1em;
}
62.5% {
box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 0, -2em 2em 0 0.2em, -3em 0 0 0, -2em -2em 0 -1em;
box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em,
0 3em 0 0, -2em 2em 0 0.2em, -3em 0 0 0, -2em -2em 0 -1em;
}
75% {
box-shadow: 0em -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0.2em, -2em -2em 0 0;
box-shadow: 0em -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 -1em,
2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0.2em,
-2em -2em 0 0;
}
87.5% {
box-shadow: 0em -3em 0 0, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0, -2em -2em 0 0.2em;
box-shadow: 0em -3em 0 0, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em,
0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0, -2em -2em 0 0.2em;
}
}
}

View File

@@ -1,88 +1,166 @@
<template>
<div class="detail">
<div class="detail-content">
<div class="detail-header">
<div class="zy-select">
<div class="vs-placeholder vs-noAfter" @click="openAddSite">添加新源</div>
</div>
<span class="detail-close zy-svg" @click="close">
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="closeIconTitle">
<title id="closeIconTitle">关闭</title>
<path d="M6.34314575 6.34314575L17.6568542 17.6568542M6.34314575 17.6568542L17.6568542 6.34314575"></path>
</svg>
<div class="listpage" id="sites">
<div class="listpage-header" v-show="!enableBatchEdit">
<el-switch v-model="enableBatchEdit" active-text="批处理分组">></el-switch>
<el-checkbox v-model="setting.excludeR18Films" @change="excludeR18FilmsChangeEvent">屏蔽福利片</el-checkbox>
<el-button @click="addSite" icon="el-icon-document-add">新增</el-button>
<el-button @click="exportSites" icon="el-icon-upload2" title="导出全部,自动添加扩展名">导出</el-button>
<el-button @click="importSites" icon="el-icon-download" title="支持同时导入多个文件">导入</el-button>
<el-button @click="checkAllSite" icon="el-icon-refresh" :loading="checkAllSitesLoading" title="可在后台运行">检测{{ this.checkAllSitesLoading ? this.checkProgress + '/' + this.sites.length : '' }}</el-button>
<el-button @click="resetSitesEvent" icon="el-icon-refresh-left">重置</el-button>
</div>
<div class="listpage-header" v-show="enableBatchEdit">
<el-switch v-model="enableBatchEdit" active-text="批处理分组"></el-switch>
<el-input placeholder="新组名" v-model="batchGroupName"></el-input>
<el-switch v-model="batchIsActive" active-text="启用"></el-switch>
<el-button type="primary" icon="el-icon-edit" @click.stop="saveBatchEdit" title="输入框组名为空时仅保存开关状态">保存分组与开关状态</el-button>
<el-button @click="removeSelectedSites" icon="el-icon-delete-solid">删除</el-button>
</div>
<div class="listpage-body" id="sites-body">
<div class="show-table" id="sites-table">
<el-table size="mini" fit height="100%" row-key="id"
ref="editSitesTable"
:data="sites"
@select="selectionCellClick"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange">
<el-table-column
type="selection"
v-if="enableBatchEdit">
</el-table-column>
<el-table-column
prop="name"
label="资源名">
</el-table-column>
<el-table-column
prop="isActive"
width="120"
:filters = "[{text:'启用', value: true}, {text:'停用', value: false}]"
:filter-method="(value, row) => value === row.isActive"
label="启用">
<template slot-scope="scope">
<el-switch
v-model="scope.row.isActive"
@click.native.stop='isActiveChangeEvent(scope.row)'>
</el-switch>
</template>
</el-table-column>
<el-table-column
prop="group"
label="分组"
:filters="getFilters"
:filter-method="(value, row) => value === row.group"
filter-placement="bottom-end">
</el-table-column>
<el-table-column
label="状态"
sortable
:sort-by="['status']"
width="120">
<template slot-scope="scope">
<span v-if="scope.row.status === ' '">
<i class="el-icon-loading"></i>
检测中...
</span>
<span v-else>{{scope.row.status}}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
header-align="center"
align="right"
:width="sites.every(site => site.status) && !checkAllSitesLoading ? 200 : 150">
<template slot-scope="scope">
<el-button size="mini" @click.stop="moveToTopEvent(scope.row)" type="text">置顶</el-button>
<el-button size="mini" @click.stop="editSite(scope.row)" type="text">编辑</el-button>
<!-- 检测时先强制批量检测一遍,如果不强制直接单个检测时第一次不会显示“检测中” -->
<el-button size="mini" v-if="sites.every(site => site.status)" v-show="!checkAllSitesLoading" @click.stop="checkSingleSite(scope.row)" type="text">检测</el-button>
<el-button size="mini" @click.stop="removeEvent(scope.row)" type="text">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!-- 编辑页面 -->
<div>
<el-dialog :visible.sync="dialogVisible" v-if='dialogVisible' :title="dialogType==='edit'?'编辑源':'新增源'" :append-to-body="true" @close="closeDialog">
<el-form :model="siteInfo" ref='siteInfo' label-width="75px" label-position="left" :rules="rules">
<el-form-item label="源站名" prop='name'>
<el-input v-model="siteInfo.name" placeholder="请输入源站名" />
</el-form-item>
<el-form-item label="API接口" prop='api'>
<el-input v-model="siteInfo.api" :autosize="{ minRows: 2, maxRows: 4}" type="textarea" placeholder="请输入API接口地址"/>
</el-form-item>
<el-form-item label="下载接口" prop='download'>
<el-input v-model="siteInfo.download" :autosize="{ minRows: 2, maxRows: 4}" type="textarea" placeholder="请输入Download接口地址可以空着"/>
</el-form-item>
<el-form-item label="解析接口" prop='jiexiUrl'>
<el-input v-model="siteInfo.jiexiUrl" :autosize="{ minRows: 2, maxRows: 4}" type="textarea" placeholder="请输入解析接口地址默认源自带解析,若要调用应用默认解析接口请输入默认或default"/>
</el-form-item>
<el-form-item label="分组" prop='group'>
<el-select v-model="siteInfo.group" allow-create filterable default-first-option placeholder="请输入分组">
<el-option v-for="item in siteGroup" :key="item" :label="item" :value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="源站标识" prop='key'>
<el-input v-model="siteInfo.key" placeholder="请输入源站标识如果为空系统则自动生成" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="closeDialog">取消</el-button>
<el-button type="primary" @click="addOrEditSite">保存</el-button>
</span>
</div>
<div class="detail-body zy-scroll">
<div class="zy-table">
<div class="tBody zy-scroll">
<div class="addSites-box zy-scroll" v-show="showAddSite">
<ul>
<li >
<span class="name">源名称</span>
<span class="name">API接口</span>
<span class="name">DOWNLOAD接口</span>
<span class="operate">
<span class="btn"></span>
<span class="btn"></span>
</span>
</li>
<li>
<span class="name" style="display:inline-block;vertical-align:middle">
<input style="height: 30px" v-model="newSite.name">
</span>
<span class="name" style="display:inline-block;vertical-align:middle">
<input style="height: 30px" v-model="newSite.api">
</span>
<span class="name" style="display:inline-block;vertical-align:middle">
<input style="height: 30px" v-model="newSite.download" placeholder="可以为空">
</span>
<span class="operate">
<span class="btn" @click="addNewSite">添加</span>
<span class="btn" @click="closeAddSite">关闭</span>
</span>
</li>
<li ></li>
</ul>
</div>
<ul>
<draggable v-model="sites" @change="listUpdatedEvent">
<transition-group>
<li v-for="(i, j) in sites" :key="j">
<span class="name">{{i.name}}</span>
<span class="operate">
<span class="btn" @click.stop="removeEvent(i)">删除</span>
</span>
</li>
</transition-group>
</draggable>
</ul>
</div>
</div>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
import { mapMutations } from 'vuex'
import { sites } from '../lib/dexie'
import draggable from 'vuedraggable'
import { sites, setting } from '../lib/dexie'
import zy from '../lib/site/tools'
import { remote } from 'electron'
import fs from 'fs'
import Sortable from 'sortablejs'
export default {
name: 'editSites',
data () {
return {
show: false,
sites: [],
showAddSite: false,
newSite: {
dialogType: 'new',
dialogVisible: false,
siteInfo: {
key: '',
name: '',
api: '',
download: ''
}
download: '',
jiexiUrl: '',
group: '',
isActive: true
},
siteGroup: [],
rules: {
name: [
{ required: true, message: '源站名不能为空', trigger: 'blur' }
],
api: [
{ required: true, message: 'API地址不能为空', trigger: 'blur' }
]
},
enableBatchEdit: false,
batchGroupName: '',
batchIsActive: true,
shiftDown: false,
selectionBegin: '',
selectionEnd: '',
multipleSelection: [],
checkAllSitesLoading: false,
checkProgress: 0,
stopFlag: false,
editOldkey: ''
}
},
components: {
draggable
},
computed: {
setting: {
get () {
@@ -92,109 +170,361 @@ export default {
this.SET_SETTING(val)
}
},
editSites: {
get () {
return this.$store.getters.getEditSites
},
set (val) {
this.SET_EDITSITES(val)
getFilters () {
const groups = [...new Set(this.sites.map(site => site.group))]
const filters = []
groups.forEach(g => {
const doc = {
text: g,
value: g
}
filters.push(doc)
})
return filters
}
},
watch: {
enableBatchEdit () {
if (this.checkAllSitesLoading) {
this.$message.info('正在检测, 请勿操作.')
this.enableBatchEdit = false
}
if (this.enableBatchEdit) {
if (this.setting.shiftTooltipLimitTimes === undefined) this.setting.shiftTooltipLimitTimes = 5
if (this.setting.shiftTooltipLimitTimes) {
this.$message.info('多选时支持shift快捷键')
this.setting.shiftTooltipLimitTimes--
setting.find().then(res => {
res.shiftTooltipLimitTimes = this.setting.shiftTooltipLimitTimes
setting.update(res)
})
}
}
}
},
methods: {
...mapMutations(['SET_SETTING', 'SET_EDITSITES']),
close () {
this.editSites.show = false
...mapMutations(['SET_SETTING']),
excludeR18FilmsChangeEvent () {
setting.find().then(res => {
res.excludeR18Films = this.setting.excludeR18Films
setting.update(res)
})
},
selectionCellClick (selection, row) {
if (this.shiftDown && this.selectionBegin !== '' && selection.includes(row)) {
this.selectionEnd = row.id
const start = this.sites.findIndex(e => e.id === Math.min(this.selectionBegin, this.selectionEnd))
const end = this.sites.findIndex(e => e.id === Math.max(this.selectionBegin, this.selectionEnd))
const selections = this.sites.slice(start, end + 1)
this.$nextTick(() => {
selections.forEach(e => this.$refs.editSitesTable.toggleRowSelection(e, true))
})
this.selectionBegin = this.selectionEnd = ''
return
}
if (selection.includes(row)) {
this.selectionBegin = row.id
} else {
this.selectionBegin = ''
}
},
handleSelectionChange (rows) {
this.multipleSelection = rows
},
handleSortChange (column, prop, order) {
if (this.checkAllSitesLoading) {
this.$message.info('正在检测, 请勿操作.')
return false
}
this.updateDatabase(this.sites)
},
saveBatchEdit () {
this.multipleSelection.forEach(ele => {
if (this.batchGroupName) {
ele.group = this.batchGroupName
}
ele.isActive = this.batchIsActive
})
this.updateDatabase()
},
getSites () {
sites.all().then(res => {
this.sites = res
})
},
getSitesGroup () {
const arr = []
for (const i of this.sites) {
if (arr.indexOf(i.group) < 0) {
arr.push(i.group)
}
}
this.siteGroup = arr
},
addSite () {
if (this.checkAllSitesLoading) {
this.$message.info('正在检测, 请勿操作.')
return false
}
this.getSitesGroup()
this.dialogType = 'new'
this.dialogVisible = true
this.siteInfo = {
key: '',
name: '',
api: '',
download: '',
jiexiUrl: '',
group: '',
isActive: true
}
},
editSite (siteInfo) {
if (this.checkAllSitesLoading) {
this.$message.info('正在检测, 请勿操作.')
return false
}
this.getSitesGroup()
this.dialogType = 'edit'
this.dialogVisible = true
this.siteInfo = siteInfo
this.editOldkey = siteInfo.key
},
closeDialog () {
this.dialogVisible = false
this.getSites()
},
removeEvent (e) {
if (this.checkAllSitesLoading) {
this.$message.info('正在检测, 请勿操作.')
return false
}
sites.remove(e.id).then(res => {
this.getSites()
}).catch(err => {
this.$message.warning('删除源失败, 错误信息: ' + err)
})
},
listUpdatedEvent () {
sites.clear().then(res1 => {
// 重新排序
var id = 1
this.sites.forEach(element => {
element.id = id
sites.add(element)
id += 1
})
})
checkSiteKey (e) {
if (this.dialogType === 'edit' && this.editOldkey === this.siteInfo.key) {
return true
} else {
for (const i of this.sites) {
if (i.key === this.siteInfo.key) {
this.$message.warning(`源站标识: ${i.key} 已存在, 请勿重复填写.`)
return false
}
}
return true
}
},
openAddSite () {
this.showAddSite = true
},
closeAddSite () {
this.showAddSite = false
},
addNewSite () {
if (!this.newSite.name || !this.newSite.api) {
addOrEditSite () {
if (!this.siteInfo.name || !this.siteInfo.api) {
this.$message.error('名称和API接口不能为空。')
return
return false
}
var randomstring = require('randomstring')
var doc = {
key: randomstring.generate(6),
id: this.sites[this.sites.length - 1].id + 1,
name: this.newSite.name,
api: this.newSite.api,
download: this.newSite.download
if (!this.checkSiteKey()) {
return false
}
const randomstring = require('randomstring')
const doc = {
key: this.dialogType === 'edit' ? this.siteInfo.key : this.siteInfo.key ? this.siteInfo.key : randomstring.generate(6),
id: this.dialogType === 'edit' ? this.siteInfo.id : this.sites.length ? this.sites[this.sites.length - 1].id + 1 : 1,
name: this.siteInfo.name,
api: this.siteInfo.api,
download: this.siteInfo.download,
jiexiUrl: this.siteInfo.jiexiUrl,
group: this.siteInfo.group,
isActive: this.siteInfo.isActive
}
if (this.dialogType === 'edit') sites.remove(this.siteInfo.id)
sites.add(doc).then(res => {
this.newSite = {
this.siteInfo = {
key: '',
name: '',
api: '',
download: ''
download: '',
jiexiUrl: '',
group: ''
}
this.$message.success('添加新源成功!')
this.dialogType === 'edit' ? this.$message.success('修改成功!') : this.$message.success('新增源成功!')
this.dialogVisible = false
this.getSites()
})
this.editOldkey = ''
},
exportSites () {
this.getSites()
const arr = [...this.sites]
const str = JSON.stringify(arr, null, 2)
const options = {
filters: [
{ name: 'JSON file', extensions: ['json'] }
]
}
remote.dialog.showSaveDialog(options).then(result => {
if (!result.canceled) {
if (!result.filePath.endsWith('.json')) result.filePath += '.json'
fs.writeFileSync(result.filePath, str)
this.$message.success('已保存成功')
}
}).catch(err => {
this.$message.error(err)
})
},
importSites () {
if (this.checkAllSitesLoading) {
this.$message.info('正在检测, 请勿操作.')
return false
}
const options = {
filters: [
{ name: 'JSON file', extensions: ['json'] }
],
properties: ['openFile', 'multiSelections']
}
remote.dialog.showOpenDialog(options).then(result => {
if (!result.canceled) {
result.filePaths.forEach(file => {
const str = fs.readFileSync(file)
const json = JSON.parse(str)
json.forEach(ele => {
if (ele.api && this.sites.filter(x => x.key === ele.key).length === 0 && this.sites.filter(x => x.name === ele.name && x.api === ele.api).length === 0) {
// 不含该key 同时也不含名字和url一样的
if (ele.isActive === undefined) {
ele.isActive = true
}
if (ele.group === undefined) {
ele.group = '导入'
}
this.sites.push(ele)
}
})
this.resetId(this.sites)
sites.clear().then(sites.bulkAdd(this.sites))
this.$message.success('导入成功')
this.getSites()
})
}
})
},
resetSitesEvent () {
let url = this.setting.sitesDataURL
if (!url) {
// 如果没有设置源站文件链接,使用默认的gitee源
url = 'https://gitee.com/cuiocean/ZY-Player-Resources/raw/main/Sites/Sites.json'
}
const axios = require('axios')
axios.get(url).then(res => {
if (res.status === 200) {
if (res.data.length > 0) {
sites.clear().then(sites.bulkAdd(res.data))
this.$message.success('重置源成功')
this.getSites()
}
}
}).catch(error => {
this.$message.error('导入云端源站失败. ' + error)
})
},
moveToTopEvent (i) {
if (this.checkAllSitesLoading) {
this.$message.info('正在检测, 请勿操作.')
return false
}
this.sites.sort(function (x, y) { return x.key === i.key ? -1 : y.key === i.key ? 1 : 0 })
this.updateDatabase()
},
syncTableData () {
if (this.$refs.editSitesTable.tableData && this.$refs.editSitesTable.tableData.length === this.sites.length) {
this.sites = this.$refs.editSitesTable.tableData
}
},
isActiveChangeEvent (row) {
sites.remove(row.id)
sites.add(row)
},
resetId (inArray) {
let id = 1
inArray.forEach(ele => {
ele.id = id
id += 1
})
},
updateDatabase () {
// 因为el-table的数据是单向绑定,我们先同步el-table里的数据和其绑定的数据
this.syncTableData()
sites.clear().then(res => {
let id = 1
this.sites.forEach(ele => {
ele.id = id
id += 1
})
sites.bulkAdd(this.sites).then(this.getSites())
})
},
removeSelectedSites () {
this.multipleSelection.forEach(e => sites.remove(e.id))
this.$refs.editSitesTable.clearFilter()
this.getSites()
this.updateDatabase()
this.enableBatchEdit = false
},
rowDrop () {
if (this.checkAllSitesLoading) {
this.$message.info('正在检测, 请勿操作.')
return false
}
const tbody = document.getElementById('sites-table').querySelector('.el-table__body-wrapper tbody')
const _this = this
Sortable.create(tbody, {
onEnd ({ newIndex, oldIndex }) {
const currRow = _this.sites.splice(oldIndex, 1)[0]
_this.sites.splice(newIndex, 0, currRow)
_this.updateDatabase()
}
})
},
async checkAllSite () {
if (this.checkAllSitesLoading) return
this.checkAllSitesLoading = true
this.stopFlag = false
this.checkProgress = 0
const uncheckedList = this.sites.filter(e => e.status === undefined || e.status === ' ') // 未检测过的优先
const other = this.sites.filter(e => !uncheckedList.includes(e))
await Promise.all(uncheckedList.map(site => this.checkSingleSite(site)))
await Promise.all(other.map(site => this.checkSingleSite(site))).then(res => {
this.checkAllSitesLoading = false
this.getSites()
if (!this.stopFlag) this.$message.success('视频点播源站批量检测已完成!')
})
},
async checkSingleSite (row) {
row.status = ' '
if (this.stopFlag) {
this.checkProgress += 1
return row.status
}
const flag = await zy.check(row.key)
this.checkProgress += 1
if (flag) {
row.status = '可用'
} else {
row.status = '失效'
row.isActive = false
}
sites.remove(row.id)
sites.add(row)
return row.status
}
},
mounted () {
this.rowDrop()
addEventListener('keydown', code => { if (code.keyCode === 16) this.shiftDown = true })
addEventListener('keyup', code => { if (code.keyCode === 16) this.shiftDown = false })
},
created () {
this.getSites()
}
}
</script>
<style lang="scss" scoped>
.detail{
position: absolute;
left: 80px;
right: 20px;
bottom: 0;
width: calc(100% - 100px);
height: calc(100% - 40px);
z-index: 888;
.detail-content{
height: calc(100% - 10px);
padding: 0 60px;
position: relative;
.detail-header{
width: 100%;
height: 40px;
display: flex;
align-items: center;
justify-content: space-between;
.detail-title{
font-size: 16px;
}
.detail-close{
cursor: pointer;
}
}
}
.detail-body{
height: calc(100% - 50px);
overflow-y: auto;
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
<template>
<div class="frame">
<span class="top" @click="frameClickEvent('top')" title="置顶">
<svg t="1595919317571" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1188" style="width:10px;height:14px"><path d="M43.072 974.72l380.864-301.952 151.936 161.6c0 0 63.424 17.28 67.328-30.72l-3.904-163.584 225.088-259.648 98.048-5.696c0 0 76.928-15.488 21.184-82.752l-275.072-276.928c0 0-74.944-9.6-69.248 59.584l0 75.008L383.552 367.104 225.856 376.64c0 0-57.728 19.2-36.608 69.248l148.16 146.176L43.072 974.72 43.072 974.72z" p-id="1189" :fill="isAlwaysOnTop ? '#555555' : '#ffffff'"></path></svg>
<svg t="1595919317571" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1188" style="width:10px;height:14px"><path d="M43.072 974.72l380.864-301.952 151.936 161.6c0 0 63.424 17.28 67.328-30.72l-3.904-163.584 225.088-259.648 98.048-5.696c0 0 76.928-15.488 21.184-82.752l-275.072-276.928c0 0-74.944-9.6-69.248 59.584l0 75.008L383.552 367.104 225.856 376.64c0 0-57.728 19.2-36.608 69.248l148.16 146.176L43.072 974.72 43.072 974.72z" p-id="1189" :fill="appState.windowIsOnTop ? '#555555' : '#ffffff'"></path></svg>
</span>
<span class="min" @click="frameClickEvent('min')" title="最小化">
<svg t="1595917239849" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1155" style="width:8px;height:14px"><path d="M0 479.936C0 444.64 28.448 416 64.064 416L959.936 416C995.328 416 1024 444.736 1024 479.936L1024 544.064C1024 579.392 995.552 608 959.936 608L64.064 608C28.672 608 0 579.264 0 544.064L0 479.936Z" p-id="1156" fill="#ffffff"></path></svg>
@@ -18,10 +18,14 @@
const { remote } = require('electron')
export default {
name: 'frame',
data () {
const win = remote.getCurrentWindow()
return {
isAlwaysOnTop: win.isAlwaysOnTop()
computed: {
appState: {
get () {
return this.$store.getters.getAppState
},
set (val) {
this.SET_APPSTATE(val)
}
}
},
methods: {
@@ -37,8 +41,8 @@ export default {
win.destroy()
}
if (e === 'top') {
this.isAlwaysOnTop = !this.isAlwaysOnTop
win.setAlwaysOnTop(this.isAlwaysOnTop)
this.appState.windowIsOnTop = !this.appState.windowIsOnTop
win.setAlwaysOnTop(this.appState.windowIsOnTop)
}
}
}

View File

@@ -1,54 +1,136 @@
<template>
<div class="history">
<div class="body zy-scroll">
<div class="zy-table">
<div class="tHeader">
<span class="btn" @click="clearAllHistory">清空</span>
</div>
<div class="tBody zy-scroll">
<ul>
<li v-show="this.history.length === 0">无数据</li>
<li v-show="this.history.length > 0">
<span class="name">名字</span>
<span class="site">片源</span>
<span class="note">观看至</span>
<span class="operate">
<span class="btn"></span>
<span class="btn"></span>
<span class="btn"></span>
<span class="btn"></span>
<div class="listpage" id="history">
<div class="listpage-header" id="history-header">
<el-switch v-model="setting.historyViewMode" active-text="海报" active-value="picture" inactive-text="列表" inactive-value="table" @change="updateViewMode"></el-switch>
<el-button @click.stop="exportHistory" icon="el-icon-upload2" title="导出全部,自动添加扩展名">导出</el-button>
<el-button @click.stop="importHistory" icon="el-icon-download" title="支持同时导入多个文件">导入</el-button>
<el-button @click.stop="removeSelectedItems" icon="el-icon-delete-solid">{{ multipleSelection.length === 0 ? "清空" : "删除所选" }}</el-button>
</div>
<div class="listpage-body" id="history-body">
<div class="show-table" id="history-table" v-if="setting.historyViewMode === 'table'">
<el-table size="mini" fit height="100%"
:data="history"
row-key="id"
ref="historyTable"
@select="selectionCellClick"
@selection-change="handleSelectionChange"
@row-click="detailEvent">
<el-table-column
type="selection">
</el-table-column>
<el-table-column
prop="name"
label="片名">
</el-table-column>
<el-table-column
prop="site"
width="120"
label="片源">
<template slot-scope="scope">
<span>{{ getSiteName(scope.row.site) }}</span>
</template>
</el-table-column>
<el-table-column
prop="index"
width="180"
label="观看至">
<template slot-scope="scope">
<span v-if="scope.row.detail && scope.row.detail.fullList[0].list && scope.row.detail.fullList[0].list.length > 1">
{{ scope.row.index + 1 }}({{scope.row.detail.fullList[0].list.length}})
</span>
</li>
<li v-for="(i, j) in history" :key="j" @click="historyItemEvent(i)">
<span class="name" @click.stop="detailEvent(i)">{{i.name}}</span>
<span class="site">{{getSiteName(i.site)}}</span>
<span class="note">{{i.index+1}}</span>
<span class="operate">
<span class="btn" @click.stop="playEvent(i)">播放</span>
<span class="btn" @click.stop="shareEvent(i)">分享</span>
<span class="btn" @click.stop="downloadEvent(i)">下载</span>
<span class="btn" @click.stop="removeHistoryItem(i)">删除</span>
</span>
</li>
</ul>
</div>
</template>
</el-table-column>
<el-table-column v-if="history.some(e => e.time)"
width="150"
label="时间进度">
<template slot-scope="scope">
<span v-if="scope.row.time && scope.row.duration">{{fmtMSS(scope.row.time.toFixed(0))}}/{{fmtMSS(scope.row.duration.toFixed(0))}}</span>
<span v-if="scope.row.onlinePlay">在线解析</span>
</template>
</el-table-column>
<el-table-column
label="操作"
width="200"
header-align="center"
align="right">
<template slot-scope="scope">
<el-button @click.stop="playEvent(scope.row)" type="text">播放</el-button>
<el-button @click.stop="shareEvent(scope.row)" type="text">分享</el-button>
<el-button @click.stop="downloadEvent(scope.row)" type="text">下载</el-button>
<el-button @click.stop="deleteEvent(scope.row)" type="text">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="show-picture" id="star-picture" v-if="setting.historyViewMode === 'picture'">
<Waterfall ref="historyWaterfall" :list="history" :gutter="20" :width="240"
:breakpoints="{
1200: { //当屏幕宽度小于等于1200
rowPerView: 4,
},
800: { //当屏幕宽度小于等于800
rowPerView: 3,
},
500: { //当屏幕宽度小于等于500
rowPerView: 2,
}
}"
animationDuration="0.5s"
backgroundColor="rgba(0, 0, 0, 0)">
<template slot="item" slot-scope="props">
<div class="card">
<div class="img">
<img v-if="props.data.detail && props.data.detail.pic" style="width: 100%" :src="props.data.detail.pic" alt="" @load="$refs.historyWaterfall.refresh()" @click="detailEvent(props.data)">
<div class="operate">
<div class="operate-wrap">
<span class="o-play" @click="playEvent(props.data)">播放</span>
<span class="o-share" @click="shareEvent(props.data)">分享</span>
<span class="o-star" @click="downloadEvent(props.data)">下载</span>
<span class="o-star" @click="deleteEvent(props.data)">删除</span>
</div>
</div>
</div>
<div class="name" @click="detailEvent(props.data)">{{props.data.name}}</div>
<div class="info">
<span v-if="props.data.time && props.data.duration">
{{fmtMSS(props.data.time.toFixed(0))}}/{{fmtMSS(props.data.duration.toFixed(0))}}
</span>
<span v-if="props.data.onlinePlay">在线解析</span>
<span v-if="props.data.detail && props.data.detail.fullList[0].list !== undefined && props.data.detail.fullList[0].list.length > 1">
{{ props.data.index + 1 }}({{props.data.detail.fullList[0].list.length}})
</span>
</div>
</div>
</template>
</Waterfall>
</div>
</div>
</div>
</div>
</template>
<script>
import { mapMutations } from 'vuex'
import { history, sites } from '../lib/dexie'
import { history, sites, setting } from '../lib/dexie'
import zy from '../lib/site/tools'
import { remote } from 'electron'
import fs from 'fs'
import Waterfall from 'vue-waterfall-plugin'
const { clipboard } = require('electron')
export default {
name: 'history',
data () {
return {
history: history,
sites: []
history: [],
sites: [],
shiftDown: false,
selectionBegin: '',
selectionEnd: '',
multipleSelection: []
}
},
components: {
Waterfall
},
computed: {
view: {
get () {
@@ -81,16 +163,58 @@ export default {
set (val) {
this.SET_SHARE(val)
}
},
setting: {
get () {
return this.$store.getters.getSetting
},
set (val) {
this.SET_SETTING(val)
}
}
},
watch: {
view () {
this.getAllhistory()
this.getAllsites()
if (this.view === 'History') {
this.getAllhistory()
this.getAllsites()
if (this.setting.historyViewMode === 'table') this.showShiftPrompt()
}
}
},
methods: {
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE']),
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE', 'SET_SETTING']),
fmtMSS (s) {
return (s - (s %= 60)) / 60 + (s > 9 ? ':' : ':0') + s
},
selectionCellClick (selection, row) { // 历史id与顺序刚好相反大的反而在前面
if (this.shiftDown && this.selectionBegin !== '' && selection.includes(row)) {
this.selectionEnd = row.id
const start = this.history.findIndex(e => e.id === Math.max(this.selectionBegin, this.selectionEnd))
const end = this.history.findIndex(e => e.id === Math.min(this.selectionBegin, this.selectionEnd))
const selections = this.history.slice(start, end + 1)
this.$nextTick(() => {
selections.forEach(e => this.$refs.historyTable.toggleRowSelection(e, true))
})
this.selectionBegin = this.selectionEnd = ''
return
}
if (selection.includes(row)) {
this.selectionBegin = row.id
} else {
this.selectionBegin = ''
}
},
handleSelectionChange (rows) {
this.multipleSelection = rows
},
removeSelectedItems () {
if (!this.multipleSelection.length) this.multipleSelection = this.history
this.multipleSelection.forEach(e => history.remove(e.id))
this.multipleSelection = []
this.getAllhistory()
this.updateDatabase()
},
detailEvent (e) {
this.detail = {
show: true,
@@ -101,68 +225,73 @@ export default {
}
}
},
playEvent (e) {
history.find({ site: e.site, ids: e.ids }).then(res => {
if (res) {
this.video = { key: res.site, info: { id: res.ids, name: res.name, index: res.index } }
} else {
this.video = { key: e.site, info: { id: e.ids, name: e.name, index: 0 } }
}
})
async playEvent (e) {
const db = await history.find({ site: e.site, ids: e.ids })
if (db) {
this.video = { key: db.site, info: { id: db.ids, name: db.name, index: db.index } }
} else {
this.video = { key: e.site, info: { id: e.ids, name: e.name, index: 0 } }
}
this.view = 'Play'
},
shareEvent (e) {
this.share = {
show: true,
key: e.site,
info: e
info: e.detail
}
},
downloadEvent (e) {
zy.download(e.site, e.ids).then(res => {
if (res && res.dl && res.dl.dd) {
const text = res.dl.dd._t
if (text) {
const list = text.split('#')
let downloadUrl = ''
for (const i of list) {
const url = encodeURI(i.split('$')[1])
downloadUrl += (url + '\n')
}
clipboard.writeText(downloadUrl)
this.$message.success('『MP4』格式的链接已复制, 快去下载吧!')
} else {
this.$message.warning('没有查询到下载链接.')
}
} else {
var m3u8List = {}
zy.detail(e.site, e.ids).then(res => {
const dd = res.dl.dd
const type = Object.prototype.toString.call(dd)
if (type === '[object Array]') {
for (const i of dd) {
if (i._flag.indexOf('m3u8') >= 0) {
m3u8List = i._t.split('#')
}
}
} else {
m3u8List = dd._t.split('#')
}
const list = [...m3u8List]
let downloadUrl = ''
for (const i of list) {
const url = encodeURI(i.split('$')[1])
downloadUrl += (url + '\n')
}
clipboard.writeText(downloadUrl)
this.$message.success('『M3U8』格式的链接已复制, 快去下载吧!')
})
}
zy.download(e.site, e.ids, e.videoFlag).then(res => {
clipboard.writeText(res.downloadUrls)
this.$message.success(res.info)
}).catch((err) => {
this.$message.error(err.info)
})
},
clearAllHistory () {
history.clear().then(res => {
this.history = []
exportHistory () {
this.getAllhistory()
const arr = [...this.history]
const str = JSON.stringify(arr, null, 2)
const options = {
filters: [
{ name: 'JSON file', extensions: ['json'] }
]
}
remote.dialog.showSaveDialog(options).then(result => {
if (!result.canceled) {
if (!result.filePath.endsWith('.json')) result.filePath += '.json'
fs.writeFileSync(result.filePath, str)
this.$message.success('已保存成功')
}
}).catch(err => {
this.$message.error(err)
})
},
importHistory () {
const options = {
filters: [
{ name: 'JSON file', extensions: ['json'] }
],
properties: ['openFile', 'multiSelections']
}
remote.dialog.showOpenDialog(options).then(result => {
if (!result.canceled) {
result.filePaths.forEach(file => {
const str = fs.readFileSync(file)
const json = JSON.parse(str)
json.forEach(record => {
if (record.detail && record.detail.m3u8List) {
record.detail.fullList = [].concat({ flag: 'm3u8', list: record.detail.m3u8List })
delete record.detail.m3u8List
}
})
history.bulkAdd(json).then(res => {
this.$message.success('导入成功')
this.getAllhistory()
})
})
}
})
},
getAllhistory () {
@@ -176,49 +305,60 @@ export default {
})
},
getSiteName (key) {
var site = this.sites.find(e => e.key === key)
const site = this.sites.find(e => e.key === key)
if (site) {
return site.name
}
},
historyItemEvent (e) {
this.video = {
key: e.site,
info: {
id: e.ids,
name: e.name,
type: e.type,
year: e.year,
index: e.index,
time: e.time
}
}
},
removeHistoryItem (e) {
deleteEvent (e) {
history.remove(e.id).then(res => {
this.getAllhistory()
}).catch(err => {
this.$message.warning('删除历史记录失败, 错误信息: ' + err)
})
},
updateDatabase () {
history.clear().then(res => {
let id = length
this.history.forEach(ele => {
ele.id = id
id -= 1
history.add(ele)
})
})
},
updateViewMode () {
if (this.setting.historyViewMode === 'table') {
this.showShiftPrompt()
} else {
setTimeout(() => { if (this.$refs.historyWaterfall) this.$refs.historyWaterfall.refresh() }, 700)
}
setting.find().then(res => {
res.historyViewMode = this.setting.historyViewMode
setting.update(res)
})
},
showShiftPrompt () {
if (this.setting.shiftTooltipLimitTimes === undefined) this.setting.shiftTooltipLimitTimes = 5
if (this.setting.shiftTooltipLimitTimes) {
this.$message.info('多选时支持shift快捷键')
this.setting.shiftTooltipLimitTimes--
setting.find().then(res => {
res.shiftTooltipLimitTimes = this.setting.shiftTooltipLimitTimes
setting.update(res)
})
}
}
},
mounted () {
addEventListener('keydown', code => { if (code.keyCode === 16) this.shiftDown = true })
addEventListener('keyup', code => { if (code.keyCode === 16) this.shiftDown = false })
addEventListener('resize', () => {
setTimeout(() => { if (this.$refs.historyWaterfall) this.$refs.historyWaterfall.resize() }, 500)
})
},
created () {
this.getAllhistory()
}
}
</script>
<style lang="scss" scoped>
.history{
position: relative;
height: calc(100% - 40px);
width: 100%;
display: flex;
justify-content: center;
align-items: center;
border-radius: 5px;
.body{
width: 100%;
height: 100%;
}
}
</style>

660
src/components/IPTV.vue Normal file
View File

@@ -0,0 +1,660 @@
<template>
<div class="listpage" id="iptv">
<div class="listpage-header" id="iptv-header" v-show="!enableBatchEdit">
<el-switch v-model="enableBatchEdit" active-text="批处理及频道调整"></el-switch>
<el-button @click.stop="exportChannels" icon="el-icon-upload2" title="导出m3u时必须手动添加扩展名要保存频道配置信息请选择json格式">导出</el-button>
<el-button @click.stop="importChannels" icon="el-icon-download" title='支持同时导入多个文件,导入m3u时网址可带参数、含有"#"号时自动分割'>导入</el-button>
<el-button @click="checkAllChannels" icon="el-icon-refresh" :loading="checkAllChannelsLoading" title="可在后台运行">检测{{ this.checkAllChannelsLoading ? this.checkProgress + '/' + this.iptvList.length : '' }}</el-button>
<el-button @click.stop="resetChannelsEvent" icon="el-icon-refresh-left">重置</el-button>
</div>
<div class="listpage-header" id="iptv-header" v-show="enableBatchEdit">
<el-switch v-model="enableBatchEdit" active-text="批处理及频道调整"></el-switch>
<el-input placeholder="新组名/新频道名" v-model="inputContent"></el-input>
<el-switch v-model="batchIsActive" active-text="启用"></el-switch>
<el-button type="primary" icon="el-icon-edit" @click.stop="saveBatchEdit" title="输入框组名为空时仅保存开关状态">保存分组与开关状态</el-button>
<el-button type="primary" icon="el-icon-film" @click.stop="mergeChannel" title="勾选单个时可重命名频道">{{ this.multipleSelection.length === 1 ? '频道重命名' : '频道合并' }}</el-button>
<el-button @click.stop="removeSelectedChannels" icon="el-icon-delete-solid">删除</el-button>
</div>
<div class="listpage-body" id="iptv-table">
<div class="show-table" id="iptv-table">
<el-table
ref="iptvTable"
size="mini" fit height="100%" row-key="id"
:data="filteredTableData"
lazy
:load="(row, treeNode, resolve) => resolve(row.channels)"
:tree-props="{hasChildren: 'hasChildren'}"
@expand-change="expandChange"
@select="selectionCellClick"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange">
<el-table-column
type="selection"
v-if="enableBatchEdit">
</el-table-column>
<el-table-column
default-sort="ascending"
prop="name"
:class-name="enableBatchEdit ? 'disableExpand' : ''"
label="频道名">
<template #header>
<el-input
placeholder="搜索"
size="mini"
v-model.trim="searchTxt">
<i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
</template>
</el-table-column>
<el-table-column
prop="isActive"
width="120"
align="center"
:filters = "[{text:'启用', value: true}, {text:'停用', value: false}]"
:filter-method="(value, row) => value === row.isActive"
label="启用">
<template slot-scope="scope">
<el-switch
v-model="scope.row.isActive"
@click.native.stop='isActiveChangeEvent(scope.row)'>
</el-switch>
</template>
</el-table-column>
<el-table-column
sortable
:sort-method="(a , b) => sortByLocaleCompare(a.group, b.group)"
prop="group"
label="分组"
:filters="getFilters"
:filter-method="(value, row) => value === row.group"
filter-placement="bottom-end">
<template slot-scope="scope">
<el-button type="text">{{scope.row.group}}</el-button>
</template>
</el-table-column>
<el-table-column
label="状态"
sortable
:sort-by="['status']"
width="120">
<template slot-scope="scope">
<span v-if="scope.row.status === ' '">
<i class="el-icon-loading"></i>
检测中...
</span>
<span v-else>{{scope.row.status}}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="right"
:width="200">
<template #header>
<span>{{ enableBatchEdit ? `频道总数:${channelList.length}` : `资源总数:${iptvList.length}` }}</span>
</template>
<template slot-scope="scope">
<el-button @click.stop="moveToTopEvent(scope.row)" type="text" v-if="scope.row.channels">置顶</el-button>
<el-button @click.stop="playEvent(scope.row)" type="text">播放</el-button>
<!-- 检测时先强制批量检测一遍,如果不强制直接单个检测时第一次不会显示“检测中”-->
<el-button size="mini" v-if="iptvList.every(channel => channel.status)" v-show="!checkAllChannelsLoading" @click.stop="checkChannel(scope.row)" type="text">检测</el-button>
<el-button @click.stop="removeEvent(scope.row)" type="text">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</template>
<script>
import { mapMutations } from 'vuex'
import { iptv, channelList, setting } from '../lib/dexie'
import { iptv as defaultChannels } from '../lib/dexie/initData'
import zy from '../lib/site/tools'
import { remote } from 'electron'
import fs from 'fs'
import Sortable from 'sortablejs'
export default {
name: 'iptv',
data () {
return {
iptvList: [],
channelList: [],
searchTxt: '',
enableBatchEdit: false,
inputContent: '',
batchIsActive: true,
shiftDown: false,
selectionBegin: '',
selectionEnd: '',
multipleSelection: [],
expandedRows: [],
checkAllChannelsLoading: false,
checkProgress: 0,
stopFlag: false,
sortableTable: ''
}
},
computed: {
view: {
get () {
return this.$store.getters.getView
},
set (val) {
this.SET_VIEW(val)
}
},
setting: {
get () {
return this.$store.getters.getSetting
},
set (val) {
this.SET_SETTING(val)
}
},
video: {
get () {
return this.$store.getters.getVideo
},
set (val) {
this.SET_VIDEO(val)
}
},
filteredTableData () {
if (this.searchTxt) {
return this.channelList.filter(x => x.name.toLowerCase().includes(this.searchTxt.toLowerCase()))
} else {
return this.channelList
}
},
getFilters () {
const groups = [...new Set(this.channelList.map(iptv => iptv.group))]
const filters = []
groups.forEach(g => {
const doc = {
text: g,
value: g
}
filters.push(doc)
})
return filters
}
},
watch: {
enableBatchEdit () {
if (this.checkAllChannelsLoading) {
this.$message.info('正在检测, 请勿操作.')
this.enableBatchEdit = false
return
}
if (this.enableBatchEdit) {
if (this.setting.shiftTooltipLimitTimes === undefined) this.setting.shiftTooltipLimitTimes = 5
if (this.setting.shiftTooltipLimitTimes) {
this.$message.info('多选时支持shift快捷键')
this.setting.shiftTooltipLimitTimes--
setting.find().then(res => {
res.shiftTooltipLimitTimes = this.setting.shiftTooltipLimitTimes
setting.update(res)
})
}
this.$nextTick(() => {
this.expandedRows.forEach(e => this.$refs.iptvTable.toggleRowExpansion(e, false))
})
this.rowDrop()
} else {
this.sortableTable.destroy()
}
}
},
methods: {
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE', 'SET_SETTING']),
sortByLocaleCompare (a, b) {
return a.localeCompare(b, 'zh')
},
selectionCellClick (selection, row) {
if (this.shiftDown && this.selectionBegin !== '' && selection.includes(row)) {
this.selectionEnd = row.id
const start = this.channelList.findIndex(e => e.id === Math.min(this.selectionBegin, this.selectionEnd))
const end = this.channelList.findIndex(e => e.id === Math.max(this.selectionBegin, this.selectionEnd))
const selections = this.channelList.slice(start, end + 1) // 多选时强制不让展开
this.$nextTick(() => {
selections.forEach(e => this.$refs.iptvTable.toggleRowSelection(e, true))
})
this.selectionBegin = this.selectionEnd = ''
return
}
if (selection.includes(row)) {
this.selectionBegin = row.id
} else {
this.selectionBegin = ''
}
},
expandChange (row, expanded) {
const index = this.expandedRows.indexOf(row)
if (expanded && index === -1) {
this.expandedRows.push(row)
} else if (!expanded && index !== -1) {
this.expandedRows.splice(index, 1)
}
},
handleSelectionChange (rows) {
this.multipleSelection = rows
},
handleSortChange (column, prop, order) {
if (this.checkAllChannelsLoading) {
this.$message.info('正在检测, 请勿操作.')
return
}
this.updateDatabase()
},
saveBatchEdit () {
this.multipleSelection.forEach(ele => {
if (this.inputContent) {
ele.group = this.inputContent
}
ele.isActive = this.batchIsActive
})
this.updateDatabase()
},
mergeChannel () {
if (this.inputContent && this.multipleSelection.length) {
let channels = []
const id = this.multipleSelection[0].id
this.multipleSelection.forEach(ele => {
channels = channels.concat(ele.channels)
channels.forEach(e => { e.channelID = id })
channelList.remove(ele.id)
})
const mergeChannel = { id: id, name: this.inputContent, isActive: channels.some(c => c.isActive), group: this.determineGroup(this.inputContent), hasChildren: channels.length > 1, channels: channels }
channelList.add(mergeChannel)
this.getChannelList()
this.updateDatabase()
}
},
playEvent (e) {
if (e.url) {
this.video = { iptv: e }
} else {
let prefer
if (e.prefer) prefer = e.channels.find(c => c.id === e.prefer)
if (!prefer) prefer = e.channels.filter(c => c.isActive)[0]
if (!prefer) {
this.$message.error('当前频道所有源已全部停用,不可播放!')
return
}
this.video = { iptv: prefer }
}
this.view = 'Play'
},
containsearchTxt (i) {
if (this.searchTxt) {
return i.name.toLowerCase().includes(this.searchTxt.toLowerCase())
} else {
return true
}
},
removeEvent (row) {
if (this.checkAllChannelsLoading) {
this.$message.info('正在检测, 请勿操作.')
return false
}
try {
if (row.url) { // tree树形控件节点一旦展开就不再重新加载节点数据
const ele = this.channelList.find(e => e.id === row.channelID)
ele.channels.splice(ele.channels.findIndex(e => e.id === row.id), 1)
channelList.remove(row.channelID)
if (ele.channels.length) {
if (ele.prefer === row.id) delete ele.prefer
if (ele.channels.length === 1) ele.hasChildren = false
channelList.add(ele)
this.$set(this.$refs.iptvTable.store.states.lazyTreeNodeMap, ele.id, ele.channels)
}
} else {
channelList.remove(row.id)
}
this.getChannelList()
} catch (err) {
this.$message.warning('删除频道失败, 错误信息: ' + err)
}
},
exportChannels () { // 导出导入m3u为iptvListjson为channelList
const options = {
filters: [
{ name: 'm3u file', extensions: ['m3u'] },
{ name: 'JSON file', extensions: ['json'] }
]
}
remote.dialog.showSaveDialog(options).then(result => {
if (!result.canceled) {
if (result.filePath.endsWith('m3u')) {
const writer = require('m3u').extendedWriter()
this.iptvList.forEach(e => {
writer.file(e.url, -1, e.name)
})
fs.writeFileSync(result.filePath, writer.toString())
this.$message.success('已保存成功')
} else {
if (!result.filePath.endsWith('.json')) result.filePath += '.json'
const arr = [...this.channelList] // 要保存channelList必须选json
const str = JSON.stringify(arr, null, 2)
fs.writeFileSync(result.filePath, str)
this.$message.success('已保存成功')
}
}
}).catch(err => {
this.$message.error(err)
})
},
importChannels () {
if (this.checkAllChannelsLoading) {
this.$message.info('正在检测, 请勿操作.')
return false
}
const options = {
filters: [
{ name: 'm3u file', extensions: ['m3u', 'm3u8'] },
{ name: 'JSON file', extensions: ['json'] }
],
properties: ['openFile', 'multiSelections']
}
remote.dialog.showOpenDialog(options).then(result => {
if (!result.canceled) {
result.filePaths.forEach(file => {
if (file.endsWith('m3u') || file.endsWith('m3u8')) {
const docs = []
const URL = require('url')
let id = this.channelList.length ? this.channelList.slice(-1)[0].id + 1 : 1
const parser = require('iptv-playlist-parser')
const playlist = fs.readFileSync(file, { encoding: 'utf-8' })
const result = parser.parse(playlist)
const supportFormats = /\.(m3u8|flv)$/
result.items.forEach(ele => {
const urls = ele.url.split('#').filter(e => e.startsWith('http')) // 网址带#时自动分割
urls.forEach(url => {
if (ele.name && url && (supportFormats.test(url) || supportFormats.test(new URL.URL(url).pathname))) { // 网址可能带参数
const doc = {
id: id,
name: ele.name,
url: url,
isActive: true
}
id += 1
docs.push(doc)
}
})
})
// 获取url不重复的列表
const uniqueList = [...new Map(docs.map(item => [item.url, item])).values()]
iptv.clear().then(res => {
iptv.bulkAdd(uniqueList).then(e => { // 支持导入同名频道,群里反馈
this.updateChannelList()
})
})
} else {
// Import Json file
const importedList = JSON.parse(fs.readFileSync(file))
importedList.forEach(ele => {
const commonEle = this.channelList.find(e => e.name === ele.name)
if (commonEle) {
const urls = commonEle.channels.map(c => c.url)
const channels = ele.channels.filter(e => !urls.includes(e.url))
commonEle.channels = commonEle.channels.concat(channels)
} else {
ele.id = this.channelList.length ? this.channelList.slice(-1)[0].id + 1 : 1
this.channelList.push(ele)
}
})
this.updateDatabase()
}
})
this.$message.success('导入成功')
}
})
},
determineGroup (name) {
if (name.toLowerCase().includes('cctv') || name.toLowerCase().includes('cgtn')) {
return '央视'
} else if (name.includes('香港') || name.includes('澳门') || name.includes('台湾') || name.includes('凤凰') || name.includes('翡翠')) {
return '港澳台'
} else if (name.includes('卫视')) {
return '卫视'
} else if (name.includes('高清') || name.includes('蓝光') || name.includes('1080P')) {
return '高清'
} else {
return '其他'
}
},
resetChannelsEvent () {
this.stopFlag = true
if (this.checkAllChannelsLoading) {
this.$message.info('部分检测还未完全终止, 请稍等...')
return
}
this.channelList = []
this.iptvList = []
iptv.clear().then(iptv.bulkAdd(defaultChannels).then(this.updateChannelList()))
},
removeSelectedChannels () {
this.multipleSelection.forEach(e => channelList.remove(e.id))
this.$refs.iptvTable.clearFilter()
this.getChannelList()
this.updateDatabase()
this.enableBatchEdit = false
},
updateChannelList () {
iptv.all().then(res => {
res = res.filter(o => !this.iptvList.find(e => o.url === e.url))
const resClone = JSON.parse(JSON.stringify(res))
const uniqueChannelName = {}
for (let i = 0; i < resClone.length; i++) {
let channelName = resClone[i].name.trim().replace(/[- ]?(1080p|蓝光|超清|高清|标清|hd|cq|4k)(\d{1,2})?$/i, '')
if (channelName.match(/cctv/i)) channelName = channelName.replace('-', '')
if (Object.keys(uniqueChannelName).some(name => channelName.match(new RegExp(`${name}(1080p|4k|(?!\\d))`, 'i')))) continue // 避免重复
const matchRule = new RegExp(`${channelName}(1080p|4k|(?!\\d))`, 'i')
for (let j = i; j < resClone.length; j++) {
if (resClone[j].name.match(/cctv/i)) {
resClone[j].name = resClone[j].name.replace('-', '')
}
if (matchRule.test(resClone[j].name)) {
if (uniqueChannelName[channelName]) {
!uniqueChannelName[channelName].includes(res[j]) && uniqueChannelName[channelName].push(res[j])
} else {
uniqueChannelName[channelName] = [res[j]]
}
}
}
}
res.forEach(ele => {
if (ele.isActive === undefined) {
ele.isActive = true
}
})
Object.keys(uniqueChannelName).forEach(k => {
const ele = this.channelList.find(e => e.name === k)
if (ele) {
ele.channels = ele.channels.concat(uniqueChannelName[k])
delete uniqueChannelName[k]
}
})
if (Object.keys(uniqueChannelName).length) {
let id = this.channelList.length ? this.channelList.slice(-1)[0].id + 1 : 1
const channelList = Object.keys(uniqueChannelName).map(e => { return { id: id++, name: e, isActive: uniqueChannelName[e].some(c => c.isActive), group: this.determineGroup(e), hasChildren: uniqueChannelName[e].length > 1, channels: uniqueChannelName[e] } })
this.channelList = this.channelList.concat(channelList)
}
this.updateDatabase()
iptv.clear() // iptv默认清空状态
})
},
async getChannelList () {
await channelList.all().then(res => {
this.channelList = res
this.getIptvList()
})
},
getIptvList () {
this.iptvList = this.channelList.reduce((result, item) => { item.channels.forEach(e => { e.channelID = item.id }); return result.concat(item.channels) }, [])
},
moveToTopEvent (row) {
if (this.checkAllChannelsLoading) {
this.$message.info('正在检测, 请勿操作.')
return false
}
// this.channelList.sort(function (x, y) { return (x.name === i.name && x.url === i.url) ? -1 : (y.name === i.name && y.url === i.url) ? 1 : 0 })
if (row.channels) {
this.channelList.splice(this.channelList.findIndex(e => e.id === row.id), 1)
this.channelList.unshift(row)
this.updateDatabase()
}
},
syncTableData () {
if (this.$refs.iptvTable.tableData && this.$refs.iptvTable.tableData.length === this.channelList.length) {
this.channelList = this.$refs.iptvTable.tableData
}
},
updateDatabase () {
this.syncTableData()
Object.values(this.$refs.iptvTable.store.states.treeData).forEach(e => { e.loaded = false })
channelList.clear().then(res => {
this.resetId(this.channelList)
channelList.bulkAdd(this.channelList)
this.getChannelList()
})
},
resetId (channelList) {
let id = 1
channelList.forEach(ele => {
ele.id = id
id += 1
ele.channels.forEach(e => {
e.channelID = ele.id
const embedChannelID = ele.id + '_'
const prefer = ele.prefer ? ele.channels.find(e => e.id === ele.prefer) : ''
ele.channels.forEach((e, index) => { e.id = embedChannelID + index }) // 为避免混杂给内置iptv重起id
if (prefer) ele.prefer = prefer.id
})
if (ele.channels.length === 1) {
ele.hasChildren = false
} else {
ele.hasChildren = true
}
})
},
rowDrop () {
if (this.checkAllChannelsLoading) {
this.$message.info('正在检测, 请勿操作.')
return false
}
const tbody = document.getElementById('iptv-table').querySelector('.el-table__body-wrapper tbody')
const _this = this
this.sortableTable = new Sortable(tbody, {
filter: '.el-table__row--level-1', // 禁止children拖动
onEnd ({ newIndex, oldIndex }) {
const currRow = _this.channelList.splice(oldIndex, 1)[0]
_this.channelList.splice(newIndex, 0, currRow)
_this.updateDatabase()
}
})
},
isActiveChangeEvent (row) {
if (row.url) {
const ele = this.channelList.find(e => e.id === row.channelID)
ele.isActive = ele.channels.some(e => e.isActive)
channelList.remove(row.channelID)
channelList.add(ele)
} else {
if (row.channels.length === 1) row.channels[0].isActive = row.isActive
channelList.remove(row.id)
channelList.add(row)
}
},
async checkAllChannels () {
if (this.checkAllChannelsLoading) return
this.checkAllChannelsLoading = true
this.stopFlag = false
this.checkProgress = 0
this.channelList.filter(e => e.channels.length).forEach(e => { e.status = ' '; e.hasCheckedNum = 0 })
const uncheckedList = this.iptvList.filter(e => e.status === undefined || e.status === ' ') // 未检测过的优先
const other = this.iptvList.filter(e => !uncheckedList.includes(e))
await this.checkChannelsBySite(uncheckedList)
await this.checkChannelsBySite(other).then(res => {
this.checkAllChannelsLoading = false
this.getChannelList()
if (!this.stopFlag) this.$message.success('直播频道批量检测已完成!')
})
},
async checkChannelsBySite (channels) {
const siteList = {}
channels.forEach(channel => {
const site = channel.url.split('/')[2]
if (siteList[site]) {
siteList[site].push(channel)
} else {
siteList[site] = [channel]
}
})
await Promise.all(Object.values(siteList).map(site => this.checkSingleSite(site)))
},
async checkSingleSite (channelArray) {
for (const c of channelArray) {
if (this.stopFlag) return false
await this.checkSingleChannel(c)
}
},
async checkSingleChannel (channel, force = false) {
if (this.stopFlag) {
this.checkProgress += 1
return
}
const ele = this.channelList.find(e => e.id === channel.channelID)
if (!force && this.setting.allowPassWhenIptvCheck && (!channel.isActive || !ele.isActive)) {
if (!ele.isActive) {
ele.status = '跳过'
} else if (!channel.isActive) {
channel.status = '跳过'
}
} else {
channel.status = ' '
const flag = await zy.checkChannel(channel.url)
if (flag) {
channel.status = '可用'
} else {
channel.status = '失效'
channel.isActive = false
if (this.setting.autocleanWhenIptvCheck) {
if (ele.prefer === channel.id) delete ele.prefer
ele.channels.splice(ele.channels.findIndex(e => e.id === channel.id), 1)
ele.hasCheckedNum--
}
}
}
this.checkProgress += 1
ele.hasCheckedNum++
if (ele.hasCheckedNum === ele.channels.length) {
if (ele.status === ' ') {
ele.status = ele.channels.some(channel => channel.status === '可用') ? '可用' : '失效'
if (ele.status === '失效') ele.isActive = false
}
channelList.remove(channel.channelID)
if (ele.channels.length === 1) ele.hasChildren = false
if (ele.channels.length) channelList.add(ele)
}
},
async checkChannel (row) {
if (row.channels) {
row.status = ' '
row.hasCheckedNum = 0
row.channels.forEach(e => this.checkSingleChannel(e, true))
} else {
this.checkSingleChannel(row)
}
}
},
mounted () {
addEventListener('keydown', code => { if (code.keyCode === 16) this.shiftDown = true })
addEventListener('keyup', code => { if (code.keyCode === 16) this.shiftDown = false })
},
async created () {
await this.getChannelList()
if (!this.channelList.length) this.resetChannelsEvent()
}
}
</script>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,322 @@
<template>
<div class="listpage" id="recommendations">
<div class="listpage-header" id="recommendations-header">
<el-switch v-model="setting.recommendationViewMode" active-text="海报" active-value="picture" inactive-text="列表" inactive-value="table" @change="updateViewMode"></el-switch>
<el-button type="text">视频数{{ recommendations.length }}</el-button>
<el-select v-model="selectedAreas" size="small" multiple placeholder="地区" popper-class="popper" :popper-append-to-body="false">
<el-option
v-for="item in areas"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
<el-select v-model="selectedTypes" size="small" multiple placeholder="类型" popper-class="popper" :popper-append-to-body="false">
<el-option
v-for="item in types"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
<el-select v-model="sortKeyword" size="small" placeholder="排序" popper-class="popper" :popper-append-to-body="false">
<el-option
v-for="item in sortKeywords"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
<el-button :loading="loading" @click.stop="updateEvent" icon="el-icon-refresh">更新推荐</el-button>
</div>
<div class="listpage-body" id="recommendations-body" >
<div class="show-table" id="star-table" v-if="setting.recommendationViewMode === 'table'">
<el-table size="mini" fit height="100%" row-key="id"
ref="recommendationsTable"
:data="filteredRecommendations"
@row-click="detailEvent">
<el-table-column
prop="name"
label="片名">
</el-table-column>
<el-table-column
prop="detail.area"
label="地区"
width="100">
</el-table-column>
<el-table-column
prop="detail.type"
label="类型"
width="100">
</el-table-column>
<el-table-column
prop="detail.year"
label="上映"
width="100"
align="center">
</el-table-column>
<el-table-column v-if="filteredRecommendations.some(e => e.rate)"
prop="rate"
align="center"
width="100"
label="豆瓣评分">
</el-table-column>
<el-table-column v-if="filteredRecommendations.some(e => e.detail.note)"
prop="detail.note"
label="备注">
</el-table-column>
<el-table-column
label="操作"
header-align="center"
align="right"
width="200">
<template slot-scope="scope">
<el-button @click.stop="playEvent(scope.row)" type="text">播放</el-button>
<el-button @click.stop="shareEvent(scope.row)" type="text">分享</el-button>
<el-button @click.stop="downloadEvent(scope.row)" type="text">下载</el-button>
<el-button @click.stop="deleteEvent(scope.row)" type="text">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="show-picture" id="star-picture" v-if="setting.recommendationViewMode === 'picture'">
<Waterfall ref="recommendationsWaterfall" :list="filteredRecommendations" :gutter="20" :width="240"
:breakpoints="{
1200: { //当屏幕宽度小于等于1200
rowPerView: 4,
},
800: { //当屏幕宽度小于等于800
rowPerView: 3,
},
500: { //当屏幕宽度小于等于500
rowPerView: 2,
}
}"
animationDuration="0.5s"
backgroundColor="rgba(0, 0, 0, 0)">
<template slot="item" slot-scope="props">
<div class="card">
<div class="img">
<div class="rate" v-if="props.data.rate && props.data.rate !== '暂无评分'">
<span>{{props.data.rate}}</span>
</div>
<img style="width: 100%" :src="props.data.detail.pic" alt="" @load="$refs.recommendationsWaterfall.refresh()" @click="detailEvent(props.data)">
<div class="operate">
<div class="operate-wrap">
<span class="o-play" @click="playEvent(props.data)">播放</span>
<span class="o-share" @click="shareEvent(props.data)">分享</span>
<span class="o-star" @click="downloadEvent(props.data)">下载</span>
<span class="o-star" @click="deleteEvent(props.data)">删除</span>
</div>
</div>
</div>
<div class="name" @click="detailEvent(props.data)">{{props.data.name}}</div>
<div class="info">
<span>{{props.data.detail.area}}</span>
<span>{{props.data.detail.year}}</span>
<span>{{props.data.detail.note}}</span>
<span>{{props.data.detail.type}}</span>
</div>
</div>
</template>
</Waterfall>
</div>
</div>
</div>
</template>
<script>
import { mapMutations } from 'vuex'
import { history, recommendation, setting } from '../lib/dexie'
import zy from '../lib/site/tools'
import Waterfall from 'vue-waterfall-plugin'
const { clipboard } = require('electron')
export default {
name: 'recommendations',
data () {
return {
recommendations: [],
sites: [],
loading: false,
types: [],
selectedTypes: [],
areas: [],
selectedAreas: [],
sortKeyword: '',
sortKeywords: ['上映', '评分', '默认']
}
},
components: {
Waterfall
},
computed: {
view: {
get () {
return this.$store.getters.getView
},
set (val) {
this.SET_VIEW(val)
}
},
video: {
get () {
return this.$store.getters.getVideo
},
set (val) {
this.SET_VIDEO(val)
}
},
detail: {
get () {
return this.$store.getters.getDetail
},
set (val) {
this.SET_DETAIL(val)
}
},
share: {
get () {
return this.$store.getters.getShare
},
set (val) {
this.SET_SHARE(val)
}
},
setting: {
get () {
return this.$store.getters.getSetting
},
set (val) {
this.SET_SETTING(val)
}
},
filteredRecommendations () {
let filteredData = this.recommendations.filter(x => (this.selectedAreas.length === 0) || this.selectedAreas.includes(x.detail.area))
filteredData = filteredData.filter(x => (this.selectedTypes.length === 0) || this.selectedTypes.includes(x.detail.type))
return filteredData
}
},
watch: {
view () {
if (this.view === 'Recommendation') {
if (this.$refs.recommendationsWaterfall) this.$refs.recommendationsWaterfall.resize()
}
},
sortKeyword () {
switch (this.sortKeyword) {
case '上映':
this.recommendations = this.recommendations.sort(function (a, b) {
return b.detail.year - a.detail.year
})
break
case '评分':
this.recommendations.sort(function (a, b) {
return b.rate - a.rate
})
break
case '默认':
this.recommendations.sort(function (a, b) {
return b.id - a.id
})
break
default:
break
}
}
},
methods: {
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE', 'SET_SETTING']),
detailEvent (e) {
this.detail = {
show: true,
key: e.key,
info: {
id: e.ids,
name: e.name
}
}
},
updateEvent () {
const url = 'https://gitee.com/cuiocean/ZY-Player-Resources/raw/main/Recommendations/Recommendations.json'
this.loading = true
const axios = require('axios')
axios.get(url).then(res => {
if (res.status === 200) {
if (res.data.length > 0) {
this.recommendations = res.data
recommendation.clear().then(recommendation.bulkAdd(this.recommendations))
this.getFilterData()
this.$message.success('更新推荐成功. 仅根据作者cuiocean个人喜好推荐,不喜请无视.')
}
}
this.loading = false
}).catch(error => {
this.loading = false
this.$message.error('更新推荐失败. ' + error)
this.$message.warning('最新的推荐数据保存在Github上,请考虑使用代理或者等待下一版本内置数据更新.')
})
},
async playEvent (e) {
const db = await history.find({ site: e.key, ids: e.ids })
if (db) {
this.video = { key: e.key, info: { id: db.ids, name: db.name, index: db.index }, detail: db.detail }
} else {
this.video = { key: e.key, info: { id: e.ids, name: e.name, index: 0 }, detail: e.detail }
}
this.view = 'Play'
},
deleteEvent (e) {
recommendation.remove(e.id).then(res => {
if (res) {
this.$message.warning('删除失败')
}
this.getRecommendations()
})
},
shareEvent (e) {
this.share = {
show: true,
key: e.key,
info: e.detail
}
},
async downloadEvent (e) {
const db = await history.find({ site: e.key, ids: e.ids })
let videoFlag
if (db) videoFlag = db.videoFlag
zy.download(e.key, e.ids, videoFlag).then(res => {
clipboard.writeText(res.downloadUrls)
this.$message.success(res.info)
}).catch((err) => {
this.$message.error(err.info)
})
},
getRecommendations () {
recommendation.all().then(res => {
this.recommendations = res.sort(function (a, b) {
return b.id - a.id
})
this.getFilterData()
})
},
getFilterData () {
this.types = [...new Set(this.recommendations.map(ele => ele.detail.type))].filter(x => x)
this.areas = [...new Set(this.recommendations.map(ele => ele.detail.area))].filter(x => x)
},
updateViewMode () {
setTimeout(() => { if (this.$refs.recommendationsWaterfall) this.$refs.recommendationsWaterfall.refresh() }, 700)
setting.find().then(res => {
res.recommendationViewMode = this.setting.recommendationViewMode
setting.update(res)
})
}
},
created () {
this.getRecommendations()
},
mounted () {
addEventListener('resize', () => {
setTimeout(() => { if (this.$refs.recommendationsWaterfall) this.$refs.recommendationsWaterfall.resize() }, 500)
})
}
}
</script>

View File

@@ -5,21 +5,10 @@
<div class="info">
<a @click="linkOpen('http://zyplayer.fun/')">官网</a>
<a @click="linkOpen('https://github.com/Hunlongyu/ZY-Player')">Github</a>
<a @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/issues')">v{{pkg.version}} 反馈</a>
</div>
<div class="view">
<div class="title">视图</div>
<div class="view-box">
<div class="zy-select" @mouseleave="show.view = false">
<div class="vs-placeholder" @click="show.view = true">默认视图</div>
<div class="vs-options" v-show="show.view">
<ul class="zy-scroll">
<li :class="d.view === 'picture' ? 'active' : ''" @click="changeView('picture')">海报</li>
<li :class="d.view === 'table' ? 'active' : ''" @click="changeView('table')">列表</li>
</ul>
</div>
</div>
</div>
<a @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/releases/tag/v' + pkg.version)">v{{pkg.version}}更新日志</a>
<a @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/issues/80')">常见问题</a>
<a @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/issues')">反馈建议</a>
<a style="color:#38dd77" @click="openUpdate()" v-show="update.find" >最新版本v{{update.version}}</a>
</div>
<div class="shortcut">
<div class="title">快捷键</div>
@@ -40,29 +29,23 @@
<div class="vs-placeholder vs-noAfter" @click="impShortcut">导入</div>
</div>
<div class="zy-select">
<div class="vs-placeholder vs-noAfter" @click="openDoc('shortcut')">说明文档</div>
<div class="vs-placeholder vs-noAfter" @click="resetShortcut">重置</div>
</div>
</div>
</div>
<div class='site'>
<div class="title">收藏管理</div>
<div class="site-box">
<div class="zy-select">
<div class="vs-placeholder vs-noAfter" @click="exportFavorites">导出</div>
</div>
<div class="zy-select">
<div class="vs-placeholder vs-noAfter" @click="importFavorites">导入</div>
</div>
<div class="zy-select">
<div class="vs-placeholder vs-noAfter" @click="clearFavorites">清空收藏</div>
</div>
<div class="shortcut" title="清理缓存后图片资源需重新下载,不建议清理,软件会根据磁盘空间动态管理缓存大小">
<div class="title">缓存</div>
<div class="shortcut-box">
<div class="zy-select">
<div class="vs-placeholder vs-noAfter" @click="clearCache">清理缓存</div>
</div>
</div>
</div>
<div class='search'>
<div class="title">搜索</div>
<div class="zy-checkbox">
<input type="checkbox" v-model="setting.searchAllSites" @change="updateSearchOption($event)"> 搜索所有资源
</div>
<div class="site">
<div class="title">定位时间设置</div>
<div class="zy-input">
/右方向键:<input style="width:50px" type="number" v-model = "d.forwardTimeInSec" @change="updateSettingEvent">
</div>
</div>
<div class='site'>
<div class="title">第三方播放</div>
@@ -70,30 +53,63 @@
<div class="zy-select">
<div class="vs-placeholder vs-noAfter" @click="selectLocalPlayer">选择本地播放器</div>
</div>
<div class="zy-select" @click = "editPlayerPath = true">
<div class="vs-placeholder vs-noAfter" v-show = "editPlayerPath == false">
<div class="zy-select" @click = "show.editPlayerPath = true">
<div class="vs-placeholder vs-noAfter" v-show = "show.editPlayerPath == false">
<label>编辑</label>
</div>
<input class="vs-input" v-show = "editPlayerPath == true" v-model = "externalPlayer"
@blur= "updatePlayerPath"
@keyup.enter = "updatePlayerPath">
<input class="zy-input" v-show = "show.editPlayerPath == true" v-model = "d.externalPlayer"
@blur= "updateSettingEvent"
@keyup.enter = "updateSettingEvent">
</div>
</div>
</div>
<div class="site">
<div class="title">直播源管理</div>
<div class="site-box">
<div class="zy-select">
<div class="vs-placeholder vs-noAfter" @click="view = 'IPTV'">编辑直播源</div>
</div>
<div class="zy-input">
<input type="checkbox" v-model = "d.allowPassWhenIptvCheck" @change="updateSettingEvent"> 检测时自动跳过停用源
</div>
<div class="zy-input">
<input type="checkbox" v-model = "d.autocleanWhenIptvCheck" @change="updateSettingEvent"> 检测时自动清理无效源
</div>
<div class="zy-input">
<input type="checkbox" v-model = "d.autoChangeSourceWhenIptvStalling" @change="updateSettingEvent">
卡顿时自动换源换台:<input style="width:50px" type="number" min=0 v-model.number = "d.waitingTimeInSec" @change="updateSettingEvent">
</div>
</div>
</div>
<div class="site">
<div class="title">源管理</div>
<div class="site-box">
<div class="zy-select">
<div class="vs-placeholder vs-noAfter" @click="exportSites">导出</div>
</div>
<div class="zy-select">
<div class="vs-placeholder vs-noAfter" @click="importSites">导入</div>
</div>
<div class="zy-select">
<div class="vs-placeholder vs-noAfter" @click="editSitesEvent">编辑源</div>
</div>
<div class="zy-select">
<div class="vs-placeholder vs-noAfter" @click="resetSites">重置源</div>
<div class="vs-placeholder vs-noAfter" @click="show.configDefaultParseUrlDialog = true">设置默认解析接口</div>
</div>
<div class="zy-select">
<div class="vs-placeholder vs-noAfter" @click="show.configSitesDataUrlDialog = true">设置源站接口文件</div>
</div>
<div class="zy-input" @click="toggleExcludeRootClasses">
<input type="checkbox" v-model = "d.excludeRootClasses" @change="updateSettingEvent"> 屏蔽主分类
</div>
</div>
</div>
<div class="site">
<div class="title">网络</div>
<div class="site-box">
<div class="zy-select" @mouseleave="show.proxy = false">
<div class="vs-placeholder" @click="show.proxy = true">代理设置</div>
<div class="vs-options" v-if="show.proxy">
<ul class="zy-scroll">
<li :class="d.proxy.type === 'none' ? 'active' : ''" @click="changeProxyType('none')">不使用代理</li>
<!-- <li :class="d.proxy.type === 'system' ? 'active' : ''" @click="changeProxyType('system')">使用系统代理</li> -->
<li :class="d.proxy.type === 'manual' ? 'active' : ''" @click="changeProxyType('manual')">手动指定代理</li>
</ul>
</div>
</div>
</div>
</div>
@@ -129,56 +145,170 @@
<div class="qrcode">
<div class="title">请作者吃辣条</div>
<div class="qrcode-box">
<img class="qrcode-item" src="../assets/image/alipay.png">
<img class="qrcode-item" src="../assets/image/wepay.jpg">
<img class="qrcode-item" src="../assets/image/wepay-hunlongyu.png">
<img class="qrcode-item" src="../assets/image/wepay_cuiocean.jpg">
</div>
</div>
<div class="clearDB">
<span @click="clearDBEvent" class="clearBtn">软件重置</span>
<span class="clearTips">如果新安装用户, 无法显示资源, 请点击软件重置. 如非必要, 切勿点击. 会清空用户数据, 恢复默认设置. 点击即软件重置, 并关闭软件.</span>
<span @click="changePasswordEvent" class="clearBtn">设置密码</span>
<div class="clearTips">如果新安装用户, 无法显示资源, 请点击软件重置. 如非必要, 切勿点击. 会清空用户数据, 恢复默认设置. 点击即软件重置, 并关闭软件.</div>
</div>
<div class="Tips">
<span>所有资源来自网上, 该软件不参与任何制作, 上传, 储存等内容, 禁止传播违法资源. 该软件仅供学习参考, 请于安装后24小时内删除.</span>
</div>
</div>
<div> <!-- 设置默认解析接口 -->
<el-dialog :visible.sync="show.configDefaultParseUrlDialog" v-if='show.configDefaultParseUrlDialog' title="设置默认解析接口" :append-to-body="true" @close="closeDialog">
<el-form label-width="45px" label-position="left">
<el-form-item label="URL:">
<el-input v-model="setting.defaultParseURL" :autosize="{ minRows: 2, maxRows: 4}" type="textarea" placeholder="请输入解析接口地址,为空时会自动设置,重置时会自动更新默认接口地址"/>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="closeDialog">取消</el-button>
<el-button type="danger" @click="get7kParseURL">重置</el-button>
<el-button type="primary" @click="configDefaultParseURL">确定</el-button>
</span>
</el-dialog>
</div>
<div> <!-- 设置源站接口文件 -->
<el-dialog :visible="show.configSitesDataUrlDialog" v-if='show.configSitesDataUrlDialog' title="设置源站接口文件" :append-to-body="true" @close="closeDialog">
<el-form label-width="45px" label-position="left">
<el-form-item label="URL:">
<el-input v-model="setting.sitesDataURL" :autosize="{ minRows: 2, maxRows: 4}" type="textarea" placeholder="请输入解析接口地址,为空时会自动设置,重置时会自动更新默认接口地址"/>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="closeDialog">取消</el-button>
<el-button type="danger" @click="getDefaultdeSitesDataURL">重置</el-button>
<el-button type="primary" @click="configSitesDataURL">确定</el-button>
</span>
</el-dialog>
</div>
<div> <!-- 输入密码页面 -->
<el-dialog :visible.sync="show.checkPasswordDialog" v-if='show.checkPasswordDialog' :append-to-body="true" @close="closeDialog" width="300px">
<el-form label-width="75px" label-position="left">
<el-form-item label="当前密码" prop='name'>
<el-input v-model="inputPassword" placeholder="请输入您的当前密码" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="closeDialog">取消</el-button>
<el-button type="primary" @click="checkPasswordEvent">确定</el-button>
</span>
</el-dialog>
</div>
<div> <!-- 修改密码页面 -->
<el-dialog :visible.sync="show.changePasswordDialog" v-if='show.changePasswordDialog' :append-to-body="true" @close="closeDialog" width="300px">
<el-form label-width="75px" label-position="left">
<el-form-item label="新密码" prop='name'>
<el-input v-model="inputPassword" placeholder="请输入您的新密码" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="closeDialog">取消</el-button>
<el-button type="primary" @click="confirmedChangePasswordEvent">确定</el-button>
</span>
</el-dialog>
</div>
<div> <!-- 代理设置界面 -->
<el-dialog :visible.sync="show.proxyDialog" :append-to-body="true" @close="closeDialog" width="400px">
<el-form label-width="50px" label-position="left" size="small">
<el-form-item label="协议: " prop='scheme'>
<el-col :span="15">
<el-select v-model="proxy.scheme" placeholder="请选择协议类型">
<el-option label="http" value="http"></el-option>
<el-option label="socks5" value="socks5"></el-option>
</el-select>
</el-col>
</el-form-item>
<el-form-item label="地址: " prop='url'>
<el-col :span="15">
<el-input v-model="proxy.url" placeholder="地址" />
</el-col>
<el-col class="line" :span="2" style="text-align: center;">:</el-col>
<el-col :span="7">
<el-input v-model="proxy.port" placeholder="端口" width="80px" />
</el-col>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="closeDialog">取消</el-button>
<el-button type="primary" @click="proxyConfirm">确定</el-button>
</span>
</el-dialog>
</div>
<div class="update" v-if="update.show">
<div class="wrapper">
<div class="body">
<div class="content" v-html="update.html"></div>
</div>
<div class="footer">
<el-button size="small" @click="closeUpdate">关闭</el-button>
<el-button size="small" v-show="update.showDownload" @click="startUpdate">更新</el-button>
<el-button size="small" v-show="!update.showDownload && !update.downloaded">正在更新...</el-button>
<el-button size="small" v-show="update.downloaded" @click="installUpdate">安装</el-button>
</div>
</div>
</div>
</div>
</template>
<script>
import { mapMutations } from 'vuex'
import pkg from '../../package.json'
import { setting, sites, shortcut, star } from '../lib/dexie'
import { shell, clipboard, remote } from 'electron'
import { setting, sites, shortcut } from '../lib/dexie'
import { localKey as defaultShortcuts } from '../lib/dexie/initData'
import { shell, clipboard, remote, ipcRenderer } from 'electron'
import db from '../lib/dexie/dexie'
import { sites as defaultSites } from '../lib/dexie/initData'
import fs from 'fs'
import zy from '../lib/site/tools'
export default {
name: 'setting',
data () {
return {
pkg: pkg,
sitesList: [],
shortcutList: [],
favoritesList: [],
show: {
site: false,
shortcut: false,
view: false
view: false,
editPlayerPath: false,
checkPasswordDialog: false,
changePasswordDialog: false,
proxy: false,
proxyDialog: false,
configDefaultParseUrlDialog: false,
configSitesDataUrlDialog: false
},
externalPlayer: '',
editPlayerPath: false,
d: {
id: 0,
site: '',
theme: '',
shortcut: true,
searchAllSites: true,
view: 'picture',
externalPlayer: '',
editPlayerPath: false
d: { },
latestVersion: pkg.version,
inputPassword: '',
action: '',
proxy: {
type: '',
scheme: '',
url: '',
port: ''
},
update: {
find: false,
version: '',
show: false,
html: '',
downloaded: false,
showDownload: true
}
}
},
computed: {
view: {
get () {
return this.$store.getters.getView
},
set (val) {
this.SET_VIEW(val)
}
},
setting: {
get () {
return this.$store.getters.getSetting
@@ -186,39 +316,40 @@ export default {
set (val) {
this.SET_SETTING(val)
}
},
editSites: {
get () {
return this.$store.getters.getEditSites
},
set (val) {
this.SET_EDITSITES(val)
}
}
},
methods: {
...mapMutations(['SET_SETTING', 'SET_EDITSITES']),
...mapMutations(['SET_SETTING', 'SET_VIEW']),
linkOpen (e) {
shell.openExternal(e)
},
getSetting () {
setting.find().then(res => {
this.d = {
id: res.id,
site: res.site,
theme: res.theme,
shortcut: res.shortcut,
view: res.view,
searchAllSites: res.searchAllSites,
externalPlayer: res.externalPlayer,
editPlayerPath: false
}
this.d = res
this.setting = this.d
if (!this.setting.defaultParseURL) this.configDefaultParseURL()
if (!this.setting.sitesDataURL) this.getDefaultdeSitesDataURL()
})
},
getDefaultSites () {
this.getDefaultdeSitesDataURL()
const axios = require('axios')
axios.get(this.setting.sitesDataURL).then(res => {
if (res.status === 200) {
if (res.data.length > 0) {
sites.clear().then(sites.bulkAdd(res.data))
}
}
}).catch(error => {
this.$message.error('获取云端源站失败. ' + error)
})
},
getSites () {
sites.all().then(res => {
this.sitesList = res
if (res.length <= 0) {
this.$message.warning('检测到视频源未能正常加载, 即将重置源.')
this.getDefaultSites()
}
})
},
getShortcut () {
@@ -226,104 +357,49 @@ export default {
this.shortcutList = res
})
},
getFavorites () {
star.all().then(res => {
this.favoritesList = res
})
async clearCache () {
const win = remote.getCurrentWindow()
const ses = win.webContents.session
const size = await ses.getCacheSize() / 1024 / 1024
const mb = size.toFixed(2)
await ses.clearCache()
this.$message.success(`清除缓存成功, 共清理 ${mb} MB`)
},
changeView (e) {
this.d.view = e
setting.update(this.d).then(res => {
this.$message.success('修改成功')
this.show.view = false
this.setting = this.d
})
updateSettingEvent () {
this.show.editPlayerPath = false
this.setting = this.d
setting.update(this.d)
},
siteClick (e) {
this.d.site = e
setting.update(this.d).then(res => {
this.$message.success('修改默认源成功')
this.setting = this.d
this.show.site = false
})
toggleExcludeR18Films () {
this.d.excludeR18Films = !this.d.excludeR18Films
this.updateSettingEvent()
},
updateSearchOption (e) {
this.d.searchAllSites = this.setting.searchAllSites
setting.update(this.d).then(res => {
this.setting = this.d
})
toggleExcludeRootClasses () {
this.d.excludeRootClasses = !this.d.excludeRootClasses
this.updateSettingEvent()
},
exportFavorites () {
this.getFavorites()
const arr = [...this.favoritesList]
const str = JSON.stringify(arr, null, 4)
const options = {
filters: [
{ name: 'JSON file', extensions: ['json'] },
{ name: 'Normal text file', extensions: ['txt'] },
{ name: 'All types', extensions: ['*'] }
]
async get7kParseURL () {
this.$message.info('正在获取7K源解析地址...')
const parseURL = await zy.get7kParseURL()
if (parseURL.startsWith('http')) {
this.$message.success('获取成功,更新应用默认解析接口地址...')
this.setting.defaultParseURL = parseURL
}
remote.dialog.showSaveDialog(options).then(result => {
if (!result.canceled) {
fs.writeFileSync(result.filePath, str)
this.$message.success('已保存成功')
}
}).catch(err => {
this.$message.error(err)
})
},
importFavorites () {
const options = {
filters: [
{ name: 'JSON file', extensions: ['json'] },
{ name: 'Normal text file', extensions: ['txt'] },
{ name: 'All types', extensions: ['*'] }
],
properties: ['openFile', 'multiSelections']
}
remote.dialog.showOpenDialog(options).then(result => {
if (!result.canceled) {
result.filePaths.forEach(file => {
var str = fs.readFileSync(file)
const json = JSON.parse(str)
star.bulkAdd(json).then(e => {
this.getFavorites()
})
this.upgradeFavorites()
})
this.$message.success('导入收藏成功')
}
}).catch(err => {
this.$message.error(err)
})
async configDefaultParseURL () {
if (!this.setting.defaultParseURL) await this.get7kParseURL()
this.d.defaultParseURL = this.setting.defaultParseURL.trim()
this.show.configDefaultParseUrlDialog = false
this.updateSettingEvent()
},
clearFavorites () {
star.clear().then(e => {
this.getFavorites()
this.$message.success('清空所有收藏成功')
})
getDefaultdeSitesDataURL () {
this.setting.sitesDataURL = 'https://gitee.com/cuiocean/ZY-Player-Resources/raw/main/Sites/Sites.json'
},
upgradeFavorites () {
star.all().then(res => {
res.forEach(element => {
const docs = {
key: element.key,
ids: element.ids,
name: element.name,
type: element.type,
year: element.year,
last: element.last,
note: element.note
}
star.find({ key: element.key, ids: element.ids }).then(res => {
if (!res) {
star.add(docs)
}
})
})
this.getFavorites()
})
configSitesDataURL () {
if (!this.setting.sitesDataURL) this.getDefaultdeSitesDataURL()
this.d.sitesDataURL = this.setting.sitesDataURL
this.show.configSitesDataUrlDialog = false
this.updateSettingEvent()
},
selectLocalPlayer () {
const options = {
@@ -335,13 +411,10 @@ export default {
}
remote.dialog.showOpenDialog(options).then(result => {
if (!result.canceled) {
var playerPath = result.filePaths[0].replace(/\\/g, '/')
const playerPath = result.filePaths[0].replace(/\\/g, '/')
this.$message.success('设定第三方播放器路径为:' + result.filePaths[0])
this.d.externalPlayer = playerPath
this.externalPlayer = playerPath
setting.update(this.d).then(res => {
this.setting = this.d
})
this.updateSettingEvent()
}
}).catch(err => {
this.$message.error(err)
@@ -350,101 +423,76 @@ export default {
resetLocalPlayer () {
this.d.externalPlayer = ''
setting.update(this.d).then(res => {
this.setting = this.d
this.updateSettingEvent()
this.$message.success('重置第三方播放器成功')
})
},
updatePlayerPath () {
this.$message.success('设定第三方播放器路径为:' + this.externalPlayer)
this.editPlayerPath = false
this.d.externalPlayer = this.externalPlayer
setting.update(this.d).then(res => {
this.setting = this.d
})
},
exportSites () {
this.getSites()
const arr = [...this.sitesList]
const str = JSON.stringify(arr, null, 4)
const options = {
filters: [
{ name: 'JSON file', extensions: ['json'] },
{ name: 'Normal text file', extensions: ['txt'] },
{ name: 'All types', extensions: ['*'] }
]
}
remote.dialog.showSaveDialog(options).then(result => {
if (!result.canceled) {
fs.writeFileSync(result.filePath, str)
this.$message.success('已保存成功')
}
}).catch(err => {
this.$message.error(err)
})
},
importSites () {
const options = {
filters: [
{ name: 'JSON file', extensions: ['json'] },
{ name: 'Normal text file', extensions: ['txt'] },
{ name: 'All types', extensions: ['*'] }
],
properties: ['openFile']
}
remote.dialog.showOpenDialog(options).then(result => {
if (!result.canceled) {
sites.clear()
result.filePaths.forEach(file => {
var str = fs.readFileSync(file)
const json = JSON.parse(str)
sites.bulkAdd(json).then(e => {
this.getSites()
this.d.site = json[0].key
setting.update(this.d).then(res => {
this.setting = this.d
})
})
this.$message.success('导入成功')
}).catch(err => {
this.$message.error(err)
})
}
})
this.$message.success('设定第三方播放器路径为:' + this.d.externalPlayer)
this.show.editPlayerPath = false
this.updateSettingEvent()
},
editSitesEvent () {
this.editSites = {
show: true,
sites: this.sitesList
if (this.d.password) {
this.action = 'EditSites'
this.show.checkPasswordDialog = true
} else {
this.view = 'EditSites'
}
},
resetSites () {
sites.clear()
sites.bulkAdd(defaultSites).then(e => {
this.getSites()
this.d.site = defaultSites[0].key
setting.update(this.d).then(res => {
this.setting = this.d
this.$message.success('重置源成功')
})
})
async closeDialog () {
this.show.checkPasswordDialog = false
this.show.changePasswordDialog = false
this.show.configDefaultParseUrlDialog = false
this.show.configSitesDataUrlDialog = false
if (this.show.proxyDialog) {
this.show.proxyDialog = false
this.setting.proxy.type = 'none'
await this.updateSettingEvent()
this.$message.info('取消使用代理')
zy.proxy()
}
this.inputPassword = ''
},
checkPasswordEvent () {
if (this.inputPassword === this.d.password) {
this.closeDialog()
if (this.action === 'EditSites') {
this.view = 'EditSites'
} else if (this.action === 'ChangePassword') {
this.show.changePasswordDialog = true
} else if (this.action === 'CleanDB') {
this.clearDB()
}
} else {
this.$message.error('您输入的密码错误,请重试')
}
},
changePasswordEvent () {
if (this.d.password) {
this.action = 'ChangePassword'
this.show.checkPasswordDialog = true
} else {
this.show.changePasswordDialog = true
}
},
confirmedChangePasswordEvent () {
this.d.password = this.inputPassword
this.updateSettingEvent()
this.closeDialog()
},
changeTheme (e) {
this.d.theme = e
setting.update(this.d).then(res => {
this.$message.success('修改成功')
})
this.updateSettingEvent()
},
changeShortcut (e) {
this.d.shortcut = e
setting.update(this.d).then(res => {
this.$message.success('修改成功')
this.setting = this.d
this.show.shortcut = false
})
this.updateSettingEvent()
this.show.shortcut = false
},
expShortcut () {
const arr = [...this.shortcutList]
const str = JSON.stringify(arr, null, 4)
const str = JSON.stringify(arr, null, 2)
clipboard.writeText(str)
this.$message.success('已复制到剪贴板')
},
@@ -455,11 +503,50 @@ export default {
this.$message.info('已清空原数据')
shortcut.add(json).then(e => {
this.$message.success('已添加成功')
this.getSites()
this.getShortcut()
this.d.shortcutModified = true
this.updateSettingEvent()
})
})
},
resetShortcut () {
shortcut.clear().then(shortcut.add(defaultShortcuts)).then(res => {
this.getShortcut()
this.$message.success('快捷键已重置')
this.d.shortcutModified = true
this.updateSettingEvent()
})
},
async changeProxyType (e) {
this.d.proxy.type = e
if (e === 'manual') {
this.show.proxyDialog = true
this.proxy.scheme = this.setting.proxy.scheme
this.proxy.url = this.setting.proxy.url
this.proxy.port = this.setting.proxy.port
}
await this.updateSettingEvent()
this.show.proxy = false
zy.proxy()
},
async proxyConfirm () {
this.d.proxy.scheme = this.proxy.scheme
this.d.proxy.url = this.proxy.url
this.d.proxy.port = this.proxy.port
await this.updateSettingEvent()
this.show.proxyDialog = false
zy.proxy()
this.$message.info('开始使用代理')
},
clearDBEvent () {
if (this.d.password) {
this.action = 'CleanDB'
this.show.checkPasswordDialog = true
} else {
this.clearDB()
}
},
clearDB () {
db.delete().then(res => {
this.$message.success('重置成功')
const win = remote.getCurrentWindow()
@@ -475,13 +562,50 @@ export default {
this.linkOpen('http://zyplayer.fun/doc/shortcut/')
return false
}
},
checkUpdate () {
ipcRenderer.send('checkForUpdate')
ipcRenderer.on('update-available', (e, info) => {
this.update.find = true
this.update.version = info.version
this.update.html = info.releaseNotes
})
},
openUpdate () {
this.update.show = true
},
closeUpdate () {
this.update.show = false
},
startUpdate () {
this.update.showDownload = false
ipcRenderer.send('downloadUpdate')
ipcRenderer.on('update-downloaded', () => {
this.update.downloaded = true
this.$message.success('更新已下载完成Mac用户须手动点击“安装”其它系统会在退出后自动安装')
})
},
installUpdate () {
ipcRenderer.send('quitAndInstall')
},
createContextMenu () {
const { Menu, MenuItem } = remote
const menu = new Menu()
menu.append(new MenuItem({ label: '快速复制', role: 'copy' }))
menu.append(new MenuItem({ label: '快速粘贴', role: 'paste' }))
menu.append(new MenuItem({ label: '编辑', role: 'editMenu' }))
window.addEventListener('contextmenu', e => {
e.preventDefault()
menu.popup(remote.getCurrentWindow())
})
}
},
created () {
this.getSetting()
this.getSites()
this.getSetting()
this.getShortcut()
this.getFavorites()
this.checkUpdate()
this.createContextMenu()
}
}
</script>
@@ -518,22 +642,6 @@ export default {
cursor: pointer;
}
}
.view{
width: 100%;
padding: 20px;
margin-top: 20px;
.view-box{
margin-top: 10px;
.zy-select{
margin-right: 20px;
}
}
}
.search{
width: 100%;
padding: 20px;
margin-top: 20px;
}
.site{
width: 100%;
padding: 20px;
@@ -618,9 +726,9 @@ export default {
line-height: 32px;
}
.clearTips{
margin: 10px 0 0 20px;
font-size: 12px;
color: #ff000088;
margin-left: 10px;
}
}
.Tips{
@@ -628,5 +736,28 @@ export default {
font-size: 12px;
color: #ff000066;
}
.update{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(7, 17, 27, 0.7);
display: flex;
align-items: center;
justify-content: center;
.wrapper{
background-color: #fff;
padding: 20px 50px 40px;
border-radius: 4px;
max-width: 500px;
max-height: 90%;
overflow: auto;
.footer{
display: flex;
justify-content: flex-end;
}
}
}
}
</style>

View File

@@ -1,11 +1,11 @@
<template>
<div class="share" id="share" @click="shareClickEvent">
<div class="share" id="share" @click="shareClickEvent" v-clickoutside="shareClickEvent">
<div class="left">
<img :src="pic" alt="" @load="picLoadEvent">
<img :src="share.info.pic" alt="">
</div>
<div class="right" id="right">
<div class="title">{{ share.info.name }}</div>
<qrcode-vue id="qr" :value="link" :size="160" level="L" />
<qrcode-vue v-if="link !== ''" id="qr" :value="link" :size="160" level="L" />
<div class="tips">
<p>长按二维码识别播放</p>
<p><img src="@/assets/image/logo.png"></p>
@@ -22,6 +22,7 @@ import { mapMutations } from 'vuex'
import QrcodeVue from 'qrcode.vue'
import html2canvas from 'html2canvas'
import zy from '../lib/site/tools'
import Clickoutside from 'element-ui/src/utils/clickoutside'
const { clipboard, nativeImage } = require('electron')
export default {
name: 'share',
@@ -44,6 +45,14 @@ export default {
set (val) {
this.SET_SHARE(val)
}
},
DetailCache: {
get () {
return this.$store.getters.getDetailCache
},
set (val) {
this.SET_DetailCache(val)
}
}
},
watch: {
@@ -56,45 +65,44 @@ export default {
deep: true
}
},
directives: {
Clickoutside
},
methods: {
...mapMutations(['SET_SHARE']),
...mapMutations(['SET_SHARE', 'SET_DetailCache']),
shareClickEvent () {
this.share = {
show: false,
info: {}
}
},
getDetail () {
this.loading = true
async getUrl (index) {
const id = this.share.info.ids || this.share.info.id
zy.detail(this.share.key, id).then(res => {
if (res) {
this.pic = res.pic
var m3u8List = {}
const dd = res.dl.dd
const type = Object.prototype.toString.call(dd)
if (type === '[object Array]') {
for (const i of dd) {
if (i._flag.indexOf('m3u8') >= 0) {
m3u8List = i._t.split('#')
}
}
} else {
m3u8List = dd._t.split('#')
}
const url = m3u8List[1]
this.link = 'http://zyplayer.fun/player/player.html?url=' + url + '&title=' + this.share.info.name
}
this.loading = false
})
const cacheKey = this.share.key + '@' + id
let res = this.DetailCache[cacheKey]
if (!this.DetailCache[cacheKey]) {
res = await zy.detail(this.share.key, id)
this.DetailCache[cacheKey] = res
}
if (res) {
const url = res.fullList[0].list[index]
return url.includes('$') ? url.split('$')[1] : url
}
},
picLoadEvent () {
const dom = document.getElementById('right')
html2canvas(dom, { useCORS: true, allowTaint: true }).then(res => {
const png = res.toDataURL('image/png')
const p = nativeImage.createFromDataURL(png)
clipboard.writeImage(p)
this.$message.success('已复制到剪贴板,快去分享吧~ 严禁传播违法资源!!!')
async getDetail () {
this.loading = true
const index = this.share.index || 0
const url = await this.getUrl(index)
this.link = 'http://hunlongyu.gitee.io/zy-player-web?url=' + url + '&name=' + this.share.info.name
this.loading = false
this.$nextTick(() => {
const dom = document.getElementById('share')
html2canvas(dom, { useCORS: true }).then(res => {
const png = res.toDataURL('image/png')
const p = nativeImage.createFromDataURL(png)
clipboard.writeImage(p)
this.$message.success('已复制到剪贴板,快去分享吧~ 严禁传播违法资源!!!')
})
})
}
},

View File

@@ -1,69 +1,165 @@
<template>
<div class="star">
<div class="body">
<div class="zy-table">
<div class="tHeader">
<span class="btn" @click="updateAllEvent(list)">同步所有收藏</span>
</div>
<div class="tBody zy-scroll">
<ul>
<li v-show="this.list.length > 0">
<span class="name">名字</span>
<span class="type">类型</span>
<span class="time">上映</span>
<span class="site">片源</span>
<span class="note">备注</span>
<span class="note">观看至</span>
<span class="operate">
<span class="btn"></span>
<span class="btn"></span>
<span class="btn"></span>
<span class="btn"></span>
<span class="btn"></span>
</span>
</li>
<draggable v-model="list" @change="listUpdatedEvent">
<transition-group>
<li v-for="(i, j) in list" :key="j" @click="detailEvent(i)" :class="[i.hasUpdate ? 'zy-highlighted': '']">
<span class="name">{{i.name}}</span>
<span class="type">{{i.type}}</span>
<span class="time">{{i.year}}</span>
<span class="site">{{getSiteName(i.key)}}</span>
<span class="note">{{i.note}}</span>
<span class="note">{{getHistoryNote(i.index)}}</span>
<span class="operate">
<span class="btn" @click.stop="playEvent(i)">播放</span>
<span class="btn" @click.stop="shareEvent(i)">分享</span>
<span class="btn" @click.stop="updateEvent(i)">同步</span>
<span class="btn" @click.stop="downloadEvent(i)">下载</span>
<span class="btn" @click.stop="deleteEvent(i)">删除</span>
<div class="listpage" id="star">
<div class="listpage-header" id="star-header">
<el-switch v-model="setting.starViewMode" active-text="海报" active-value="picture" inactive-text="列表" inactive-value="table" @change="updateViewMode"></el-switch>
<el-button @click.stop="exportFavoritesEvent" icon="el-icon-upload2" title="导出全部,自动添加扩展名">导出</el-button>
<el-button @click.stop="importFavoritesEvent" icon="el-icon-download" title="支持同时导入多个文件">导入</el-button>
<el-button @click.stop="removeSelectedItems" icon="el-icon-delete-solid">{{ multipleSelection.length === 0 ? "清空" : "删除所选" }}</el-button>
<el-button @click.stop="updateAllEvent" icon="el-icon-refresh">同步所有收藏</el-button>
</div>
<div class="listpage-body" id="star-body">
<div class="show-table" id="star-table" v-if="setting.starViewMode === 'table'">
<el-table size="mini" fit height="100%" row-key="id"
ref="starTable"
:data="list"
:cell-class-name="checkUpdate"
@row-click="detailEvent"
@sort-change="handleSortChange"
@select="selectionCellClick"
@selection-change="handleSelectionChange">
<el-table-column
type="selection">
</el-table-column>
<el-table-column
sortable
:sort-method="(a , b) => sortByLocaleCompare(a.name, b.name)"
prop="name"
label="片名">
</el-table-column>
<el-table-column
prop="site.name"
width="120"
label="源站">
<template slot-scope="scope">
<span>{{ getSiteName(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column
sortable
:sort-method="(a , b) => sortByLocaleCompare(a.detail.type, b.detail.type)"
prop="detail.type"
label="类型"
width="100">
</el-table-column>
<el-table-column
sortable
:sort-by="['detail.year', 'name']"
prop="detail.year"
label="上映"
width="100">
</el-table-column>
<el-table-column v-if="list.some(e => e.detail.note)"
prop="detail.note"
width="120"
label="备注">
</el-table-column>
<el-table-column v-if="list.some(e => e.rate && e.rate !== '暂无评分')"
sortable
sort-by="rate"
prop="rate"
width="120"
align="center"
label="豆瓣评分">
</el-table-column>
<el-table-column v-if="list.some(e => e.index >= 0)"
prop="index"
width="120"
label="观看至">
<template slot-scope="scope">
<span>{{ getHistoryNote(scope.row.index) }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
header-align="center"
align="right"
width="200">
<template slot-scope="scope">
<el-button @click.stop="playEvent(scope.row)" type="text">播放</el-button>
<el-button @click.stop="shareEvent(scope.row)" type="text">分享</el-button>
<el-button @click.stop="downloadEvent(scope.row)" type="text">下载</el-button>
<el-button @click.stop="deleteEvent(scope.row)" type="text">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="show-picture" id="star-picture" v-if="setting.starViewMode === 'picture'">
<Waterfall ref="starWaterfall" :list="list" :gutter="20" :width="240"
:breakpoints="{
1200: { //当屏幕宽度小于等于1200
rowPerView: 4,
},
800: { //当屏幕宽度小于等于800
rowPerView: 3,
},
500: { //当屏幕宽度小于等于500
rowPerView: 2,
}
}"
animationEffect="fadeIn"
backgroundColor="rgba(0, 0, 0, 0)">
<template slot="item" slot-scope="props">
<div class="card">
<div class="img">
<div class="rate" v-if="props.data.rate && props.data.rate !== '暂无评分'">
<span>{{props.data.rate}}分</span>
</div>
<div class="update" v-if="props.data.hasUpdate">
<span>有更新</span>
</div>
<div class="progress" v-if="props.data.index && props.data.detail && props.data.detail.fullList[0].list !== undefined && props.data.detail.fullList[0].list.length > 1">
<span>
看至第{{ props.data.index + 1 }}集
</span>
</li>
</transition-group>
</draggable>
</ul>
</div>
</div>
<img style="width: 100%" :src="props.data.detail.pic" alt="" @load="$refs.starWaterfall.refresh()" @click="detailEvent(props.data)">
<div class="operate">
<div class="operate-wrap">
<span class="o-play" @click="playEvent(props.data)">播放</span>
<span class="o-share" @click="shareEvent(props.data)">分享</span>
<span class="o-star" @click="downloadEvent(props.data)">下载</span>
<span class="o-star" @click="deleteEvent(props.data)">删除</span>
</div>
</div>
</div>
<div class="name" @click="detailEvent(props.data)">{{props.data.name}}</div>
<div class="info">
<span>{{props.data.detail.area}}</span>
<span>{{props.data.detail.year}}</span>
<span>{{props.data.detail.note}}</span>
<span>{{props.data.detail.type}}</span>
</div>
</div>
</template>
</Waterfall>
</div>
</div>
</div>
</template>
<script>
import { mapMutations } from 'vuex'
import { star, history, sites } from '../lib/dexie'
import { history, star, sites, setting } from '../lib/dexie'
import zy from '../lib/site/tools'
import draggable from 'vuedraggable'
import { remote } from 'electron'
import fs from 'fs'
import Sortable from 'sortablejs'
import Waterfall from 'vue-waterfall-plugin'
const { clipboard } = require('electron')
export default {
name: 'star',
data () {
return {
list: [],
sites: []
sites: [],
numNoUpdate: 0,
shiftDown: false,
selectionBegin: '',
selectionEnd: '',
multipleSelection: []
}
},
components: {
draggable
Waterfall
},
computed: {
view: {
@@ -97,16 +193,75 @@ export default {
set (val) {
this.SET_SHARE(val)
}
},
setting: {
get () {
return this.$store.getters.getSetting
},
set (val) {
this.SET_SETTING(val)
}
},
DetailCache: {
get () {
return this.$store.getters.getDetailCache
},
set (val) {
this.SET_DetailCache(val)
}
}
},
watch: {
view () {
this.getStarList()
this.getAllsites()
if (this.view === 'Star') {
this.getAllsites()
this.getFavorites()
if (this.setting.starViewMode === 'table') this.showShiftPrompt()
}
},
numNoUpdate () {
// 如果所有收藏都没有更新的话
if (this.numNoUpdate === this.list.length) {
this.numNoUpdate = 0
this.$message.warning('未查询到任何更新')
}
}
},
methods: {
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE']),
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE', 'SET_SETTING']),
handleSortChange (column, prop, order) {
this.updateDatabase()
},
sortByLocaleCompare (a, b) {
return a.localeCompare(b, 'zh')
},
selectionCellClick (selection, row) { // 同history一样逆序
if (this.shiftDown && this.selectionBegin !== '' && selection.includes(row)) {
this.selectionEnd = row.id
const start = this.list.findIndex(e => e.id === Math.max(this.selectionBegin, this.selectionEnd))
const end = this.list.findIndex(e => e.id === Math.min(this.selectionBegin, this.selectionEnd))
const selections = this.list.slice(start, end + 1)
this.$nextTick(() => {
selections.forEach(e => this.$refs.starTable.toggleRowSelection(e, true))
})
this.selectionBegin = this.selectionEnd = ''
return
}
if (selection.includes(row)) {
this.selectionBegin = row.id
} else {
this.selectionBegin = ''
}
},
handleSelectionChange (rows) {
this.multipleSelection = rows
},
removeSelectedItems () {
if (!this.multipleSelection.length) this.multipleSelection = this.list
this.multipleSelection.forEach(e => star.remove(e.id))
this.getFavorites()
this.updateDatabase()
},
detailEvent (e) {
this.detail = {
show: true,
@@ -120,14 +275,12 @@ export default {
this.clearHasUpdateFlag(e)
}
},
playEvent (e) {
history.find({ site: e.key, ids: e.ids }).then(res => {
if (res) {
this.video = { key: e.key, info: { id: res.ids, name: res.name, index: res.index } }
} else {
this.video = { key: e.key, info: { id: e.ids, name: e.name, index: 0 } }
}
})
async playEvent (e) {
if (e.index) {
this.video = { key: e.key, info: { id: e.ids, name: e.name, index: e.index } }
} else {
this.video = { key: e.key, info: { id: e.ids, name: e.name, index: 0 } }
}
if (e.hasUpdate) {
this.clearHasUpdateFlag(e)
}
@@ -137,119 +290,85 @@ export default {
star.remove(e.id).then(res => {
if (res) {
this.$message.warning('删除失败')
} else {
this.$message.success('删除成功')
}
this.getStarList()
this.getFavorites()
})
},
shareEvent (e) {
this.share = {
show: true,
key: e.key,
info: e
info: e.detail
}
},
clearHasUpdateFlag (e) {
star.find({ id: e.id }).then(res => {
res.hasUpdate = false
star.update(e.id, res)
this.getStarList()
})
checkUpdate ({ row, rowIndex }) {
if (this.list[rowIndex].hasUpdate) {
return 'highlight'
}
},
listUpdatedEvent () {
star.clear().then(res1 => {
// 重新排序
var id = this.list.length
this.list.forEach(element => {
element.id = id
star.add(element)
id -= 1
})
})
async clearHasUpdateFlag (e) {
const db = await star.find({ id: e.id })
if (db) {
db.hasUpdate = false
star.update(e.id, db)
this.getFavorites()
}
},
updateEvent (e) {
zy.detail(e.key, e.ids).then(res => {
var doc = {
key: e.key,
async updateEvent (e) {
try {
if (!this.DetailCache[e.key + '@' + e.ids]) {
this.DetailCache[e.key + '@' + e.ids] = await zy.detail(e.key, e.ids)
}
const doc = {
id: e.id,
ids: res.id,
last: res.last,
name: res.name,
type: res.type,
year: res.year,
note: res.note
key: e.key,
ids: e.ids,
site: e.site,
name: e.name,
detail: this.DetailCache[e.key + '@' + e.ids],
index: e.index
}
star.get(e.id).then(resStar => {
doc.hasUpdate = resStar.hasUpdate
var msg = ''
if (e.last === res.last) {
msg = `同步"${e.name}"成功, 未查询到更新。`
this.$message.info(msg)
} else {
if (!e.hasUpdate && e.detail.last !== doc.detail.last) {
doc.hasUpdate = true
msg = `同步"${e.name}"成功, 检查到更新。`
const msg = `同步"${e.name}"成功, 检查到更新。`
this.$message.success(msg)
} else {
this.numNoUpdate += 1
}
star.update(e.id, doc)
this.getStarList()
this.getFavorites()
})
}).catch(err => {
var msg = `同步"${e.name}"失败, 请重试。`
} catch (err) {
const msg = `同步"${e.name}"失败, 请重试`
this.$message.warning(msg, err)
})
}
},
updateAllEvent (list) {
list.forEach(e => {
updateAllEvent () {
this.numNoUpdate = 0
this.list.forEach(e => {
this.updateEvent(e)
})
},
downloadEvent (e) {
zy.download(e.key, e.ids).then(res => {
if (res && res.dl && res.dl.dd) {
const text = res.dl.dd._t
if (text) {
const list = text.split('#')
let downloadUrl = ''
for (const i of list) {
const url = encodeURI(i.split('$')[1])
downloadUrl += (url + '\n')
}
clipboard.writeText(downloadUrl)
this.$message.success('『MP4』格式的链接已复制, 快去下载吧!')
} else {
this.$message.warning('没有查询到下载链接.')
}
} else {
var m3u8List = {}
zy.detail(e.key, e.ids).then(res => {
const dd = res.dl.dd
const type = Object.prototype.toString.call(dd)
if (type === '[object Array]') {
for (const i of dd) {
if (i._flag.indexOf('m3u8') >= 0) {
m3u8List = i._t.split('#')
}
}
} else {
m3u8List = dd._t.split('#')
}
const list = [...m3u8List]
let downloadUrl = ''
for (const i of list) {
const url = encodeURI(i.split('$')[1])
downloadUrl += (url + '\n')
}
clipboard.writeText(downloadUrl)
this.$message.success('『M3U8』格式的链接已复制, 快去下载吧!')
})
}
async downloadEvent (e) {
const db = await history.find({ site: e.key, ids: e.ids })
let videoFlag
if (db) videoFlag = db.videoFlag
zy.download(e.key, e.ids, videoFlag).then(res => {
clipboard.writeText(res.downloadUrls)
this.$message.success(res.info)
}).catch((err) => {
this.$message.error(err.info)
})
},
getSiteName (key) {
var site = this.sites.find(e => e.key === key)
if (site) {
return site.name
getSiteName (row) {
if (row.site) {
return row.site.name
} else {
const site = this.sites.find(e => e.key === row.key)
if (site) {
return site.name
}
}
},
getHistoryNote (index) {
@@ -259,35 +378,150 @@ export default {
return ''
}
},
getStarList () {
getFavorites () {
star.all().then(res => {
this.list = res.reverse()
this.list = res.sort(function (a, b) {
return b.id - a.id
})
})
},
getAllsites () {
sites.all().then(res => {
this.sites = res
})
},
exportFavoritesEvent () {
const arr = [...this.list]
const str = JSON.stringify(arr, null, 2)
const options = {
filters: [
{ name: 'JSON file', extensions: ['json'] }
]
}
remote.dialog.showSaveDialog(options).then(result => {
if (!result.canceled) {
if (!result.filePath.endsWith('.json')) result.filePath += '.json'
fs.writeFileSync(result.filePath, str)
this.$message.success('导出收藏成功')
}
}).catch(err => {
this.$message.error(err)
})
},
importFavoritesEvent () {
const options = {
filters: [
{ name: 'JSON file', extensions: ['json'] }
],
properties: ['openFile', 'multiSelections']
}
remote.dialog.showOpenDialog(options).then(result => {
if (!result.canceled) {
const starList = Array.from(this.list)
let id = this.list.length + 1
result.filePaths.forEach(file => {
const str = fs.readFileSync(file)
const json = JSON.parse(str)
json.reverse().forEach(ele => {
const starExists = starList.some(x => x.key === ele.key && x.ids === ele.ids)
if (!starExists) {
const newDetail = {
director: ele.director,
actor: ele.actor,
type: ele.type,
area: ele.area,
lang: ele.lang,
year: ele.year,
last: ele.last,
note: ele.note
}
const doc = {
id: id,
key: ele.key,
ids: ele.ids,
site: ele.site === undefined ? ele.site = this.sites.find(x => x.key === ele.key) : ele.site,
name: ele.name,
hasUpdate: ele.hasUpdate,
index: ele.index,
rate: ele.rate,
detail: ele.detail === undefined ? newDetail : ele.detail
}
id += 1
starList.push(doc)
}
})
})
star.clear().then(star.bulkAdd(starList).then(res => {
this.getFavorites()
this.$message.success('导入收藏成功')
}))
}
}).catch(err => {
this.$message.error(err)
})
},
syncTableData () {
if (this.$refs.starTable.tableData && this.$refs.starTable.tableData.length === this.list.length) {
this.list = this.$refs.starTable.tableData
}
},
updateDatabase () {
this.syncTableData()
star.clear().then(res => {
let id = this.list.length
this.list.forEach(ele => {
ele.id = id
id -= 1
})
star.bulkAdd(this.list)
})
},
rowDrop () {
if (!document.getElementById('star-table')) return
const tbody = document.getElementById('star-table').querySelector('.el-table__body-wrapper tbody')
const _this = this
Sortable.create(tbody, {
onEnd ({ newIndex, oldIndex }) {
const currRow = _this.list.splice(oldIndex, 1)[0]
_this.list.splice(newIndex, 0, currRow)
_this.updateDatabase()
}
})
},
updateViewMode () {
if (this.setting.starViewMode === 'table') {
setTimeout(() => { this.rowDrop() }, 100)
this.showShiftPrompt()
} else {
setTimeout(() => { if (this.$refs.starWaterfall) this.$refs.starWaterfall.refresh() }, 700)
}
setting.find().then(res => {
res.starViewMode = this.setting.starViewMode
setting.update(res)
})
},
showShiftPrompt () {
if (this.setting.shiftTooltipLimitTimes === undefined) this.setting.shiftTooltipLimitTimes = 5
if (this.setting.shiftTooltipLimitTimes) {
this.$message.info('多选时支持shift快捷键')
this.setting.shiftTooltipLimitTimes--
setting.find().then(res => {
res.shiftTooltipLimitTimes = this.setting.shiftTooltipLimitTimes
setting.update(res)
})
}
}
},
created () {
this.getStarList()
window.Sortable = require('sortablejs').Sortable
this.getFavorites()
},
mounted () {
if (this.setting.starViewMode === 'table') setTimeout(() => { this.rowDrop() }, 100)
addEventListener('keydown', code => { if (code.keyCode === 16) this.shiftDown = true })
addEventListener('keyup', code => { if (code.keyCode === 16) this.shiftDown = false })
addEventListener('resize', () => {
setTimeout(() => { if (this.$refs.starWaterfall) this.$refs.starWaterfall.resize() }, 500)
})
}
}
</script>
<style lang="scss" scoped>
.star{
position: relative;
height: calc(100% - 40px);
width: 100%;
display: flex;
justify-content: center;
align-items: center;
border-radius: 5px;
.body{
width: 100%;
height: 100%;
}
}
</style>

View File

@@ -9,7 +9,8 @@ import Detail from './Detail'
import Share from './Share'
import History from './History'
import EditSites from './EditSites'
import IPTV from './IPTV'
import Recommendation from './Recommendation'
export default {
registerComponents () {
Vue.component('Aside', Aside)
@@ -22,5 +23,7 @@ export default {
Vue.component('Share', Share)
Vue.component('History', History)
Vue.component('EditSites', EditSites)
Vue.component('IPTV', IPTV)
Vue.component('Recommendation', Recommendation)
}
}

View File

@@ -0,0 +1,25 @@
import db from './dexie'
const { channelList } = db
export default {
async all () {
return await channelList.toArray()
},
async clear () {
return await channelList.clear()
},
async add (doc) {
return await channelList.add(doc)
},
async bulkAdd (doc) {
return await channelList.bulkAdd(doc)
},
async find (doc) {
return await channelList.get(doc)
},
async update (id, docs) {
return await channelList.update(id, docs)
},
async remove (id) {
return await channelList.delete(id)
}
}

View File

@@ -1,22 +1,70 @@
import Dexie from 'dexie'
import { setting, sites, localKey } from './initData'
import { setting, sites, localKey, iptv, recommendations } from './initData'
const db = new Dexie('zy')
db.version(3).stores({
db.version(4).stores({
search: '++id, keywords',
setting: 'id, theme, site, shortcut, view',
setting: 'id, theme, site, shortcut, view, volume, externalPlayer, searchGroup, excludeRootClasses, excludeR18Films, forwardTimeInSec, starViewMode, recommandationViewMode, searchViewMode, password, proxy, allowPassWhenIptvCheck, autocleanWhenIptvCheck',
shortcut: 'name, key, desc',
star: '++id, site, ids, name, type, year, index',
sites: '++id, key, name, json, xml, down, level',
history: '++id, site, ids, name, type, year, index, time',
mini: 'id, site, ids, name, index, time'
star: '++id, [key+ids], site, name, detail, index, rate, hasUpdate',
recommendation: '++id, [key+ids], site, name, detail, index, rate, hasUpdate',
sites: '++id, key, name, api, download, isActive, group',
history: '++id, [site+ids], name, type, year, index, time, duration, detail',
mini: 'id, bounds',
iptv: '++id, name, url, isActive',
channelList: '++id, name, prefer, channels, group, isActive'
})
// 开发和稳定版同一版本号会有不同的数据库
// 参考https://github.com/dfahlander/Dexie.js/releases/tag/v3.0.0-alpha.3 upgrade可以改变主键和表名了
// https://dexie.org/docs/Version/Version.stores()
// https://dexie.org/docs/Version/Version.upgrade()
// https://ahuigo.github.io/b/ria/js-indexedDB#/ 比较旧,适当参考
db.version(5).stores({
shortcut: null
})
db.version(6).stores({
shortcut: '++id, name, key, desc'
}).upgrade(async tx => {
await tx.shortcut.bulkAdd(localKey)
})
db.version(7).stores({
sites: '++id, key, name, api, download, jiexiUrl, isActive, group',
history: '++id, [site+ids], name, type, year, index, time, duration, detail, onlinePlay'
}).upgrade(trans => {
trans.sites.toCollection().modify(site => {
site.jiexiUrl = ''
})
trans.history.toCollection().modify(record => {
record.detail.fullList = [].concat(record.detail.m3u8List)
delete record.detail.m3u8List
})
trans.star.toCollection().modify(favorite => {
favorite.detail.fullList = [].concat(favorite.detail.m3u8List)
delete favorite.detail.m3u8List
})
})
db.version(8).stores({
}).upgrade(trans => {
trans.sites.toCollection().modify(site => {
if (site.api.includes('7kjx.com')) site.jiexiUrl = 'default'
})
trans.setting.toCollection().modify(setting => {
setting.waitingTimeInSec = 15
setting.autoChangeSourceWhenIptvStalling = true
})
})
db.on('populate', () => {
db.setting.bulkAdd(setting)
db.sites.bulkAdd(sites)
db.shortcut.bulkAdd(localKey)
db.iptv.bulkAdd(iptv)
db.recommendation.bulkAdd(recommendations)
})
db.open()

View File

@@ -4,8 +4,11 @@ export default {
async add (doc) {
return await history.add(doc)
},
async bulkAdd (doc) {
return await history.bulkAdd(doc)
},
async find (doc) {
return await history.get(doc)
return await history.where(doc).first()
},
async update (id, docs) {
return await history.update(id, docs)

View File

@@ -5,6 +5,9 @@ import shortcut from './shortcut'
import star from './star'
import sites from './sites'
import search from './search'
import iptv from './iptv'
import channelList from './channelList'
import recommendation from './recommendation'
export {
history,
@@ -13,5 +16,8 @@ export {
shortcut,
star,
sites,
search
iptv,
channelList,
search,
recommendation
}

View File

@@ -0,0 +1 @@
[]

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
[]

View File

@@ -2,180 +2,28 @@ const setting = [
{
id: 0,
theme: 'light',
site: 'zuidazy',
shortcut: true,
view: 'picture'
}
]
const sites = [
{
id: 1,
key: 'okzy',
name: 'OK 资源网',
api: 'http://cj.okzy.tv/inc/api.php',
download: 'http://cj.okzy.tv/inc/apidown.php'
},
{
id: 2,
key: 'zuidazy',
name: '最大资源网',
api: 'http://www.zdziyuan.com/inc/api.php',
download: 'http://www.zdziyuan.com/inc/apidown.php'
},
{
id: 3,
key: 'doubanzy',
name: '豆瓣电影资源',
api: 'http://v.1988cj.com/inc/api.php',
download: 'http://v.1988cj.com/inc/apidown.php'
},
{
id: 4,
key: '135zy',
name: '135 资源网',
api: 'http://cj.zycjw1.com/inc/api.php',
download: 'http://cj.zycjw1.com/inc/apidown.php'
},
{
id: 5,
key: 'kuyunzy',
name: '酷云资源',
api: 'http://caiji.kuyun98.com/inc/ldg_api.php',
download: 'http://caiji.kuyun98.com/inc/apidown.php'
},
{
id: 6,
key: 'mgtvzy',
name: '芒果 TV 资源网',
api: 'https://api.shijiapi.com/api.php/provide/vod/at/xml/',
download: ''
},
{
id: 7,
key: 'subo988',
name: '速播资源站',
api: 'https://www.subo988.com/inc/api.php',
download: ''
},
{
id: 8,
key: '209zy',
name: '209 资源',
api: 'http://cj.1156zy.com/inc/api.php',
download: ''
},
{
id: 9,
key: 'zuixinzy',
name: '最新资源',
api: 'http://api.zuixinapi.com/inc/api.php',
download: ''
},
{
id: 10,
key: 'kubozy',
name: '酷播资源',
api: 'http://api.kbzyapi.com/inc/api.php',
download: ''
},
{
id: 11,
key: 'yongjiuzy',
name: '永久资源',
api: 'http://cj.yongjiuzyw.com/inc/api.php',
download: ''
},
{
id: 12,
key: '123ku',
name: '123 资源',
api: 'http://cj.123ku2.com:12315/inc/api.php',
download: ''
},
{
id: 13,
key: '88zyw',
name: '88 影视资源站',
api: 'http://www.88zyw.net/inc/api.php',
download: ''
},
{
id: 14,
key: 'wolongzy',
name: '卧龙资源',
api: 'http://cj.wlzy.tv/inc/api_mac.php',
download: ''
},
{
id: 15,
key: 'mahuazy',
name: '麻花资源',
api: 'https://www.mhapi123.com/inc/api.php',
download: ''
},
{
id: 16,
key: 'kkzy',
name: '快快资源',
api: 'https://api.kkzy.tv/inc/api.php',
download: ''
},
{
id: 17,
key: '158zy',
name: '壹伍捌资源网',
api: 'http://cj.158zyz.net:158/inc/api.php',
download: ''
},
{
id: 18,
key: 'rrzy',
name: '人人资源',
api: 'https://www.rrzyw.cc/api.php/provide/vod/from/rrm3u8/at/xml/',
download: ''
},
{
id: 19,
key: 'mokazy',
name: '魔卡资源网',
api: 'https://cj.heiyap.com/api.php/provide/vod/at/xml/',
download: ''
},
{
id: 20,
key: 'kyzy',
name: '快影资源站',
api: 'https://www.kyzy.tv/api.php/kyyun/vod/at/xml/',
download: ''
},
{
id: 21,
key: 'solezy',
name: '搜乐资源网',
api: 'https://www.caijizy.vip/api.php/provide/vod/at/xml/',
download: ''
},
{
id: 22,
key: 'bbkdj',
name: '步步高顶尖资源网',
api: 'http://api.bbkdj.com/api',
download: ''
},
{
id: 23,
key: '1886zy',
name: '1886 资源',
api: 'http://cj.1886zy.co/inc/api.php',
download: ''
},
{
id: 24,
key: 'mbo',
name: '秒播资源',
api: 'http://caiji.mb77.vip/inc/api.php',
download: ''
view: 'picture',
externalPlayer: '',
searchGroup: '全站',
excludeRootClasses: true,
excludeR18Films: true,
forwardTimeInSec: 5,
waitingTimeInSec: 15,
starViewMode: 'picture',
recommendationViewMode: 'picture',
historyViewMode: 'picture',
searchViewMode: 'picture',
password: '',
proxy: {
type: 'none',
scheme: '',
url: '',
port: ''
},
allowPassWhenIptvCheck: true,
autocleanWhenIptvCheck: false,
autoChangeSourceWhenIptvStalling: true
}
]
@@ -222,7 +70,7 @@ const localKey = [
},
{
name: 'escape',
desc: '退出全屏',
desc: '退出全屏/精简模式',
key: 'esc'
},
{
@@ -245,6 +93,21 @@ const localKey = [
desc: '跳到视频结束位置',
key: 'end'
},
{
name: 'startPosition',
desc: '标记片头',
key: 'ctrl+home'
},
{
name: 'endPosition',
desc: '标记片尾',
key: 'ctrl+end'
},
{
name: 'clearPosition',
desc: '清除标记',
key: 'ctrl+del'
},
{
name: 'opacityUp',
desc: '透明度调高',
@@ -269,6 +132,11 @@ const localKey = [
name: 'mini',
desc: '进入或退出mini模式',
key: 'alt+m'
},
{
name: 'resetMini',
desc: '重置mini窗口',
key: 'ctrl+0'
}
]
@@ -280,9 +148,14 @@ const getSite = (key) => {
}
}
const sites = require('./iniData/Sites.json')
const iptv = require('./iniData/Iptv.json')
const recommendations = require('./iniData/Recommendations.json')
export {
setting,
sites,
iptv,
recommendations,
localKey,
getSite
}

25
src/lib/dexie/iptv.js Normal file
View File

@@ -0,0 +1,25 @@
import db from './dexie'
const { iptv } = db
export default {
async all () {
return await iptv.toArray()
},
async clear () {
return await iptv.clear()
},
async add (doc) {
return await iptv.add(doc)
},
async bulkAdd (doc) {
return await iptv.bulkAdd(doc)
},
async find (doc) {
return await iptv.get(doc)
},
async update (id, docs) {
return await iptv.update(id, docs)
},
async remove (id) {
return await iptv.delete(id)
}
}

View File

@@ -0,0 +1,28 @@
import db from './dexie'
const { recommendation } = db
export default {
async add (doc) {
return await recommendation.add(doc)
},
async bulkAdd (doc) {
return await recommendation.bulkAdd(doc)
},
async find (doc) {
return await recommendation.where(doc).first()
},
async update (id, docs) {
return await recommendation.update(id, docs)
},
async all () {
return await recommendation.toArray()
},
async remove (id) {
return await recommendation.delete(id)
},
async get (id) {
return await recommendation.get(id)
},
async clear () {
return await recommendation.clear()
}
}

View File

@@ -8,7 +8,7 @@ export default {
return await star.bulkAdd(doc)
},
async find (doc) {
return await star.get(doc)
return await star.where(doc).first()
},
async update (id, docs) {
return await star.update(id, docs)

View File

@@ -1,3 +1,23 @@
import Vue from 'vue'
import { Message } from 'element-ui'
import { Message, Button, Table, TableColumn, Tag, Input, InputNumber, Dialog, Form, FormItem, Switch, Select, Option, Checkbox, Autocomplete, Col, Tree, Divider, Progress } from 'element-ui'
import Plugin from 'v-fit-columns'
Vue.use(Button)
Vue.use(Col)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Tag)
Vue.use(Input)
Vue.use(InputNumber)
Vue.use(Dialog)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Switch)
Vue.use(Plugin)
Vue.use(Select)
Vue.use(Option)
Vue.use(Checkbox)
Vue.use(Autocomplete)
Vue.use(Tree)
Vue.use(Divider)
Vue.use(Progress)
Vue.prototype.$message = Message

317
src/lib/site/onlineVideo.js Normal file
View File

@@ -0,0 +1,317 @@
import open from 'open'
import axios from 'axios'
import cheerio from 'cheerio'
const onlineVideo = {
playVideoOnline (selectedOnlineSite, videoName, videoIndex) {
switch (selectedOnlineSite) {
case '哔嘀':
onlineVideo.playVideoOnBde4(videoName, videoIndex)
break
case '1080影视':
onlineVideo.playVideoOnK1080(videoName, videoIndex)
break
case '素白白':
onlineVideo.playVideoOnSubaibai(videoName, videoIndex)
break
case '哆咪动漫':
onlineVideo.playVideoOndmdm2020(videoName, videoIndex)
break
case '樱花动漫':
onlineVideo.playVideoOnYhdm(videoName, videoIndex)
break
case '简影':
onlineVideo.playVideoOnSyrme(videoName, videoIndex)
break
case '极品':
onlineVideo.playVideoOnJpysvip(videoName, videoIndex)
break
case '喜欢看':
onlineVideo.playVideoOnXhkan(videoName, videoIndex)
break
default:
this.$message.console.error(`不支持该网站:${this.selectedOnlineSite}`)
}
},
playVideoOnBde4 (videoName, videoIndex) {
videoName = videoName.replace(/\s/g, '')
var url = `https://bde4.com/search/${videoName}`
axios.get(url).then(res => {
const $ = cheerio.load(res.data)
var e = $('div.search-list')
var searchResult = $(e).find('div>div>div>div>a').toArray()
// 获取第一个搜索结果的视频链接
var detailPageLink = $(searchResult[0]).attr('href')
// 获取第一个搜索结果的title
var title = $(searchResult[0]).attr('title')
if (title === null || title === undefined || !title.replace(/\s/g, '').includes(videoName)) {
// 如果第一个搜索结果不符合,打开搜索页面
open(url)
} else {
var detailPageFullLink = 'https://bde4.com/' + detailPageLink
// 解析详情页面
axios.get(detailPageFullLink).then(res => {
const $ = cheerio.load(res.data)
var e = $('div.info1')
var videoList = $(e).find('a').toArray()
var videoFullLink = detailPageFullLink
// 获取index视频链接
if (videoIndex < videoList.length) {
var indexVideoLink = $(videoList[videoIndex]).attr('href')
if (indexVideoLink.includes('.htm')) {
videoFullLink = 'https://bde4.com' + indexVideoLink
}
}
open(videoFullLink)
})
}
})
},
playVideoOnK1080 (videoName, videoIndex) {
videoName = videoName.replace(/\s/g, '')
var url = `https://k1080.net/vodsearch123/-------------.html?wd=${videoName}&submit=`
axios.get(url).then(res => {
const $ = cheerio.load(res.data)
var e = $('#searchList')
var searchResult = $(e).find('li>div>a').toArray()
// 获取第一个搜索结果的视频链接
var detailPageLink = $(searchResult[0]).attr('href')
// 获取第一个搜索结果的title
var title = $(searchResult[0]).attr('title')
if (title === null || title === undefined || !title.replace(/\s/g, '').includes(videoName)) {
// 如果第一个搜索结果不符合,打开搜索页面
open(url)
} else {
// 解析详情页面
var detailPageFullLink = 'https://k1080.net' + detailPageLink
axios.get(detailPageFullLink).then(res2 => {
const $ = cheerio.load(res2.data)
// 获取playlist1
var e = $('#playlist1')
// 获取所有视频链接
var videoList = $(e).find('div>ul>li>a').toArray()
var videoFullLink = detailPageFullLink
// 获取index视频链接
if (videoIndex < videoList.length) {
var indexVideoLink = $(videoList[videoIndex]).attr('href')
if (indexVideoLink.includes('.htm')) {
videoFullLink = 'https://k1080.net' + indexVideoLink
}
}
open(videoFullLink)
})
}
})
},
playVideoOnSubaibai (videoName, videoIndex) {
videoName = videoName.replace(/\s/g, '')
var url = `https://www.subaibai.com/xssearch?q=${videoName}`
axios.get(url).then(res => {
const $ = cheerio.load(res.data)
var e = $('div.search_list')
var searchResult = $(e).find('div>ul>li>h3>a').toArray()
// 获取第一个搜索结果的视频链接
var detailPageLink = $(searchResult[0]).attr('href')
// 获取第一个搜索结果的title
var title = $(searchResult[0]).text()
if (title === null || title === undefined || !title.replace(/\s/g, '').includes(videoName)) {
// 如果第一个搜索结果不符合,打开搜索页面
open(url)
} else {
// 解析详情页面
var detailPageFullLink = detailPageLink
axios.get(detailPageFullLink).then(res2 => {
const $ = cheerio.load(res2.data)
// 获取playlist1
var e = $('div.paly_list_btn')
// 获取所有视频链接
var videoList = $(e).find('a').toArray()
// 获取index视频链接
var videoFullLink = detailPageFullLink
if (videoIndex < videoList.length) {
var indexVideoLink = $(videoList[videoIndex]).attr('href')
if (indexVideoLink.includes('.htm')) {
videoFullLink = indexVideoLink
}
}
open(videoFullLink)
})
}
})
},
playVideoOnYhdm (videoName, videoIndex) {
videoName = videoName.replace(/\s/g, '')
var url = `http://www.yhdm.tv/search/${videoName}`
axios.get(url).then(res => {
const $ = cheerio.load(res.data)
var e = $('div.lpic')
var searchResult = $(e).find('div>ul>li>h2>a').toArray()
// 获取第一个搜索结果的视频链接
var detailPageLink = $(searchResult[0]).attr('href')
// 获取第一个搜索结果的title
var title = $(searchResult[0]).attr('title')
if (title === null || title === undefined || !title.replace(/\s/g, '').includes(videoName)) {
// 如果第一个搜索结果不符合,打开搜索页面
open(url)
} else {
// 解析详情页面
var detailPageFullLink = 'http://www.yhdm.tv/' + detailPageLink
axios.get(detailPageFullLink).then(res2 => {
const $ = cheerio.load(res2.data)
// 获取playlist1
var e = $('div.movurl')
// 获取所有视频链接
var videoList = $(e).find('div>ul>li>a').toArray()
// 获取index视频链接
var videoFullLink = detailPageFullLink
if (videoIndex < videoList.length) {
var indexVideoLink = $(videoList[videoIndex]).attr('href')
if (indexVideoLink.includes('.htm')) {
videoFullLink = 'http://www.yhdm.tv/' + indexVideoLink
}
}
open(videoFullLink)
})
}
})
},
playVideoOndmdm2020 (videoName, videoIndex) {
videoName = videoName.replace(/\s/g, '')
var url = `http://www.dmdm2020.com/dongmansearch.html?wd=${videoName}&submit=`
axios.get(url).then(res => {
const $ = cheerio.load(res.data)
var e = $('#searchList')
var searchResult = $(e).find('ul>li>div>h4>a').toArray()
// 获取第一个搜索结果的视频链接
var detailPageLink = $(searchResult[0]).attr('href')
// 获取第一个搜索结果的title
var title = $(searchResult[0]).text()
if (title === null || title === undefined || !title.replace(/\s/g, '').includes(videoName)) {
// 如果第一个搜索结果不符合,打开搜索页面
open(url)
} else {
// 解析详情页面
var detailPageFullLink = 'http://www.dmdm2020.com' + detailPageLink
axios.get(detailPageFullLink).then(res2 => {
const $ = cheerio.load(res2.data)
// 获取playlist1
var e = $('#playlist1')
// 获取所有视频链接
var videoList = $(e).find('div>ul>li>a').toArray()
// 获取index视频链接
var videoFullLink = detailPageFullLink
if (videoIndex < videoList.length) {
var indexVideoLink = $(videoList[videoIndex]).attr('href')
if (indexVideoLink.includes('.htm')) {
videoFullLink = 'http://www.dmdm2020.com' + indexVideoLink
}
}
open(videoFullLink)
})
}
})
},
playVideoOnSyrme (videoName, videoIndex) {
videoName = videoName.replace(/\s/g, '')
var url = `https://syrme.top/searchs?q=${videoName}`
axios.get(url).then(res => {
const $ = cheerio.load(res.data)
var e = $('ul.MovieList')
var searchResult = $(e).find('ul>li>article>a').toArray()
// 获取第一个搜索结果的视频链接
var detailPageLink = $(searchResult[0]).attr('href')
// 获取第一个搜索结果的title
var title = $(searchResult[0]).find('a>h2').text()
if (title === null || title === undefined || !title.replace(/\s/g, '').includes(videoName)) {
// 如果第一个搜索结果不符合,打开搜索页面
open(url)
} else {
// 解析详情页面
var detailPageFullLink = 'https://syrme.top' + detailPageLink
axios.get(detailPageFullLink).then(res2 => {
const $ = cheerio.load(res2.data)
// 获取playlist1
var e = $('#categories-2')
// 获取所有视频链接
var videoList = $(e).find('div>ul>li>a').toArray()
// 获取index视频链接
var videoFullLink = detailPageFullLink
if (videoIndex < videoList.length) {
var indexVideoLink = $(videoList[videoIndex]).attr('href')
videoFullLink = 'https://syrme.top' + indexVideoLink
}
open(videoFullLink)
})
}
})
},
playVideoOnJpysvip (videoName, videoIndex) {
videoName = videoName.replace(/\s/g, '')
var url = `https://www.jpysvip.net/vodsearch/-------------.html?wd=${videoName}&submit=`
axios.get(url).then(res => {
const $ = cheerio.load(res.data)
var e = $('#searchList')
var searchResult = $(e).find('ul>li>div>a').toArray()
// 获取第一个搜索结果的视频链接
var detailPageLink = $(searchResult[0]).attr('href')
// 获取第一个搜索结果的title
var title = $(searchResult[0]).attr('title')
if (title === null || title === undefined || !title.replace(/\s/g, '').includes(videoName)) {
// 如果第一个搜索结果不符合,打开搜索页面
open(url)
} else {
// 解析详情页面
var detailPageFullLink = 'https://www.jpysvip.net' + detailPageLink
axios.get(detailPageFullLink).then(res2 => {
const $ = cheerio.load(res2.data)
// 获取playlist1
var e = $('#playlist1')
// 获取所有视频链接
var videoList = $(e).find('div>ul>li>a').toArray()
// 获取index视频链接
var videoFullLink = detailPageFullLink
if (videoIndex < videoList.length) {
var indexVideoLink = $(videoList[videoIndex]).attr('href')
videoFullLink = 'https://www.jpysvip.net/' + indexVideoLink
}
open(videoFullLink)
})
}
})
},
playVideoOnXhkan (videoName, videoIndex) {
videoName = videoName.replace(/\s/g, '')
var url = `https://www.xhkan.com/vodsearch.html?wd=${videoName}&submit=`
axios.get(url).then(res => {
const $ = cheerio.load(res.data)
var e = $('#searchList')
var searchResult = $(e).find('ul>li>div>a').toArray()
// 获取第一个搜索结果的视频链接
var detailPageLink = $(searchResult[0]).attr('href')
// 获取第一个搜索结果的title
var title = $(searchResult[0]).attr('title')
if (title === null || title === undefined || !title.replace(/\s/g, '').includes(videoName)) {
// 如果第一个搜索结果不符合,打开搜索页面
open(url)
} else {
// 解析详情页面
var detailPageFullLink = detailPageLink
axios.get(detailPageFullLink).then(res2 => {
const $ = cheerio.load(res2.data)
// 获取playlist1
var e = $('#playlist1')
// 获取所有视频链接
var videoList = $(e).find('div>ul>li>a').toArray()
// 获取index视频链接
var videoFullLink = detailPageFullLink
if (videoIndex < videoList.length) {
var indexVideoLink = $(videoList[videoIndex]).attr('href')
videoFullLink = indexVideoLink
}
open(videoFullLink)
})
}
})
}
}
export default onlineVideo

View File

@@ -1,18 +0,0 @@
import express from 'express'
import cors from 'cors'
const Axios = require('axios')
const app = express()
app.use(cors())
app.use(express.json())
app.use(express.urlencoded({ extended: true }))
app.post('/api', async (req, res) => {
const result = await Axios.get(req.body.url)
res.json({
code: 1,
info: result.data
})
})
app.listen(44444)

View File

@@ -1,8 +1,84 @@
import { sites } from '../dexie'
import { sites, setting } from '../dexie'
import axios from 'axios'
import parser from 'fast-xml-parser'
import cheerio from 'cheerio'
import { Parser as M3u8Parser } from 'm3u8-parser'
// import FLVDemuxer from 'xgplayer-flv.js/src/flv/demux/flv-demuxer.js'
import SocksProxyAgent from 'socks-proxy-agent'
// axios使用系统代理 https://evandontje.com/2020/04/02/automatic-system-proxy-configuration-for-electron-applications/
// xgplayer使用chromium代理设置浏览器又默认使用系统代理 https://www.chromium.org/developers/design-documents/network-settings
// 要在设置中添加代理设置可参考https://stackoverflow.com/questions/37393248/how-connect-to-proxy-in-electron-webview
const http = require('http')
const https = require('http')
const { remote } = require('electron')
const win = remote.getCurrentWindow()
const session = win.webContents.session
const ElectronProxyAgent = require('electron-proxy-agent')
const URL = require('url')
const request = require('request')
let proxyURL
// 取消axios请求 浅析cancelToken https://juejin.cn/post/6844904168277147661 https://masteringjs.io/tutorials/axios/cancel
// const source = axios.CancelToken.source()
// const cancelToken = source.token
// 请求超时时限
// axios.defaults.timeout = 10000 // 可能使用代理,增长超时
const TIMEOUT = 20000
// 重试次数共请求2次
axios.defaults.retry = 1
// 请求的间隙
axios.defaults.retryDelay = 1000
// 使用请求拦截器动态调整超时
axios.interceptors.request.use(function (config) {
if (config.__retryCount === undefined) {
config.timeout = TIMEOUT
} else {
config.timeout = TIMEOUT * (config.__retryCount + 1)
}
return config
}, function (err) {
return Promise.reject(err)
})
// 添加响应拦截器
axios.interceptors.response.use(function (response) {
return response
}, function (err) { // 请求错误时做些事
// 请求超时的之后,抛出 err.code = ECONNABORTED的错误..错误信息是 timeout of xxx ms exceeded
if (err.code === 'ECONNABORTED' && err.message.indexOf('timeout') !== -1) {
const config = err.config
config.__retryCount = config.__retryCount || 0
if (config.__retryCount >= config.retry) {
err.message = '多次请求均超时'
return Promise.reject(err)
}
config.__retryCount += 1
const backoff = new Promise(function (resolve) {
setTimeout(function () {
resolve()
}, config.retryDelay || 1)
})
return backoff.then(function () {
return axios(config)
})
} else {
if (err && !err.response) {
err.message = '连接服务器失败!'
}
return Promise.reject(err)
}
})
const zy = {
ports: 44444, // 端口号
xmlConfig: { // XML 转 JSON 配置
trimValues: true,
textNodeName: '_t',
@@ -31,13 +107,14 @@ const zy = {
class (key) {
return new Promise((resolve, reject) => {
this.getSite(key).then(res => {
const site = res
axios.post(`http://localhost:${this.ports}/api`, { url: site.api }).then(res => {
const data = res.data.info
const url = res.api
axios.get(url).then(res => {
const data = res.data
const json = parser.parse(data, this.xmlConfig)
const jsondata = json.rss === undefined ? json : json.rss
const arr = []
if (json.rss.class) {
for (const i of json.rss.class.ty) {
if (jsondata.class) {
for (const i of jsondata.class.ty) {
const j = {
tid: i._id,
name: i._t
@@ -47,10 +124,10 @@ const zy = {
}
const doc = {
class: arr,
page: json.rss.list._page,
pagecount: json.rss.list._pagecount,
pagesize: json.rss.list._pagesize,
recordcount: json.rss.list._recordcount
page: jsondata.list._page,
pagecount: jsondata.list._pagecount,
pagesize: jsondata.list._pagesize,
recordcount: jsondata.list._recordcount
}
resolve(doc)
}).catch(err => {
@@ -76,11 +153,16 @@ const zy = {
} else {
url = `${site.api}?ac=videolist&pg=${pg}`
}
axios.post(`http://localhost:${this.ports}/api`, { url: url }).then(async res => {
const data = res.data.info
axios.get(url).then(async res => {
const data = res.data
const json = parser.parse(data, this.xmlConfig)
const videoList = json.rss.list.video
resolve(videoList)
const jsondata = json.rss === undefined ? json : json.rss
const videoList = jsondata.list.video
if (videoList && videoList.length) {
resolve(videoList)
} else {
resolve([])
}
}).catch(err => {
reject(err)
})
@@ -103,14 +185,15 @@ const zy = {
} else {
url = `${site.api}?ac=videolist`
}
axios.post(`http://localhost:${this.ports}/api`, { url: url }).then(async res => {
const data = res.data.info
axios.get(url).then(async res => {
const data = res.data.match(/<list [^>]*>/)[0] + '</list>' // 某些源站不含页码时获取到的数据parser无法解析
const json = parser.parse(data, this.xmlConfig)
const jsondata = json.rss === undefined ? json : json.rss
const pg = {
page: json.rss.list._page,
pagecount: json.rss.list._pagecount,
pagesize: json.rss.list._pagesize,
recordcount: json.rss.list._recordcount
page: jsondata.list._page,
pagecount: jsondata.list._pagecount,
pagesize: jsondata.list._pagesize,
recordcount: jsondata.list._recordcount
}
resolve(pg)
}).catch(err => {
@@ -129,15 +212,26 @@ const zy = {
return new Promise((resolve, reject) => {
this.getSite(key).then(res => {
const site = res
wd = encodeURI(wd)
axios.post(`http://localhost:${this.ports}/api`, { url: site.api + '?wd=' + wd }).then(res => {
const data = res.data.info
const url = `${site.api}?wd=${encodeURI(wd)}`
axios.get(url, { timeout: 3000 }).then(res => {
const data = res.data
const json = parser.parse(data, this.xmlConfig)
const videoList = json.rss.list.video
resolve(videoList)
const jsondata = json.rss === undefined ? json : json.rss
if (json && jsondata && jsondata.list) {
let videoList = jsondata.list.video
if (Object.prototype.toString.call(videoList) === '[object Object]') videoList = [].concat(videoList)
videoList = videoList.filter(e => e.name.toLowerCase().includes(wd.toLowerCase()))
if (videoList.length) {
resolve(videoList)
} else {
resolve()
}
}
}).catch(err => {
reject(err)
})
}).catch(err => {
reject(err)
})
})
},
@@ -150,10 +244,56 @@ const zy = {
detail (key, id) {
return new Promise((resolve, reject) => {
this.getSite(key).then(res => {
axios.post(`http://localhost:${this.ports}/api`, { url: res.api + '?ac=videolist&ids=' + id }).then(res => {
const data = res.data.info
const url = `${res.api}?ac=videolist&ids=${id}`
axios.get(url).then(res => {
const data = res.data
const json = parser.parse(data, this.xmlConfig)
const videoList = json.rss.list.video
const jsondata = json.rss === undefined ? json : json.rss
const videoList = jsondata.list.video
// Parse video lists
let fullList = []
let index = 0
const supportedFormats = ['m3u8', 'mp4']
const dd = videoList.dl.dd
const type = Object.prototype.toString.call(dd)
if (type === '[object Array]') {
for (const i of dd) {
i._t = i._t.replace(/\$+/g, '$')
const ext = Array.from(new Set(...i._t.split('#').map(e => e.includes('$') ? e.split('$')[1].match(/\.\w+?$/) : e.match(/\.\w+?$/)))).map(e => e.slice(1))
if (ext.length && ext.length <= supportedFormats.length && ext.every(e => supportedFormats.includes(e))) {
if (ext.length === 1) {
i._flag = ext[0]
} else {
i._flag = index ? 'ZY支持-' + index : 'ZY支持'
index++
}
}
fullList.push(
{
flag: i._flag,
list: i._t.split('#').filter(e => e && (e.startsWith('http') || (e.split('$')[1] && e.split('$')[1].startsWith('http'))))
}
)
}
} else {
fullList.push(
{
flag: dd._flag,
list: dd._t.replace(/\$+/g, '$').split('#').filter(e => e && (e.startsWith('http') || (e.split('$')[1] && e.split('$')[1].startsWith('http'))))
}
)
}
fullList.forEach(item => {
if (item.list.every(e => e.includes('$') && /^\s*\d+\s*$/.test(e.split('$')[0]))) item.list.sort((a, b) => { return a.split('$')[0] - b.split('$')[0] })
})
if (fullList.length > 1) { // 将ZY支持的播放列表前置
index = fullList.findIndex(e => supportedFormats.includes(e.flag) || e.flag.startsWith('ZY支持'))
if (index !== -1) {
const first = fullList.splice(index, 1)
fullList = first.concat(fullList)
}
}
videoList.fullList = fullList
resolve(videoList)
}).catch(err => {
reject(err)
@@ -169,26 +309,218 @@ const zy = {
* @param {*} id 资源唯一标识符 id
* @returns
*/
download (key, id) {
download (key, id, videoFlag) {
return new Promise((resolve, reject) => {
let info = ''
let downloadUrls = ''
this.getSite(key).then(res => {
const site = res
const url = site.download
if (url) {
axios.post(`http://localhost:${this.ports}/api`, { url: url + '?ac=videolist&ids=' + id + '&ct=1' }).then(res => {
const data = res.data.info
if (site.download) {
const url = `${site.download}?ac=videolist&ids=${id}&ct=1`
axios.get(url).then(res => {
const data = res.data
const json = parser.parse(data, this.xmlConfig)
const videoList = json.rss.list.video
resolve(videoList)
}).catch(err => {
const jsondata = json.rss === undefined ? json : json.rss
const videoList = jsondata.list.video
const dd = videoList.dl.dd
const type = Object.prototype.toString.call(dd)
if (type === '[object Array]') {
for (const i of dd) {
downloadUrls = i._t.replace(/\$+/g, '$').split('#').map(e => encodeURI(e.includes('$') ? e.split('$')[1] : e)).join('\n')
}
} else {
downloadUrls = dd._t.replace(/\$+/g, '$').split('#').map(e => encodeURI(e.includes('$') ? e.split('$')[1] : e)).join('\n')
}
if (downloadUrls) {
info = '调用下载接口获取到的链接已复制, 快去下载吧!'
resolve({ downloadUrls: downloadUrls, info: info })
} else {
throw new Error()
}
}).catch((err) => {
err.info = '无法获取到下载链接,请通过播放页面点击“调试”按钮获取'
reject(err)
})
} else {
resolve([])
zy.detail(key, id).then(res => {
const dl = res.fullList.find(e => e.flag === videoFlag) || res.fullList[0]
for (const i of dl.list) {
const url = encodeURI(i.includes('$') ? i.split('$')[1] : i)
downloadUrls += (url + '\n')
}
if (downloadUrls) {
info = '视频源链接已复制, 快去下载吧!'
resolve({ downloadUrls: downloadUrls, info: info })
} else {
throw new Error()
}
}).catch((err) => {
err.info = '无法获取到下载链接,请通过播放页面点击“调试”按钮获取'
reject(err)
})
}
})
})
},
/**
* 检查资源
* @param {*} key 资源网 key
* @returns boolean
*/
async check (key, id) {
try {
const cls = await this.class(key)
if (cls) {
return true
} else {
return false
}
} catch (e) {
return false
}
},
/**
* 检查直播源
* @param {*} channel 直播频道 url
* @returns boolean
*/
checkChannel (url) {
return new Promise((resolve, reject) => {
const supportFormats = /\.(m3u8|flv)$/
const extRE = url.match(supportFormats) || new URL.URL(url).pathname.match(supportFormats)
if (extRE[1] === 'flv') {
const MAX_CONTENT_LENGTH = 2000 // axios配置maxContentLength不生效先用request凑合
let receivedLength = 0
let options = { uri: url, gzip: true, timeout: 10000 }
if (proxyURL) {
if (proxyURL.startsWith('http')) options = Object.assign({ proxy: proxyURL }, options)
if (proxyURL.startsWith('socks5')) options = Object.assign({ agent: new SocksProxyAgent(proxyURL) }, options)
}
const req = request.get(options)
.on('data', (str) => {
receivedLength += str.length
if (receivedLength > MAX_CONTENT_LENGTH) {
resolve(true) // 应该用FLVDemuxer.probe来检测先凑合
req.abort()
}
})
.on('error', function (err) {
resolve(false)
console.log(err)
})
.on('end', () => { resolve(false) })
} else if (extRE[1] === 'm3u8') {
axios.get(url).then(res => {
const manifest = res.data
const parser = new M3u8Parser()
parser.push(manifest)
parser.end()
const parsedManifest = parser.manifest
if (parsedManifest.segments.length) {
resolve(true)
} else {
resolve(false)
}
}).catch(e => {
resolve(false)
})
}
})
},
/**
* 获取豆瓣页面链接
* @param {*} name 视频名称
* @param {*} year 视频年份
* @returns 豆瓣页面链接,如果没有搜到该视频,返回搜索页面链接
*/
doubanLink (name, year) {
return new Promise((resolve, reject) => {
// 豆瓣搜索链接
const nameToSearch = name.replace(/\s/g, '')
const doubanSearchLink = 'https://www.douban.com/search?q=' + nameToSearch
axios.get(doubanSearchLink).then(res => {
const $ = cheerio.load(res.data)
// 查询所有搜索结果, 看名字和年代是否相符
let link = ''
$('div.result').each(function () {
const linkInDouban = $(this).find('div>div>h3>a').first()
const nameInDouban = linkInDouban.text().replace(/\s/g, '')
const subjectCast = $(this).find('span.subject-cast').text()
if (nameToSearch === nameInDouban && subjectCast && subjectCast.includes(year)) {
link = linkInDouban.attr('href')
}
})
if (link) {
resolve(link)
} else {
// 如果没找到符合的链接,返回搜索页面
resolve(doubanSearchLink)
}
}).catch(err => {
reject(err)
})
})
},
/**
* 获取豆瓣评分
* @param {*} name 视频名称
* @param {*} year 视频年份
* @returns 豆瓣评分
*/
doubanRate (name, year) {
return new Promise((resolve, reject) => {
const nameToSearch = name.replace(/\s/g, '')
this.doubanLink(nameToSearch, year).then(link => {
if (link.includes('https://www.douban.com/search')) {
resolve('暂无评分')
} else {
axios.get(link).then(response => {
const parsedHtml = cheerio.load(response.data)
const rating = parsedHtml('body').find('#interest_sectl').first().find('strong').first()
if (rating.text()) {
resolve(rating.text().replace(/\s/g, ''))
} else {
resolve('暂无评分')
}
}).catch(err => {
reject(err)
})
}
}).catch(err => {
reject(err)
})
})
},
get7kParseURL () {
return new Promise((resolve, reject) => {
axios.get('https://zy.7kjx.com/').then(res => {
const $ = cheerio.load(res.data)
const parseURL = $('body > div.container > div > div.stui-pannel > div.col-pd > p:contains("解析接口:")').first().find('a').text()
resolve(parseURL)
}).catch(err => { reject(err) })
})
},
proxy () {
return new Promise((resolve, reject) => {
setting.find().then(db => {
if (db && db.proxy && db.proxy.type === 'manual') {
if (db.proxy.scheme && db.proxy.url && db.proxy.port) {
proxyURL = db.proxy.scheme + '://' + db.proxy.url.trim() + ':' + db.proxy.port.trim()
session.setProxy({ proxyRules: proxyURL })
http.globalAgent = https.globalAgent = new ElectronProxyAgent(session)
}
} else {
proxyURL = ''
session.setProxy({ proxyRules: 'direct://' })
http.globalAgent = https.globalAgent = new ElectronProxyAgent(session)
}
// 不要删了,留着测试用
// axios.get('https://api.my-ip.io/ip').then(res => console.log(res))
})
})
}
}
zy.proxy()
export default zy

53
src/lib/update/update.js Normal file
View File

@@ -0,0 +1,53 @@
import { BrowserWindow, ipcMain } from 'electron'
const { autoUpdater } = require('electron-updater')
// electron-updater 增量更新时似乎无法显示进度
export function initUpdater (win = BrowserWindow) {
autoUpdater.autoDownload = false
autoUpdater.autoInstallOnAppQuit = true
// 主进程监听检查更新事件
ipcMain.on('checkForUpdate', () => {
autoUpdater.checkForUpdates()
})
// 主进程监听开始下载事件
ipcMain.on('downloadUpdate', () => {
autoUpdater.downloadUpdate()
})
// 主进程监听退出并安装事件
ipcMain.on('quitAndInstall', () => {
autoUpdater.quitAndInstall()
})
// 开始检测是否有更新
autoUpdater.on('checking-for-update', () => {
win.webContents.send('checking-for-update')
})
// 检测到有可用的更新
autoUpdater.on('update-available', (info) => {
win.webContents.send('update-available', info)
})
// 没有检测到有可用的更新
autoUpdater.on('update-not-available', () => {
win.webContents.send('update-not-available')
})
// 更新出错
autoUpdater.on('update-error', err => {
win.webContents.send('update-error', err)
})
// 下载更新进度
autoUpdater.on('download-progress', (progressObj) => {
win.webContents.send('download-progress', progressObj)
})
// 下载完成
autoUpdater.on('update-downloaded', () => {
win.webContents.send('update-downloaded')
})
}

View File

@@ -4,6 +4,7 @@ import store from './store'
import 'modern-normalize'
import Register from './components/register'
import './lib/element/index'
Register.registerComponents()
Vue.config.productionTip = false
new Vue({

View File

@@ -1,524 +0,0 @@
<template>
<div class="mini">
<div class="top">
<div class="left">
<span class="title">
<span v-if="m3u8Arr.length > 1"> {{(video.index + 1)}} </span>{{name}}
</span>
<span class="zy-svg" @click="prevEvent" v-show="video.index > 0">
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="backIconTitle">
<title id="backIconTitle">上一集</title>
<path d="M14 14.74L21 19V5l-7 4.26V5L2 12l12 7v-4.26z"></path>
</svg>
</span>
<span class="zy-svg" @click="nextEvent" v-show="video.index < (m3u8Arr.length - 1)">
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="forwardIconTitle">
<title id="forwardIconTitle">下一集</title>
<path d="M10 14.74L3 19V5l7 4.26V5l12 7-12 7v-4.26z"></path>
</svg>
</span>
<span class="opacity" v-show="opacity !== 100">透明度: {{opacity}}</span>
<span class="rate" v-show="rate !== 1">播放速率: {{rate}}</span>
<span class="progress" v-show="progress > 0">播放进度: {{progress}}%</span>
</div>
<div class="right">
<span class="top" @click="frameClickEvent('top')" title="置顶">
<svg t="1595919317571" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1188" style="width:10px;height:14px"><path d="M43.072 974.72l380.864-301.952 151.936 161.6c0 0 63.424 17.28 67.328-30.72l-3.904-163.584 225.088-259.648 98.048-5.696c0 0 76.928-15.488 21.184-82.752l-275.072-276.928c0 0-74.944-9.6-69.248 59.584l0 75.008L383.552 367.104 225.856 376.64c0 0-57.728 19.2-36.608 69.248l148.16 146.176L43.072 974.72 43.072 974.72z" p-id="1189" :fill="isAlwaysOnTop ? '#555555' : '#ffffff'"></path></svg>
</span>
<span class="min" @click="frameClickEvent('min')" title="最小化">
<svg t="1595917239849" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1155" style="width:8px;height:14px"><path d="M0 479.936C0 444.64 28.448 416 64.064 416L959.936 416C995.328 416 1024 444.736 1024 479.936L1024 544.064C1024 579.392 995.552 608 959.936 608L64.064 608C28.672 608 0 579.264 0 544.064L0 479.936Z" p-id="1156" fill="#ffffff"></path></svg>
</span>
<span class="max" @click="frameClickEvent('max')" title="最大化">
<svg t="1595917343956" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1540" style="width:8px;height:14px"><path d="M416 416 64.064 416C28.448 416 0 444.64 0 479.936L0 544.064C0 579.264 28.672 608 64.064 608L416 608 416 959.936C416 995.552 444.64 1024 479.936 1024L544.064 1024C579.264 1024 608 995.328 608 959.936L608 608 959.936 608C995.552 608 1024 579.36 1024 544.064L1024 479.936C1024 444.736 995.328 416 959.936 416L608 416 608 64.064C608 28.448 579.36 0 544.064 0L479.936 0C444.736 0 416 28.672 416 64.064L416 416Z" p-id="1541" fill="#ffffff"></path></svg>
</span>
<span class="close" @click="frameClickEvent('close')" title="关闭">
<svg t="1595917372551" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1685" style="width:8px;height:14px"><path d="M511.968 376.224 796.096 92.096C833.536 54.624 894.4 54.624 931.84 92.096 969.312 129.568 969.312 190.4 931.84 227.872L647.744 512 931.84 796.096C969.312 833.568 969.312 894.4 931.84 931.872 894.4 969.344 833.536 969.344 796.096 931.872L511.968 647.744 227.84 931.872C190.4 969.344 129.536 969.344 92.096 931.872 54.624 894.4 54.624 833.568 92.096 796.096L376.224 512 92.096 227.872C54.624 190.4 54.624 129.568 92.096 92.096 129.536 54.624 190.4 54.624 227.84 92.096L511.968 376.224Z" p-id="1686" fill="#ffffff"></path></svg>
</span>
</div>
</div>
<div class="bottom">
<div id="xg"></div>
</div>
</div>
</template>
<script>
import zy from '../lib/site/tools'
import { history, setting, shortcut, mini } from '../lib/dexie'
import mt from 'mousetrap'
import 'xgplayer'
import Hls from 'xgplayer-hls.js'
const { remote, ipcRenderer } = require('electron')
const VIDEO_DETAIL_CACHE = {}
export default {
name: 'mini',
data () {
const win = remote.getCurrentWindow()
return {
xg: null,
config: {
id: 'xg',
url: '',
lang: 'zh-cn',
width: '100%',
height: '100%',
autoplay: false,
videoInit: true,
screenShot: true,
keyShortcut: 'off',
crossOrigin: true,
cssFullscreen: true,
defaultPlaybackRate: 1,
playbackRate: [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 3, 4, 5],
controls: false
},
opacity: 100,
name: '',
video: {},
detail: {},
m3u8Arr: [],
rate: 1,
progress: 0,
isAlwaysOnTop: win.isAlwaysOnTop()
}
},
methods: {
frameClickEvent (e) {
const win = remote.getCurrentWindow()
if (e === 'min') {
win.minimize()
}
if (e === 'max') {
win.isMaximized() ? win.unmaximize() : win.maximize()
}
if (e === 'close') {
ipcRenderer.send('win')
return false
}
if (e === 'top') {
this.isAlwaysOnTop = !this.isAlwaysOnTop
win.setAlwaysOnTop(this.isAlwaysOnTop)
}
},
opacityChange (val) {
const win = remote.getCurrentWindow()
const num = val / 100
win.setOpacity(num)
return false
},
getUrls () {
mini.find().then(res => {
this.video = res
this.fetchM3u8List(res).then(m3u8Arr => {
this.m3u8Arr = m3u8Arr
this.xg.src = m3u8Arr[res.index]
if (res.time !== 0 || res.time !== '') {
this.xg.play()
this.xg.once('playing', () => {
this.xg.currentTime = res.time
})
} else {
this.xg.play()
}
this.videoPlaying()
this.xg.once('ended', () => {
if (m3u8Arr.length > 1 && (m3u8Arr.length - 1 > res.index)) {
this.video.time = 0
this.video.index++
this.xg.src = m3u8Arr[this.video.index]
this.xg.play()
}
})
})
})
},
fetchM3u8List (info) {
return new Promise((resolve) => {
const cacheKey = info.site + '@' + info.ids
if (VIDEO_DETAIL_CACHE[cacheKey]) {
this.name = VIDEO_DETAIL_CACHE[cacheKey].name
resolve(VIDEO_DETAIL_CACHE[cacheKey].list)
return
}
zy.detail(info.site, info.ids).then(res => {
this.name = res.name
const dd = res.dl.dd
const type = Object.prototype.toString.call(dd)
let m3u8Txt = []
if (type === '[object Array]') {
for (const i of dd) {
if (i._t.indexOf('m3u8') >= 0) {
m3u8Txt = i._t.split('#')
}
}
} else {
m3u8Txt = dd._t.split('#')
}
const m3u8Arr = []
for (const i of m3u8Txt) {
const j = i.split('$')
if (j.length > 1) {
for (let m = 0; m < j.length; m++) {
if (j[m].indexOf('m3u8') >= 0) {
m3u8Arr.push(j[m])
}
}
} else {
m3u8Arr.push(j[0])
}
}
VIDEO_DETAIL_CACHE[cacheKey] = {
list: m3u8Arr,
name: res.name
}
resolve(m3u8Arr)
})
})
},
videoPlaying () {
history.find({ site: this.video.site, ids: this.video.ids }).then(res => {
if (res) {
res.index = this.video.index
history.update(res.id, res)
} else {
const doc = {
site: this.video.site,
ids: this.video.ids,
name: this.video.name,
index: this.video.index,
time: 0
}
history.add(doc)
}
})
this.timerEvent()
},
timerEvent () {
this.timer = setInterval(() => {
const endTime = this.xg.duration
const currentTime = this.xg.currentTime
const progress = (currentTime / endTime) * 100
this.progress = progress.toFixed(2)
history.find({ site: this.video.site, ids: this.video.ids }).then(res => {
if (res) {
const v = res
v.time = this.xg.currentTime
v.index = this.video.index
const id = v.id
delete v.id
history.update(id, v)
}
})
}, 10000)
},
prevEvent () {
if (this.video.index === 0) {
this.$message.info('已是第一集.')
return false
}
history.find({ site: this.video.site, ids: this.video.ids }).then(res => {
const v = res
const id = v.id
v.index--
delete v.id
history.update(id, v).then(e => {
this.xg.src = this.m3u8Arr[v.index]
this.video.index--
})
})
},
nextEvent () {
if (this.video.index >= this.m3u8Arr.length - 1) {
this.$message.info('已是最后一集.')
return false
}
history.find({ site: this.video.site, ids: this.video.ids }).then(res => {
const v = res
v.index++
const id = v.id
delete v.id
history.update(id, v).then(e => {
this.xg.src = this.m3u8Arr[v.index]
this.video.index++
})
})
},
playbackRateEvent (e) {
let rate = this.xg.playbackRate
if (rate > 0.25) {
rate = rate + e
this.xg.playbackRate = rate
}
},
mtEvent () {
setting.find().then(res => {
if (res.shortcut) {
shortcut.all().then(res => {
for (const i of res) {
mt.bind(i.key, () => {
this.shortcutEvent(i.name)
})
}
})
}
})
},
shortcutEvent (e) {
if (e === 'playAndPause') {
if (this.xg) {
if (this.xg.paused) {
this.xg.play()
} else {
this.xg.pause()
}
}
return false
}
if (e === 'forward') {
if (this.xg && !this.xg.paused) {
this.xg.currentTime += 5
}
return false
}
if (e === 'back') {
if (this.xg && !this.xg.paused) {
this.xg.currentTime -= 5
}
return false
}
if (e === 'volumeUp') {
if (this.xg && this.xg.volume < 0.9) {
this.xg.volume += 0.1
}
return false
}
if (e === 'volumeDown') {
if (this.xg && this.xg.volume > 0.2) {
this.xg.volume -= 0.1
}
return false
}
if (e === 'mute') {
if (this.xg) {
this.xg.volume = 0
}
return false
}
if (e === 'top') {
const win = remote.getCurrentWindow()
if (win.isAlwaysOnTop()) {
win.setAlwaysOnTop(false)
} else {
win.setAlwaysOnTop(true)
}
return false
}
if (e === 'fullscreen') {
if (this.xg.fullscreen) {
this.xg.exitFullscreen()
} else {
this.xg.getFullscreen(this.xg.root)
}
return false
}
if (e === 'escape') {
if (this.xg.fullscreen) {
this.xg.exitFullscreen()
this.xg.exitCssFullscreen()
}
return false
}
if (e === 'next') {
this.nextEvent()
return false
}
if (e === 'prev') {
this.prevEvent()
return false
}
if (e === 'home') {
if (this.xg && !this.xg.paused) {
this.xg.currentTime = 0
}
return false
}
if (e === 'end') {
if (this.xg && !this.xg.paused) {
const endTime = this.xg.duration
this.xg.currentTime = endTime
}
return false
}
if (e === 'opacityUp') {
const win = remote.getCurrentWindow()
if (this.opacity >= 10) {
this.opacity -= 5
const num = this.opacity / 100
win.setOpacity(num)
}
return false
}
if (e === 'opacityDown') {
const win = remote.getCurrentWindow()
if (this.opacity <= 95) {
this.opacity += 5
const num = this.opacity / 100
win.setOpacity(num)
}
return false
}
if (e === 'playbackRateUp') {
if (this.xg && !this.xg.paused) {
const rate = this.xg.playbackRate
this.xg.playbackRate = rate + 0.25
this.rate = this.xg.playbackRate
}
return false
}
if (e === 'playbackRateDown') {
if (this.xg && !this.xg.paused) {
const rate = this.xg.playbackRate
if (rate > 0.25) {
this.xg.playbackRate = rate - 0.25
this.rate = this.xg.playbackRate
}
}
return false
}
if (e === 'mini') {
ipcRenderer.send('win')
return false
}
}
},
mounted () {
this.xg = new Hls(this.config)
this.mtEvent()
this.getUrls()
},
beforeDestroy () {
clearInterval(this.timer)
}
}
</script>
<style lang="scss">
html,body{
padding: 1px;
margin: 0;
height: 100%;
width: 100%;
overflow: hidden;
background-color: #000;
}
.mini{
-webkit-app-region: drag;
box-sizing: border-box;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: flex-start;
flex-direction: column;
.top{
width: 100%;
height: 30px;
display: flex;
justify-content: space-between;
align-items: center;
user-select: none;
.zy-svg{
-webkit-app-region: no-drag;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
svg{
width: 24px;
height: 24px;
stroke: #888;
stroke-width: 1;
stroke-linecap: round;
stroke-linejoin: round;
fill: none;
}
}
.left{
display: flex;
justify-content: flex-start;
align-items: center;
height: 100%;
flex: 1;
.title, .opacity, .rate, .progress{
color: #888;
font-size: 12px;
margin: 0 10px;
}
}
.right{
width: 80px;
height: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
span{
-webkit-app-region: no-drag;
display: inline-block;
width: 14px;
height: 14px;
text-align: center;
line-height: 14px;
border-radius: 50%;
margin-right: 10px;
cursor: pointer;
opacity: 0.4;
&.min{
background-color: #32dc36;
}
&.max{
background-color: #ffbe2a;
}
&.close{
background-color: #ff5f56;
}
&.top{
background-color: #f3bab7;
}
&:hover{
animation: heartbeat 3s ease-in-out infinite both;
}
@keyframes heartbeat {
from {
transform: scale(1);
transform-origin: center center;
animation-timing-function: ease-out;
}
10% {
opacity: 1;
transform: scale(0.91);
animation-timing-function: ease-in;
}
17% {
transform: scale(0.98);
animation-timing-function: ease-out;
}
33% {
transform: scale(0.87);
animation-timing-function: ease-in;
}
45% {
transform: scale(1);
animation-timing-function: ease-out;
}
}
}
}
}
.bottom{
width: 100%;
flex: 1;
.xgplayer-start{
-webkit-app-region: no-drag;
}
}
}
</style>

View File

@@ -1,10 +0,0 @@
import Vue from 'vue'
import Mini from './Mini'
import 'modern-normalize'
import '../lib/element/index'
Vue.config.productionTip = false
new Vue({
render: h => h(Mini)
}).$mount('#app')

View File

@@ -26,10 +26,10 @@ export default new Vuex.Store({
key: '',
info: {}
},
editSites: {
show: false,
sites: []
}
appState: {
windowIsOnTop: false
},
DetailCache: {}
},
getters: {
getView: state => {
@@ -47,8 +47,11 @@ export default new Vuex.Store({
getVideo: state => {
return state.video
},
getEditSites: state => {
return state.editSites
getAppState: state => {
return state.appState
},
getDetailCache: state => {
return state.DetailCache
}
},
mutations: {
@@ -67,8 +70,11 @@ export default new Vuex.Store({
SET_VIDEO: (state, payload) => {
state.video = payload
},
SET_EDITSITES: (state, payload) => {
state.editSites = payload
SET_APPSTATE: (state, payload) => {
state.appState = payload
},
set_DetailCache: (state, payload) => {
state.DetailCache = payload
}
}
})

View File

@@ -1,7 +1,6 @@
module.exports = {
pages: {
index: 'src/main.js',
mini: 'src/mini/main.js'
index: 'src/main.js'
},
pluginOptions: {
electronBuilder: {

2372
yarn.lock

File diff suppressed because it is too large Load Diff