mirror of
https://github.com/fanmingming/live.git
synced 2025-12-20 01:00:59 +08:00
@@ -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}"`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user