]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Use channel name as title of stream and set the programme name as a tag named TITLE
authorJohn Törnblom <john.tornblom@gmail.com>
Mon, 5 Mar 2012 14:53:14 +0000 (15:53 +0100)
committerJohn Törnblom <john.tornblom@gmail.com>
Mon, 5 Mar 2012 14:53:14 +0000 (15:53 +0100)
src/dvr/mkmux.c

index 85c3f2336a5ac00caf993b6321e9f8b67262d13f..6aea66fbf87e50db76818f27132a27e6a5fcc870 100644 (file)
@@ -551,6 +551,9 @@ mk_build_metadata2(const event_t *e)
   if(e->e_channel != NULL)
     addtag(q, build_tag_string("TVCHANNEL", e->e_channel->ch_name, 0, NULL));
 
+  if(e->e_title != NULL)
+    addtag(q, build_tag_string("TITLE", e->e_title, 0, NULL));
+
   if(e->e_episode.ee_onscreen)
     addtag(q, build_tag_string("SYNOPSIS", 
                               e->e_episode.ee_onscreen, 0, NULL));
@@ -740,7 +743,12 @@ mk_mux_stream_create(int fd, const struct streaming_start *ss,
   getuuid(mkm->uuid);
   mkm->filename = strdup("Live stream");
   mkm->fd = fd;
-  mkm->title = strdup(e ? e->e_title : mkm->filename);
+
+  if(e && e->e_channel && e->e_channel->ch_name)
+    mkm->title = strdup(e->e_channel->ch_name);
+  else
+    mkm->title = strdup("Live stream");
+
   TAILQ_INIT(&mkm->cues);
 
   htsbuf_queue_init(&q, 0);