]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
support: fix IPTV configuration migration for disabled/unmapped channels
authorAdam Sutton <dev@adamsutton.me.uk>
Mon, 30 Dec 2013 14:43:06 +0000 (14:43 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Mon, 30 Dec 2013 14:43:56 +0000 (14:43 +0000)
support/conf_migrate.py

index edf2f70b0194d598a33d7808b30b18bcaa122396..fbfefa540d4dc78be6da9b61fe4207251c13d9a7 100755 (executable)
@@ -217,9 +217,13 @@ def iptv_network ( nets, opts ):
       m = muxes[url]
 
     # Create service entry
-    d['svcname']         = d['channelname']
+    if 'channelname' in d:
+      d['svcname']       = d['channelname']
+    else:
+      d['svcname']       = ''
     d['dvb_servicetype'] = d['stype']
     d['sid']             = 1 # Let's hope!
+    d['enabled']         = e
     m['svcs']            = { '1' : d }
 
     # Remove
@@ -227,7 +231,6 @@ def iptv_network ( nets, opts ):
       if f in d:
         del d[f]
 
-
   nets.append({ 'type'          : 'iptv',
                 'muxs'          : muxes,\
                 'skipinitscan'  : True,\