diff --git a/index.html b/index.html index de35517..5f4147c 100644 --- a/index.html +++ b/index.html @@ -60,7 +60,7 @@ margin-bottom: 2rem; } - .project-info h2 { + .project-info h2, .project-info h3 { margin-top: 0; } @@ -73,6 +73,10 @@ .project-info a:hover { text-decoration: underline; } + + .playlist-links p { + margin: 0.5rem 0; + } .category-folder { border: 1px solid var(--border-color); @@ -95,17 +99,29 @@ width: 100%; border-collapse: collapse; } + + .channel-table th, .channel-table td { + padding: 0.75rem 1.5rem; + border-top: 1px solid var(--border-color); + text-align: left; + } - .channel-table td { - text-align: left; - padding: 0.75rem 1.5rem; - border-top: 1px solid var(--border-color); + .channel-table th { + font-weight: 600; + font-size: 0.9rem; + color: var(--muted-text-color); } .channel-name { display: flex; align-items: center; } + + .channel-table a { + color: var(--accent-color); + text-decoration: none; + font-weight: 500; + } .unstable-icon { color: #ffc107; @@ -131,24 +147,28 @@ const parseM3U = (m3uContent, isStable) => { const lines = m3uContent.split('\n'); const channels = {}; - const regex = /group-title="([^"]+)"/ - - for (const line of lines) { + const regex = /group-title="([^"]+)"/; + + for (let i = 0; i < lines.length; i++) { + const line = lines[i]; if (line.startsWith('#EXTINF:-1')) { try { + const nextLine = lines[i + 1]; + if (!nextLine || nextLine.startsWith('#')) continue; + const countryMatch = line.match(regex); if (!countryMatch) continue; const country = countryMatch[1].trim(); const channelName = line.split(',').pop().trim(); + const streamUrl = nextLine.trim(); if (!channels[country]) { channels[country] = {}; } - // Přidáme kanál, pouze pokud ještě neexistuje, abychom předešli duplicitám if (!channels[country][channelName]) { - channels[country][channelName] = { name: channelName, stable: isStable }; + channels[country][channelName] = { name: channelName, stable: isStable, url: streamUrl }; } } catch (e) { console.error("Chyba při parsování řádku:", line, e); @@ -169,6 +189,12 @@ {isOpen && (
Channel | +Stream Link | +
---|---|
+ Link + |