From: Adam Sutton Date: Sun, 6 Oct 2013 19:51:03 +0000 (+0100) Subject: support: update for some changes in configuration X-Git-Tag: v4.1~2453 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fe5f548facf63f2dfe7a7d466f21c313ff5ed4cc;p=thirdparty%2Ftvheadend.git support: update for some changes in configuration --- diff --git a/support/conf_migrate.py b/support/conf_migrate.py index f7f8a4269..69d85b34d 100755 --- a/support/conf_migrate.py +++ b/support/conf_migrate.py @@ -120,7 +120,8 @@ for a in adps: x = set(n['muxs'].keys()) y = set(m.keys()) i = x.intersection(x, y) - c = (2 * len(i)) / (len(x) + len(y)) + c = (2.0 * len(i)) / (len(x) + len(y)) + #print 'comp %d %d %d %f' % (len(x), len(y), len(i), c) if c > 0.5: f = True for k in m: @@ -141,6 +142,7 @@ if not os.path.exists(p): os.makedirs(p) i = 0 for n in nets: + i = i + 1 # Network config if n['type'] == 'A': @@ -169,10 +171,12 @@ for n in nets: 'tsid' : m['tsid'] } if m['type'] == 'C': + d['delsys'] = 'DVBC_ANNEX_AC' d['symbolrate'] = m['symr'] d['fec'] = m['fec'] d['constellation'] = m['cons'] elif m['type'] == 'T': + d['delsys'] = 'DVBT' d['bandwidth'] = m['bw'] d['constellation'] = m['cons'] d['tranmission_mode'] = m['txm'] @@ -183,10 +187,20 @@ for n in nets: elif m['type'] == 'S': d['symbolrate'] = m['symr'] d['fec'] = m['fec'] - d['polarisation'] = m['pol'] + d['polarisation'] = m['pol'][0] d['modulation'] = m['mod'] - d['delsys'] = m['del'] + d['delsys'] = m['del'][4:] + d['inversion'] = 'AUTO' + if 'rolloff' in m: + d['rolloff'] = m['rolloff'][8:] + elif d['delsys'] == 'DVBS': + d['rolloff'] = '35' + else: + d['rolloff'] = 'AUTO' + if d['modulation'] == 'PSK_8': + d['modulation'] = '8PSK' else: + d['delsys'] = 'ATSC' d['constellation'] = m['cons'] u = uuid() p3 = os.path.join(p2, 'muxes', u) @@ -210,7 +224,7 @@ for n in nets: # Find channel c = s['channelname'] if 'channelname' in s else None - print 'SVC %s CHN %s' % (str(s), str(c)) + #print 'SVC %s CHN %s' % (str(s), str(c)) if not c or c not in chns: continue c = chns[c]