Project

General

Profile

Feature #5323

Option to override Service Name

Added by Flole Systems over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-11-10
Due date:
% Done:

0%

Estimated time:

Description

I am distributing channels using the SAT-IP Server. Unfortunately some of my IPTV Sources are giving me weird names like "RTSP Stream" or "Service" as Service Name. Unfortunately this is being used on the SAT-IP Clients then aswell, so I have like 20 channels with the name "RTSP Stream". I would need an option here to override the Service Name (on automatic networks) in order to fix the name that incorrectly configured providers are giving out.

History

#1

Updated by john beton over 2 years ago

Which satip client are you using? Because you can set the names in a channellist as well. For example VLC or DVBViewer.

#2

Updated by Luis Alves over 2 years ago

I also find this annoying. It should allow to automatically set the service name the same as mux name in an automatic iptv network (where 1 mux has 1 service).

#3

Updated by Luis Alves over 2 years ago

By the way, I think there is a bug somewhere:

On the mux config there are options to set:
"Channel number", "Mux name" and "Service name".

The "Service name" in the mux config is correctly set by the playlist, but the Service tab always shows "Service".

#4

Updated by Luis Alves over 2 years ago

This will fix it:

diff --git a/src/input/mpegts/iptv/iptv_service.c b/src/input/mpegts/iptv/iptv_service.c
index 2292ca178..b5286c799 100644
--- a/src/input/mpegts/iptv/iptv_service.c
+++ b/src/input/mpegts/iptv/iptv_service.c
@@ -148,6 +148,9 @@ iptv_service_create0
   is->s_channel_epgid  = iptv_service_channel_epgid;
   is->s_channel_tags   = iptv_service_channel_tags;

+  if (im->mm_iptv_svcname)
+    is->s_dvb_svcname = strdup(im->mm_iptv_svcname);
+
   /* Set default service name */
   if (!is->s_dvb_svcname || !*is->s_dvb_svcname)
     if (im->mm_iptv_svcname)

Jaroslav,
I believe this should be the default behavior - if the "Service name" field is set on the mux config, it should apply the name not only to on the channel mapping, but also to the service name.

#5

Updated by Flole Systems over 2 years ago

VLC or DVBViewer may allow that, but using a TV as Client (or 10 TVs) makes that more difficult.

I will try that patch, thank you!

#6

Updated by Luis Alves over 2 years ago

I tested and it does the right thing when you open tvheadend and the "Services" config tab shows the proper configured service name.

But this patch is not enough - somewhere else in the code when the service is "played" or the mux re-scanned it overrides the configured name with the service name coming from the stream itself(?).

#7

Updated by Luis Alves over 2 years ago

Here is the missing code.
Adding this path to the above will make tvh to only update the service name if the network discovery mode is set to "New muxes & changed muxes".

diff --git a/src/input/mpegts/dvb_psi.c b/src/input/mpegts/dvb_psi.c
index e04d2df6c..7875b8eb6 100644
--- a/src/input/mpegts/dvb_psi.c
+++ b/src/input/mpegts/dvb_psi.c
@@ -1681,10 +1681,14 @@ dvb_sdt_mux
     }

     /* Update name */
-    if (*sname && strcmp(s->s_dvb_svcname ?: "", sname)) {
+    if (*sname && strcmp(s->s_dvb_svcname ?: "", sname) &&
+        s->s_dvb_mux->mm_network->mn_autodiscovery == MN_DISCOVERY_CHANGE &&
+        !s->s_dvb_svcname && !*s->s_dvb_svcname ) {
       if (!s->s_dvb_svcname || master) {
         tvh_str_update(&s->s_dvb_svcname, sname);
         save2 = 1;
         tvhtrace(mt->mt_subsys, "%s:    name changed", mt->mt_name);
       }
     }
#8

Updated by Luis Alves over 2 years ago

My bad on the patch above. It should be:

diff --git a/src/input/mpegts/dvb_psi.c b/src/input/mpegts/dvb_psi.c
index e04d2df6c..880a1a90f 100644
--- a/src/input/mpegts/dvb_psi.c
+++ b/src/input/mpegts/dvb_psi.c
@@ -1681,7 +1681,8 @@ dvb_sdt_mux
     }

     /* Update name */
-    if (*sname && strcmp(s->s_dvb_svcname ?: "", sname)) {
+    if (*sname && strcmp(s->s_dvb_svcname ?: "", sname) &&
+        s->s_dvb_mux->mm_network->mn_autodiscovery == MN_DISCOVERY_CHANGE) {
       if (!s->s_dvb_svcname || master) {
         tvh_str_update(&s->s_dvb_svcname, sname);
         save2 = 1;

I'm not sure if the "Network discovery" should be the switch to enable the "auto service name change".

Also available in: Atom PDF