From b0a79a9c634681d777aaec3f03626751feaaac5a Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sun, 8 Nov 2009 19:08:26 -0500 Subject: [PATCH] Keep the shares sorted on the root container page (needed if Zeroconf is disabled). --- httpserver.py | 4 ++-- templates/root_container.tmpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/httpserver.py b/httpserver.py index a42a3e6..b09b582 100644 --- a/httpserver.py +++ b/httpserver.py @@ -175,12 +175,12 @@ class TivoHTTPHandler(BaseHTTPServer.BaseHTTPRequestHandler): def root_container(self): tsn = self.headers.getheader('TiVo_TCD_ID', '') tsnshares = config.getShares(tsn) - tsncontainers = {} + tsncontainers = [] for section, settings in tsnshares: try: settings['content_type'] = \ GetPlugin(settings['type']).CONTENT_TYPE - tsncontainers[section] = settings + tsncontainers.append((section, settings)) except Exception, msg: self.server.logger.error(section + ' - ' + str(msg)) t = Template(file=os.path.join(SCRIPTDIR, 'templates', diff --git a/templates/root_container.tmpl b/templates/root_container.tmpl index 15c1f34..0316293 100644 --- a/templates/root_container.tmpl +++ b/templates/root_container.tmpl @@ -7,7 +7,7 @@ #echo len($containers) # - #for $name, $details in $containers.items() + #for $name, $details in $containers
$escape($name) -- 2.11.4.GIT