*/
static void
http_m3u_playlist_add(htsbuf_queue_t *hq, const char *hostpath,
- const char *url_remain, const char *profile,
+ const char *url_remain, const char *type,
+ const char *profile,
const char *svcname, const char *chnum,
const char *logo, const char *epgid,
int urlauth, access_t *access)
if (urlauth == URLAUTH_TICKET)
ticket = access_ticket_create(url_remain, access);
htsbuf_append_str(hq, "#EXTINF:-1");
+ if (type)
+ htsbuf_qprintf(hq, " type=\"%s\"", type);
if (!strempty(logo)) {
int id = imagecache_get_id(logo);
if (id) {
if (pltype == PLAYLIST_M3U) {
htsbuf_append_str(hq, "#EXTM3U\n");
- http_m3u_playlist_add(hq, hostpath, buf, profile, name,
+ http_m3u_playlist_add(hq, hostpath, buf, NULL, profile, name,
channel_get_number_as_str(channel, chnum, sizeof(chnum)),
channel_get_icon(channel),
channel_get_uuid(channel, ubuf),
snprintf(buf, sizeof(buf), "/stream/channelid/%d", channel_get_id(ch));
name = channel_get_name(ch, blank);
if (pltype == PLAYLIST_M3U) {
- http_m3u_playlist_add(hq, hostpath, buf, profile, name,
+ http_m3u_playlist_add(hq, hostpath, buf, NULL, profile, name,
channel_get_number_as_str(ch, chnum, sizeof(chnum)),
channel_get_icon(ch),
channel_get_uuid(ch, ubuf),
ct = ctlist[idx];
if (pltype == PLAYLIST_M3U) {
snprintf(buf, sizeof(buf), "/playlist/tagid/%d", idnode_get_short_uuid(&ct->ct_id));
- http_m3u_playlist_add(hq, hostpath, buf, profile, ct->ct_name, NULL,
+ http_m3u_playlist_add(hq, hostpath, buf, "playlist",
+ profile, ct->ct_name, NULL,
channel_tag_get_icon(ct),
NULL, urlauth, hc->hc_access);
} else if (pltype == PLAYLIST_E2) {
snprintf(buf, sizeof(buf), "/stream/channelid/%d", channel_get_id(ch));
if (pltype == PLAYLIST_M3U) {
- http_m3u_playlist_add(hq, hostpath, buf, profile, name,
+ http_m3u_playlist_add(hq, hostpath, buf, NULL, profile, name,
channel_get_number_as_str(ch, chnum, sizeof(chnum)),
channel_get_icon(ch),
channel_get_uuid(ch, ubuf),