Show channel category in search results

Each channel already carries a Topic field, but search results only
showed the name and logo. Render it as a small badge in both the
list and grid views when present.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
ubuntu
2026-08-31 01:33:34 +00:00
co-authored by Claude Sonnet 5
parent 4e596114c1
commit e5df068778
+4 -1
View File
@@ -1985,6 +1985,8 @@
var name_channel = element['Name']
var url_channel = element['url']
var id_playlist = element['id_playlist']
var topic_channel = element['Topic'] || ''
var topicBadge = topic_channel ? `<span class="badge bg-secondary channel-topic-badge">${topic_channel}</span>` : ''
var url_channel_macos = url_channel.replace("http://", 'rtmp://')
var oid = ''
@@ -2012,6 +2014,7 @@
<img src="logos/${id_channel}.jpg" class="channel-row-logo"
onerror="this.onerror=null; this.src='get_logo?id_channel=${id_channel}&id_playlist=${id_playlist}';">
<span class="channel-row-name text-truncate">${name_channel}</span>
${topicBadge}
${colorCircle}
</div>
@@ -2031,7 +2034,7 @@
data-name_channel="${name_channel}"
data-id_channel="${id_channel}"
data-id_playlist="${id_playlist}">${name_channel}</p>
<div class="d-flex justify-content-center align-items-center gap-2">${colorCircle}</div>
<div class="d-flex justify-content-center align-items-center gap-2">${colorCircle}${topicBadge}</div>
<div class="d-flex justify-content-center gap-2 mt-3">
<button data-display_url="${url_channel}" class="btn_display_url btn btn-sm btn-outline-info">url</button>
<a class="btn btn-sm btn-primary" href="vlc://${url_channel_macos}">vlc ios</a>