mirror of
https://github.com/fanmingming/live
synced 2026-04-03 12:17:24 +08:00
@@ -79,7 +79,7 @@
|
|||||||
function convertToM3U() {
|
function convertToM3U() {
|
||||||
const txtInput = document.getElementById('txtInput').value;
|
const txtInput = document.getElementById('txtInput').value;
|
||||||
const lines = txtInput.split('\n');
|
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;
|
let currentGroup = null;
|
||||||
for (const line of lines) {
|
for (const line of lines) {
|
||||||
const trimmedLine = line.trim();
|
const trimmedLine = line.trim();
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
} else {
|
} else {
|
||||||
const [originalChannelName, channelLink] = trimmedLine.split(',').map(item => item.trim());
|
const [originalChannelName, channelLink] = trimmedLine.split(',').map(item => item.trim());
|
||||||
const processedChannelName = originalChannelName.replace(/(CCTV|CETV)-(\d+).*/, '$1$2');
|
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) {
|
if (currentGroup) {
|
||||||
m3uOutput += ` group-title="${currentGroup}"`;
|
m3uOutput += ` group-title="${currentGroup}"`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user