Update index.html

Signed-off-by: 范明明 <mingming@live.com>
This commit is contained in:
范明明
2024-12-20 11:35:09 +08:00
committed by GitHub
parent 61d59807a4
commit 3b176bcb03

View File

@@ -79,7 +79,7 @@
function convertToM3U() {
const txtInput = document.getElementById('txtInput').value;
const lines = txtInput.split('\n');
let m3uOutput = '#EXTM3U x-tvg-url="https://live.fanmingming.com/e.xml"\n';
let m3uOutput = '#EXTM3U x-tvg-url="https://live.fanmingming.cn/e.xml"\n';
let currentGroup = null;
for (const line of lines) {
const trimmedLine = line.trim();
@@ -89,7 +89,7 @@
} else {
const [originalChannelName, channelLink] = trimmedLine.split(',').map(item => item.trim());
const processedChannelName = originalChannelName.replace(/(CCTV|CETV)-(\d+).*/, '$1$2');
m3uOutput += `#EXTINF:-1 tvg-name="${processedChannelName}" tvg-logo="https://live.fanmingming.com/tv/${processedChannelName}.png"`;
m3uOutput += `#EXTINF:-1 tvg-name="${processedChannelName}" tvg-logo="https://live.fanmingming.cn/tv/${processedChannelName}.png"`;
if (currentGroup) {
m3uOutput += ` group-title="${currentGroup}"`;
}