From 9b78a50c179bd2a3b1f7101a84c94d6984d72e4a Mon Sep 17 00:00:00 2001 From: Paul Busch Date: Sun, 10 Jul 2011 19:00:04 +0200 Subject: [PATCH] more templates --- data/interfaces/default/config.tmpl | 237 ++++++++++++++++++++++++++ data/interfaces/default/hostory.tmpl | 3 + data/interfaces/default/upcoming.tmpl | 3 + webServer.py | 20 +-- 4 files changed, 253 insertions(+), 10 deletions(-) create mode 100644 data/interfaces/default/config.tmpl create mode 100644 data/interfaces/default/hostory.tmpl create mode 100644 data/interfaces/default/upcoming.tmpl diff --git a/data/interfaces/default/config.tmpl b/data/interfaces/default/config.tmpl new file mode 100644 index 00000000..b5b2fa8b --- /dev/null +++ b/data/interfaces/default/config.tmpl @@ -0,0 +1,237 @@ +#import os.path +#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl") +
+ +
+
+
+

Web Interface

+ + + + + + + + + + + + + + + + +
+

+ HTTP Host:

+
+ i.e. localhost or 0.0.0.0 +

+
+

+ HTTP Username:

+ +

+
+

+ HTTP Port:

+ +

+
+

+ HTTP Password:

+ +

+
+

Launch Browser on Startup:

+
+ +

Download Settings

+ + + + + + + + + + + + + + + + + + + + + + + +
+

SABnzbd Host:


+ + usually localhost:8080 +
+

SABnzbd Username:

+
+
+ +

SABnzbd API:

+
+
+ +

SABnzbd Password:

+
+
+ +

SABnzbd Category:

+
+
+ +

Music Download Directory:


+ + Absolute or relative path to the dir where SAB downloads your music
+ i.e. Downloads/music or /Users/name/Downloads/music
+
+
+ +

Usenet Retention:

+
+ +

Search Providers

+ + + + + + + + + + + + + + + + + + + + + + + + + +
+

NZBMatrix:

+
+

+ NZBMatrix Username:
+ +

+
+

+ NZBMatrix API:
+ +

+
+
+ +

Newznab:

+
+
+ +

+ Newznab Host:
+
+ i.e. http://nzb.su +

+
+
+ +

+ Newznab API:
+ +

+
+
+ +

NZBs.org:

+
+
+ +

+ NZBs.org UID:
+ +

+
+
+ +

+ NZBs.org Hash:
+ +

+
+ +

Quality & Post Processing

+ + + + + + + + + + + + + + + + +
+

Album Quality:

+ Include lossless
+ Convert lossless to mp3 +
+

+

iTunes:

+ Move downloads to iTunes +

+
+
+ +

Path to iTunes folder:
+
+ i.e. Music/iTunes or /Users/name/Music/iTunes +

+
+ Renaming & Metadata: +

+ Rename & add metadata +
+ Delete leftover files +

+
+
+

Album Art:

+ Add album art +
+ +


+ (For now, all changes require a restart to take effect)

+
+
+#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl") \ No newline at end of file diff --git a/data/interfaces/default/hostory.tmpl b/data/interfaces/default/hostory.tmpl new file mode 100644 index 00000000..0c03e2bf --- /dev/null +++ b/data/interfaces/default/hostory.tmpl @@ -0,0 +1,3 @@ +#import os.path +#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl") +#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl") \ No newline at end of file diff --git a/data/interfaces/default/upcoming.tmpl b/data/interfaces/default/upcoming.tmpl new file mode 100644 index 00000000..0c03e2bf --- /dev/null +++ b/data/interfaces/default/upcoming.tmpl @@ -0,0 +1,3 @@ +#import os.path +#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl") +#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl") \ No newline at end of file diff --git a/webServer.py b/webServer.py index 5efab693..4d308280 100644 --- a/webServer.py +++ b/webServer.py @@ -259,11 +259,11 @@ class Headphones: unqueueAlbum.exposed = True def upcoming(self): - page = [templates._header] - page.append(templates._logobar) - page.append(templates._nav) - page.append(templates._footer) - return page + filename = os.path.join(self.templatePath,"upcoming.tmpl") + template = Template(file=filename) + template.rootPath = "." + template.appPath = "." + return str(template) upcoming.exposed = True def manage(self): @@ -303,11 +303,11 @@ class Headphones: def history(self): - page = [templates._header] - page.append(templates._logobar) - page.append(templates._nav) - page.append(templates._footer) - return page + filename = os.path.join(self.templatePath,"history.tmpl") + template = Template(file=filename) + template.rootPath = "." + template.appPath = "." + return str(template) history.exposed = True def config(self):