Changeset b469cf58a56f01b71ccdb1b4ebb73904dc39c8ba

Show
Ignore:
Timestamp:
02/10/08 01:02:43 (1 year ago)
Author:
wgw <tjm1100@gmail.com>
git-committer:
wgw <tjm1100@gmail.com> 1202626963 -0600
git-parent:

[a567b71819c8005b304615b039ff22c5447c7a3e], [d037640ab285301da7b4f2fa513ce393ce194b86]

git-author:
wgw <tjm1100@gmail.com> 1202626963 -0600
Message:

Merge branch 'subfolders-8.3' of git://repo.or.cz/pyTivo/wmcbrine

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • config.py

    ra567b71 rb469cf5  
    4242    return True 
    4343 
    44 def getShares(): 
     44def getShares(tsn=''): 
    4545    shares = [(section, dict(config.items(section))) 
    4646              for section in config.sections() 
    4747              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 
    4859 
    4960    for name, data in shares: 
  • httpserver.py

    rfd09e90 rb51abdd  
    8888 
    8989    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 
    9096         t = Template(file=os.path.join(SCRIPTDIR, 'templates', 
    9197                                        'root_container.tmpl')) 
    92          t.containers = self.server.containers 
     98         t.containers = tsncontainers 
    9399         t.hostname = socket.gethostname() 
    94100         t.escape = escape