]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
webui: m3u playlist - mark tag playlists with type=playlist, fixes #5663
authorJaroslav Kysela <perex@perex.cz>
Thu, 24 Oct 2019 15:55:24 +0000 (17:55 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 24 Oct 2019 15:55:24 +0000 (17:55 +0200)
src/webui/webui.c

index 49bb531cfced3b18c8619b9eef293285eccc133a..3e63aeacc648c45799c687be6e456767abdcfdec 100644 (file)
@@ -499,7 +499,8 @@ http_stream_run(http_connection_t *hc, profile_chain_t *prch,
  */
 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)
@@ -508,6 +509,8 @@ http_m3u_playlist_add(htsbuf_queue_t *hq, const char *hostpath,
   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) {
@@ -637,7 +640,7 @@ http_channel_playlist(http_connection_t *hc, int pltype, int urlauth, channel_t
   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),
@@ -695,7 +698,7 @@ http_tag_playlist(http_connection_t *hc, int pltype, int urlauth, channel_tag_t
     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),
@@ -755,7 +758,8 @@ http_tag_list_playlist(http_connection_t *hc, int pltype, int urlauth)
     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) {
@@ -825,7 +829,7 @@ http_channel_list_playlist(http_connection_t *hc, int pltype, int urlauth)
     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),