]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Include radio stations in the service probe. 13/head
authorJohn Törnblom <john.tornblom@gmail.com>
Thu, 27 Jan 2011 15:05:26 +0000 (16:05 +0100)
committerJohn Törnblom <john.tornblom@gmail.com>
Thu, 27 Jan 2011 15:10:29 +0000 (16:10 +0100)
src/service.c
src/service.h
src/serviceprobe.c

index 68832e48c1830800713ac2fc9c8bf28c6dbdffeb..94c0f3453bb26e7b554762fc6998804d8e9248a4 100644 (file)
@@ -720,6 +720,14 @@ service_is_tv(service_t *t)
     t->s_servicetype == ST_AC_HDTV;
 }
 
+/**
+ *
+ */
+int
+service_is_radio(service_t *t)
+{
+  return t->s_servicetype == ST_RADIO;
+}
 
 /**
  *
index b2a687f4c4ba49ab6f25b40c803f1fe3b2ee2df9..4042eff65b9c50b3d132893d8f389ce91e11cbc7 100644 (file)
@@ -516,6 +516,8 @@ const char *service_servicetype_txt(service_t *t);
 
 int service_is_tv(service_t *t);
 
+int service_is_radio(service_t *t);
+
 void service_destroy(service_t *t);
 
 void service_remove_subscriber(service_t *t, struct th_subscription *s,
index 5b14439685fd5203d6ef918dedc61f19048acebd..826f7965d32741825a87ff3592d83dd43af297c3 100644 (file)
@@ -44,8 +44,8 @@ static pthread_cond_t serviceprobe_cond;
 void
 serviceprobe_enqueue(service_t *t)
 {
-  if(!service_is_tv(t))
-    return; /* Don't even consider non-tv channels */
+  if(!service_is_tv(t) && !service_is_radio(t))
+    return; /* Don't even consider non-tv/non-radio channels */
 
   if(t->s_sp_onqueue)
     return;
@@ -170,9 +170,11 @@ serviceprobe_thread(void *aux)
        tvhlog(LOG_INFO, "serviceprobe", "%20s: mapped to channel \"%s\"",
               t->s_svcname, t->s_svcname);
 
-       channel_tag_map(ch, channel_tag_find_by_name("TV channels", 1), 1);
-       tvhlog(LOG_INFO, "serviceprobe", "%20s: joined tag \"%s\"",
-              t->s_svcname, "TV channels");
+       if(service_is_tv(t)) {
+         channel_tag_map(ch, channel_tag_find_by_name("TV channels", 1), 1);
+         tvhlog(LOG_INFO, "serviceprobe", "%20s: joined tag \"%s\"",
+                t->s_svcname, "TV channels");
+       }
 
        switch(t->s_servicetype) {
        case ST_SDTV:
@@ -183,6 +185,9 @@ serviceprobe_thread(void *aux)
        case ST_AC_HDTV:
          str = "HDTV";
          break;
+       case ST_RADIO:
+         str = "Radio";
+         break;
        default:
          str = NULL;
        }