Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 01, 2012
@wmcbrine wmcbrine 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.
4d5afbf
Commits on Mar 05, 2012
@wmcbrine wmcbrine Allow for malformed lines in the metadata output from ffmpeg. 9256868
Commits on Mar 06, 2012
@jpenney Merge remote-tracking branch 'upstream/master' 6198d3d
Showing with 18 additions and 9 deletions.
  1. +8 −2 beacon.py
  2. +10 −7 plugins/video/transcode.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())
View
17 plugins/video/transcode.py
@@ -895,15 +895,18 @@ def video_info(inFile, cache=True):
if line.startswith(' Duration:'):
flag = False
else:
- key, value = [x.strip() for x in line.split(':', 1)]
try:
- value = value.decode('utf-8')
+ key, value = [x.strip() for x in line.split(':', 1)]
+ try:
+ value = value.decode('utf-8')
+ except:
+ if sys.platform == 'darwin':
+ value = value.decode('macroman')
+ else:
+ value = value.decode('iso8859-1')
+ rawmeta[key] = [value]
except:
- if sys.platform == 'darwin':
- value = value.decode('macroman')
- else:
- value = value.decode('iso8859-1')
- rawmeta[key] = [value]
+ pass
vInfo['rawmeta'] = rawmeta

No commit comments for this range

Something went wrong with that request. Please try again.