Skip to content

一分钟搭建影视站,支持Docker等部署方式

Update api.js

Charlotteantydc59e8780605
diff --git a/js/api.js b/js/api.js
index b2cf2a0..405d6c9 100644
--- a/js/api.js
+++ b/js/api.js
@@ -309,7 +309,8 @@ async function handleSpecialSourceDetail(id, sourceCode) {
const generalPattern = /\$(https?:\/\/[^"'\s]+?\.m3u8)/g;
matches = html.match(generalPattern) || [];
}
-
+ // 去重处理,避免一个播放源多集显示
+ matches = [...new Set(matches)];
// 处理链接
matches = matches.map(link => {
link = link.substring(1, link.length);