Changeset b469cf58a56f01b71ccdb1b4ebb73904dc39c8ba
- Timestamp:
- 02/10/08 01:02:43 (1 year ago)
- git-parent:
[a567b71819c8005b304615b039ff22c5447c7a3e], [d037640ab285301da7b4f2fa513ce393ce194b86]
- Files:
-
- config.py (modified) (1 diff)
- httpserver.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
config.py
ra567b71 rb469cf5 42 42 return True 43 43 44 def getShares( ):44 def getShares(tsn=''): 45 45 shares = [(section, dict(config.items(section))) 46 46 for section in config.sections() 47 47 if not(section.startswith('_tivo_') or section == 'Server')] 48 49 if config.has_section('_tivo_' + tsn): 50 if config.has_option('_tivo_' + tsn, 'shares'): 51 # clean up leading and trailing spaces & make sure ref is valid 52 tsnshares = [] 53 for x in config.get('_tivo_' + tsn, 'shares').split(','): 54 y = x.lstrip().rstrip() 55 if config.has_section(y): 56 tsnshares += [(y, dict(config.items(y)))] 57 if tsnshares: 58 shares = tsnshares 48 59 49 60 for name, data in shares: httpserver.py
rfd09e90 rb51abdd 88 88 89 89 def root_container(self): 90 tsn = self.headers.getheader('TiVo_TCD_ID', '') 91 tsnshares = config.getShares(tsn) 92 tsncontainers = {} 93 for section, settings in tsnshares: 94 settings['content_type'] = GetPlugin(settings['type']).CONTENT_TYPE 95 tsncontainers[section] = settings 90 96 t = Template(file=os.path.join(SCRIPTDIR, 'templates', 91 97 'root_container.tmpl')) 92 t.containers = self.server.containers98 t.containers = tsncontainers 93 99 t.hostname = socket.gethostname() 94 100 t.escape = escape
