From 7e8b2ca467d3c2390bd161fd1624267166014a27 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Thu, 12 Jun 2014 11:33:30 -0400 Subject: [PATCH] Add a TiVo-Desktop-style "tsn" field to each share's Zeroconf announcement. (Note that TD uses the same uuid for all shares, but it only allows one of each type; I suspect we're better off using unique IDs for each, so that's what's done here.) --- beacon.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/beacon.py b/beacon.py index 719ba00..788d028 100644 --- a/beacon.py +++ b/beacon.py @@ -3,6 +3,7 @@ import re import socket import struct import time +import uuid from threading import Timer from urllib import quote @@ -50,7 +51,8 @@ class ZCBroadcast: logger.info('Registering: %s' % section) self.share_names.append(section) desc = {'path': SHARE_TEMPLATE % quote(section), - 'platform': platform, 'protocol': 'http'} + 'platform': platform, 'protocol': 'http', + 'tsn': '{%s}' % uuid.uuid4()} tt = ct.split('/')[1] title = section count = 1 -- 2.11.4.GIT