Replies: 17 comments 3 replies
-
|
自动适配这块打算重做成基于自定义策略的,用户可用选择器编写策略来适配自己的网站 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
我不是前端,我不知道,前端打包后某一代码块的class名称是不是一直保持不变,如果class是保持不变并且唯一的,那class名称去匹配是不是比较好 |
Beta Was this translation helpful? Give feedback.
-
|
以AList举例 |
Beta Was this translation helpful? Give feedback.
-
|
v0.15.0中添加自定义适配,可以尝试以下 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
<video id="myVideo" controls>
<source src="your-video-file.mp4" type="video/mp4">
</video>
<script src="https://cdn.jsdelivr.net/npm/crypto-js@4.1.1/crypto-js.js"></script>
<script>
async function getVideoMD5() {
const video = document.getElementById('myVideo');
const videoSrc = video.querySelector('source').src;
// 获取视频文件的前16MB数据
const response = await fetch(videoSrc);
const reader = response.body.getReader();
let receivedLength = 0; // 当前接收到的字节数
let chunks = []; // 保存流的字节块
let chunkSize = 16 * 1024 * 1024; // 16MB
while (receivedLength < chunkSize) {
const { done, value } = await reader.read();
if (done) break;
chunks.push(value);
receivedLength += value.length;
}
// 组合所有片段
const blob = new Blob(chunks);
// 读取 Blob 内容为 ArrayBuffer
const arrayBuffer = await blob.arrayBuffer();
// 使用 CryptoJS 生成 MD5 哈希
const wordArray = CryptoJS.lib.WordArray.create(arrayBuffer);
const md5Hash = CryptoJS.MD5(wordArray).toString();
console.log('MD5 Hash:', md5Hash);
}
// 监听页面加载完后调用
document.addEventListener('DOMContentLoaded', getVideoMD5);
</script>这个是chatgpt生成的获取video元素前16MB内容生成MD5的代码,大佬可以参考一下,我感觉还是使用获取哈希+标题去请求弹弹play的接口为主,手写正则表达式为辅比较好,用户手写正则表达式难度太大了 |
Beta Was this translation helpful? Give feedback.
-
|
构建显示失败是因为添加了新的权限所以商店要再审核 让用户写regex是有点难,但是我现在也想不到有什么更通用的办法。用一堆regex来提取标题什么的也不是没有,像这样https://github.com/Sonarr/Sonarr/blob/e6bd58453a532c137879c2b1a6a267dc4bf03828/src/NzbDrone.Core/Parser/Parser.cs#L20 弹弹Play有md5接口我是刚知道,这个可以研究下。但是毕竟这个插件不止支持弹弹play,其他源还是要靠关键词 我不清楚用这个插件的都是什么使用场景,我自己是Plex,Plex会对视频再次压制,而且视频标题也不会沿用文件名,而是根据tvdb等数据库重命名的。这种场景,还有比如Youtube之类的没有可用的文件名和哈希值的情况用弹弹Play的匹配也不一定效果很好。 Regex的匹配成功率的话,我自己这几天测试使用regex还没有出过问题,但是这个比较依赖标题的准确性。 现在的这个方案是最大化通用性,之后再对各个源单独做优化,比如md5。 单开了一个issue #35 追踪一下。可能可以做个开关让用户选择,我的理解能够使用md5的场景主要还是能够直接播放视频文件的情况,个人网盘之类的 |
Beta Was this translation helpful? Give feedback.
-
这正则表达式也太地狱了 |
Beta Was this translation helpful? Give feedback.
-
|
这个Sonarr我也在用,他就是用这些regex来识别番剧名然后再和数据库匹配,识别率还是不错的,很少碰到问题。其实如果视频来源比较固定,命名比较规则,regex应该还是可以的。我因为工作关系经常写,所以还好。网上有很多regex生成器也可以试试。 |
Beta Was this translation helpful? Give feedback.
-
|
plex,emby这些都没办法挂载网盘资源或者webdav资源,不然我也用了,我现在已经不想下载到本地看了,我弄监听rss推送115就是准备后面不下载到本地看了,组nas的用 plex,emby的比较多,我感觉还是网盘比较好用,一些旧的种子什么的本地根本下不动,除非玩pt有人保种,不用emby或者plex这种工具就会导致文件名全是字幕组定义好的,一家一个命名规则,难顶 |
Beta Was this translation helpful? Give feedback.
-
|
我看了一下,弹弹play的match api好像只提供文件名也可以匹配 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
开了 #36 |
Beta Was this translation helpful? Give feedback.
-
|
笑死我了,不过正则表达式真的写不来,我把你写的那个事例给chatgpt让它帮我写,它写出来的基本就没法用,[SZW] Strike the Blood TV13 [BDRpi][1080P][x.264 AAC][CHS-IN].mp4,这个我折腾半天,都没弄好,有个弄好了识别的是英文,也没出来结果 |
Beta Was this translation helpful? Give feedback.











Uh oh!
There was an error while loading. Please reload this page.
-
alist播放视频格式比较固定,应该可以拿到播放视频的名称,希望大佬添加一下对alist视频播放的自动识别
Beta Was this translation helpful? Give feedback.
All reactions