From a14de05547fc6c38e1e47766ef9efee01f401508 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Fri, 31 Jul 2009 20:54:16 -0400 Subject: [PATCH] With these changes, the settings page validates as HTML 4.01 Strict (unless you have shares with invalid characters in the names -- have to work on that) -- but it still doesn't actually work if I use that doctype. Hmpf. --- plugins/settings/help.txt | 2 +- plugins/settings/settings.py | 6 ++++++ plugins/settings/templates/settings.tmpl | 35 ++++++++++++++++---------------- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/plugins/settings/help.txt b/plugins/settings/help.txt index ce78223..4ca998b 100644 --- a/plugins/settings/help.txt +++ b/plugins/settings/help.txt @@ -52,7 +52,7 @@ the reset. Note: The only setting that will not take effect until a hard restart is the Port setting. Changing the Port setting requires a full restart. -Add a New Section +Add_a_New_Section Add the name of a new section: If you want to add a TiVo section, remember it must start with "_tivo_". You must save your settings before diff --git a/plugins/settings/settings.py b/plugins/settings/settings.py index 458d24b..76b4e42 100644 --- a/plugins/settings/settings.py +++ b/plugins/settings/settings.py @@ -103,7 +103,13 @@ class Settings(Plugin): def UpdateSettings(self, handler, query): config.reset() for section in ['Server', '_tivo_SD', '_tivo_HD']: + new_setting = new_value = ' ' for key in query: + if key.startswith('opts.'): + data = query[key] + del query[key] + key = key[5:] + query[key] = data if key.startswith(section + '.'): _, option = key.split('.') if not config.config.has_section(section): diff --git a/plugins/settings/templates/settings.tmpl b/plugins/settings/templates/settings.tmpl index de7ae3c..4cb8ff8 100644 --- a/plugins/settings/templates/settings.tmpl +++ b/plugins/settings/templates/settings.tmpl @@ -3,7 +3,7 @@ pyTivo Web Configuration -