From 3bf53416e13d3d996a865d4fb22b2bf9cd6d1948 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Thu, 12 Jun 2014 13:40:20 -0400 Subject: [PATCH] To include non-TiVo video servers (TD, other pyTivos, etc.) in the "Pull from" list, add the "togo_all" option to the Server section of pyTivo.conf with a true value. --- beacon.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/beacon.py b/beacon.py index 788d028..517b7a8 100644 --- a/beacon.py +++ b/beacon.py @@ -86,14 +86,17 @@ class ZCBroadcast: # Now get the addresses -- this is the slow part for name in names: info = self.rz.getServiceInfo(VIDS, name + '.' + VIDS) - if info and 'TSN' in info.properties: - tsn = info.properties['TSN'] - address = socket.inet_ntoa(info.getAddress()) - port = info.getPort() - config.tivos[tsn] = {'name': name, 'address': address, - 'port': port} - config.tivos[tsn].update(info.properties) - self.logger.info(name) + if info: + tsn = info.properties.get('TSN') + if config.get_server('togo_all'): + tsn = info.properties.get('tsn', tsn) + if tsn: + address = socket.inet_ntoa(info.getAddress()) + port = info.getPort() + config.tivos[tsn] = {'name': name, 'address': address, + 'port': port} + config.tivos[tsn].update(info.properties) + self.logger.info(name) return names -- 2.11.4.GIT