Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use platform=pyTivo for (Zeroconf announcements of) music and photo s…

…hares,

to suppress the HDUI from changing the share names to "Photos on X's PC"
format; retain platform=pc for video so it keeps the icon.
  • Loading branch information...
commit 4d5afbf2560ef1c0305237fd9b6d9dcf8389b76a 1 parent f3c53c1
@wmcbrine authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 beacon.py
View
10 beacon.py
@@ -12,6 +12,8 @@
from plugin import GetPlugin
SHARE_TEMPLATE = '/TiVoConnect?Command=QueryContainer&Container=%s'
+PLATFORM_MAIN = 'pyTivo'
+PLATFORM_VIDEO = 'pc' # For the nice icon
class ZCListener:
def __init__(self, names):
@@ -36,10 +38,14 @@ def __init__(self, logger):
for section, settings in config.getShares():
ct = GetPlugin(settings['type']).CONTENT_TYPE
if ct.startswith('x-container/'):
+ if 'video' in ct:
+ platform = PLATFORM_VIDEO
+ else:
+ platform = PLATFORM_MAIN
logger.info('Registering: %s' % section)
self.share_names.append(section)
desc = {'path': SHARE_TEMPLATE % quote(section),
- 'platform': 'pc', 'protocol': 'http'}
+ 'platform': platform, 'protocol': 'http'}
tt = ct.split('/')[1]
info = Zeroconf.ServiceInfo('_%s._tcp.local.' % tt,
'%s._%s._tcp.local.' % (section, tt),
@@ -108,7 +114,7 @@ def format_beacon(self, conntype, services=True):
'method=%s' % conntype,
'identity=%s' % config.getGUID(),
'machine=%s' % gethostname(),
- 'platform=pc']
+ 'platform=%s' % PLATFORM_MAIN]
if services:
beacon.append('services=' + self.format_services())

0 comments on commit 4d5afbf

Please sign in to comment.
Something went wrong with that request. Please try again.