From 3769d5191f36cc45e026a4141af5c2a0eda2a378 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Sun, 28 Jul 2013 01:39:43 +0530 Subject: [PATCH] Cleaned up the config page formatting --- data/interfaces/default/config.html | 2366 +++++++++++++-------------- headphones/webserve.py | 5 +- 2 files changed, 1172 insertions(+), 1199 deletions(-) diff --git a/data/interfaces/default/config.html b/data/interfaces/default/config.html index 736611bc..17fbd7d5 100644 --- a/data/interfaces/default/config.html +++ b/data/interfaces/default/config.html @@ -1,1247 +1,1223 @@ <%inherit file="base.html"/> <%! - import headphones - import string + import headphones + import string %> <%def name="headerIncludes()"> -
- -
+
+ +
<%def name="body()"> - - -
-

settingsSettings

-
-
- -
- -
- - - - - - - - -
- Web Interface changes require a restart to take effect -
- -
-
- Basic -
- - - e.g. localhost or 0.0.0.0 -
-
- - -
-
- - -
- -
- - -
-
- -
-
-
-
- API -
- -
-
- - - - Current API key: ${config['api_key']} -
-
- -
- Interval -
- - mins -
- -
- - mins -
-
- - mins -
-
-
- -
- -
- - - - - - -
-
- Usenet - Sabnzbd NZBget Blackhole -
-
-
- - - usually http://localhost:8080 -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
-
- - - usually http://localhost:6789 -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - - Folder your Download program watches for NZBs -
-
- -
- -
- - - Full path where SAB or NZBget downloads your music. e.g. /Users/name/Downloads/music -
- - -
- -
-
-
-
- Torrents - Black Hole Transmission -
-
-
- - - Folder your Download program watches for Torrents -
-
-
-
- - - usually http://localhost:9091 -
-
- - -
-
- - -
-
- Note: With Transmission, you can specify a different download directory for downloads sent from Headphones. - Set it in the Music Download Directory below
-
-
-
- - - usually http://localhost:9091 -
-
- - -
-
- - -
-
-
-
- - - Number of minimum seeders a torrent must have to be accepted -
-
- - - Full path where your torrent client downloads your music e.g. /Users/name/Downloads/music -
-
- - -
-
-
- -
-
- - - - - - - -
- NZBs -
- Headphones Indexer -
- -
-
-
- - - Headphones VIP Server username & password -
-
- - -
- -
-
-
- Newznab -
- -
-
-
-
- - - e.g. http://nzb.su -
-
- - -
-
- -
-
- <% - newznab_number = 2 - %> - %for newznab in config['extra_newznabs']: - <% - if newznab[2] == '1' or newznab[2] == 1: - newznab_enabled = "checked" - else: - newznab_enabled = "" - %> -
-
- - -
-
- - -
-
- -
-
- -
-
- <% - newznab_number += 1 - %> - %endfor - -
-
- -
- NZBs.org -
- -
-
-
- - -
-
-
-
- NZBsRus -
- -
-
-
- - -
-
- - -
-
-
-
-
- Torrents -
- -
-
- -
-
- -
-
- -
-
- -
-
-
- - -
-
- - -
-
-
- -
-
-
- - -
-
- - -
-
-
- -
-
-
- - -
-
- - -
-
-
- -
- -
-
- - - - - -
-
- Quality -
- - - - Preferred Bitrate: kbps
-
- Reject if less than % or more than % of the target size (leave blank for no limit)

-
- - -
-
- - -
-
-
- -
-
- Search Words - Separate words with a comma, e.g. "word1,word2,word3" -
- - - Results with any of these words in the title will be filtered out -
-
- - - Results with these words in the title will be preferred over results without them -
-
- - - Results without these words in the title will be filtered out -
-
-
-
- Post-Processing -
- - - - - -
-
- as .jpg -
- Use $Artist/$artist, $Album/$album, $Year/$year -
- - -
-
- - - e.g. /Users/name/Music/iTunes or /Volumes/share/music -
-
- - - Set this if you have a separate directory for lossless music -
-
-
- -
-
- - - - - -
- -
- Renaming options -
- - - Use: $Artist/$artist, $Album/$album, $Year/$year, $Type/$type (release type) and $First/$first (first letter in artist name) - E.g.: $Type/$First/$artist/$album [$year] = Album/G/girl talk/all day [2010] - -
-
- - - Use: $Disc/$disc (disc #), $Track/$track (track #), $Title/$title, $Artist/$artist, $Album/$album and $Year/$year -
-
- -
- Re-Encoding Options - Note: this option requires the lame, ffmpeg or xld encoder -
- -
-
-
- -
-
-
- -
-
- <% - if config['encoder'] == 'lame': - lameselect = 'selected="selected"' - ffmpegselect = '' - xldselect = '' - elif config['encoder'] == 'ffmpeg': - lameselect = '' - ffmpegselect = 'selected="selected"' - xldselect = '' - else: - lameselect = '' - ffmpegselect = '' - xldselect = 'selected="selected"' - %> -
- - -
-
-
-
- Audio Properties -
- - -
-
- - -
-
- - -
-
- - -
- - - <% - if config["samplingfrequency"] == 44100: - freq44100 = 'selected="selected"' - freq48000 = '' - else: - freq44100 = '' - freq48000 = 'selected="selected"' - %> -
- - -
-
- -
- Advanced Encoding Options -
- - -
- -
-
-
-
- - -
-
-
- - -
-
- -
- Miscellaneous -
- - -
- %for extra in config['extras']: - ${string.capwords(extra)}
- %endfor -
-
-
- -
- -
-
-
- - -
-
-
- Interface -
- - - -
-
- - -
-
- - -
-
- - - -

Notifications

-
-

Prowl

-
- -
-
-
- -
-
- -
-
- - -
-
-
- - -
-

XBMC

-
- -
-
-
- - - e.g. http://localhost:8080. Separate hosts with commas -
-
- -
-
- -
-
- -
-
- -
-
-
- -
-

NotifyMyAndroid

-
- -
-
-
-
- -
- - - Separate multiple api keys with commas -
-
- - -
-
-
- -
-

Synology NAS

-
- -
-
- -
-

Pushover

-
- -
-
-
- -
-
- -
-
- - -
-
-
- - -
- Musicbrainz -
- - -
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
- Get an Account! -
-
-
- -
- +
+

settingsSettings

+ - -
+
+ +
+ + + + + + + +
+ Web Interface changes require a restart to take effect +
+ +
+
+ Basic +
+ + + e.g. localhost or 0.0.0.0 +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+
+ API +
+ +
+
+ + + + Current API key: ${config['api_key']} +
+
+ +
+ Interval +
+ + mins +
+
+ + mins +
+
+ + mins +
+
+
+ +
+ +
+ + + + + +
+
+ Usenet + Sabnzbd NZBget Blackhole +
+
+
+ + + usually http://localhost:8080 +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ + + usually http://localhost:6789 +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ + + Folder your Download program watches for NZBs +
+
+ +
+
+ + + Full path where SAB or NZBget downloads your music. e.g. /Users/name/Downloads/music +
+
+ +
+
+
+
+ Torrents + Black Hole Transmission +
+
+
+ + + Folder your Download program watches for Torrents +
+
+
+
+ + + usually http://localhost:9091 +
+
+ + +
+
+ + +
+
+ Note: With Transmission, you can specify a different download directory for downloads sent from Headphones. + Set it in the Music Download Directory below +
+
+
+
+ + + usually http://localhost:9091 +
+
+ + +
+
+ + +
+
+
+
+ + + Number of minimum seeders a torrent must have to be accepted +
+
+ + + Full path where your torrent client downloads your music e.g. /Users/name/Downloads/music +
+
+ + +
+
+
+ +
+
+ + + + + +
+ NZBs +
+ Headphones Indexer +
+ +
+
+
+ + + Headphones VIP Server username & password +
+
+ + +
+ +
+
+
+ Newznab +
+ +
+
+
+
+ + + e.g. http://nzb.su +
+
+ + +
+
+ +
+
+ <% + newznab_number = 2 + %> + %for newznab in config['extra_newznabs']: + <% + if newznab[2] == '1' or newznab[2] == 1: + newznab_enabled = "checked" + else: + newznab_enabled = "" + %> +
+
+ + +
+
+ + +
+
+ +
+
+ +
+
+ <% + newznab_number += 1 + %> + %endfor + +
+
+ +
+ NZBs.org +
+ +
+
+
+ + +
+
+
+
+ NZBsRus +
+ +
+
+
+ + +
+
+ + +
+
+
+
+
+ Torrents +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+ + +
+
+
+ +
+
+
+ + +
+
+ + +
+
+
+ +
+
+
+ + +
+
+ + +
+
+
+
+ +
+
+ + + + + +
+
+ Quality +
+ + + + Preferred Bitrate: kbps
+
+ Reject if less than % or more than % of the target size (leave blank for no limit)

+
+ + +
+
+ + +
+
+
+
+
+ Search Words + Separate words with a comma, e.g. "word1,word2,word3" +
+ + + Results with any of these words in the title will be filtered out +
+
+ + + Results with these words in the title will be preferred over results without them +
+
+ + + Results without these words in the title will be filtered out +
+
+
+
+ Post-Processing +
+ + + + + +
+
+ as .jpg +
+ Use $Artist/$artist, $Album/$album, $Year/$year +
+ + +
+
+ + + e.g. /Users/name/Music/iTunes or /Volumes/share/music +
+
+ + + Set this if you have a separate directory for lossless music +
+
+
+ +
+
+ + + + + +
+
+ Renaming options +
+ + + Use: $Artist/$artist, $Album/$album, $Year/$year, $Type/$type (release type) and $First/$first (first letter in artist name) + E.g.: $Type/$First/$artist/$album [$year] = Album/G/girl talk/all day [2010] + +
+
+ + + Use: $Disc/$disc (disc #), $Track/$track (track #), $Title/$title, $Artist/$artist, $Album/$album and $Year/$year +
+
+ +
+ Re-Encoding Options + Note: this option requires the lame, ffmpeg or xld encoder +
+ +
+
+
+ +
+
+
+ +
+
+ <% + if config['encoder'] == 'lame': + lameselect = 'selected="selected"' + ffmpegselect = '' + xldselect = '' + elif config['encoder'] == 'ffmpeg': + lameselect = '' + ffmpegselect = 'selected="selected"' + xldselect = '' + else: + lameselect = '' + ffmpegselect = '' + xldselect = 'selected="selected"' + %> +
+ + +
+
+
+ Audio Properties +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + <% + if config["samplingfrequency"] == 44100: + freq44100 = 'selected="selected"' + freq48000 = '' + else: + freq44100 = '' + freq48000 = 'selected="selected"' + %> +
+ + +
+
+ +
+ Advanced Encoding Options +
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+
+ Miscellaneous +
+ + +
+ %for extra in config['extras']: + ${string.capwords(extra)}
+ %endfor +
+
+
+ +
+
+ +
+
+ + +
+
+
+ Interface +
+ + +
+
+ + +
+
+ + +
+
+ +

Notifications

+
+

Prowl

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

XBMC

+
+ +
+
+
+ + + e.g. http://localhost:8080. Separate hosts with commas +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+

NotifyMyAndroid

+
+ +
+
+
+ +
+
+ + + Separate multiple api keys with commas +
+
+ + +
+
+
+ +
+

Synology NAS

+
+ +
+
+ +
+

Pushover

+
+ +
+
+
+ +
+
+ +
+
+ + +
+
+
+ +
+ Musicbrainz +
+ + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ Get an Account! +
+
+
+ +
+ +
+ +
<%def name="javascriptIncludes()"> - + $(".hppass").keyup(function() { + $(".hppass").val($(this).val()); + }); + + $(function() { + $( "#tabs" ).tabs(); + }); + initActions(); + initConfigCheckbox("#use_headphones_indexer"); + initConfigCheckbox("#usenewznab"); + initConfigCheckbox("#usenzbsrus"); + initConfigCheckbox("#usenzbsorg"); + initConfigCheckbox("#usewaffles"); + initConfigCheckbox("#userutracker"); + initConfigCheckbox("#usewhatcd"); + initConfigCheckbox("#useapi"); + } + $(document).ready(function() { + initThisPage(); + }); + + diff --git a/headphones/webserve.py b/headphones/webserve.py index 7015bd0e..b77d8cf7 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -712,13 +712,11 @@ class WebInterface(object): return serve_template(templatename="config.html", title="Settings", config=config) config.exposed = True - -<<<<<<< HEAD def configUpdate(self, http_host='0.0.0.0', http_username=None, http_port=8181, http_password=None, launch_browser=0, api_enabled=0, api_key=None, download_scan_interval=None, nzb_search_interval=None, libraryscan_interval=None, sab_host=None, sab_username=None, sab_apikey=None, sab_password=None, sab_category=None, nzbget_host=None, nzbget_username=None, nzbget_password=None, nzbget_category=None, transmission_host=None, transmission_username=None, transmission_password=None, utorrent_host=None, utorrent_username=None, utorrent_password=None, nzb_downloader=0, torrent_downloader=0, download_dir=None, blackhole_dir=None, usenet_retention=None, - use_headphones_indexer=0,newznab=0, newznab_host=None, newznab_apikey=None, newznab_enabled=0, nzbsorg=0, nzbsorg_uid=None, nzbsorg_hash=None, nzbsrus=0, nzbsrus_uid=None, nzbsrus_apikey=None, + use_headphones_indexer=0, newznab=0, newznab_host=None, newznab_apikey=None, newznab_enabled=0, nzbsorg=0, nzbsorg_uid=None, nzbsorg_hash=None, nzbsrus=0, nzbsrus_uid=None, nzbsrus_apikey=None, preferred_words=None, required_words=None, ignored_words=None, preferred_quality=0, preferred_bitrate=None, detect_bitrate=0, move_files=0, torrentblackhole_dir=None, download_torrent_dir=None, numberofseeders=None, use_piratebay=0, use_isohunt=0, use_kat=0, use_mininova=0, waffles=0, waffles_uid=None, waffles_passkey=None, whatcd=0, whatcd_username=None, whatcd_password=None, rutracker=0, rutracker_user=None, rutracker_password=None, rename_files=0, correct_metadata=0, cleanup_files=0, add_album_art=0, album_art_format=None, embed_album_art=0, embed_lyrics=0, @@ -758,7 +756,6 @@ class WebInterface(object): headphones.NZB_DOWNLOADER = int(nzb_downloader) headphones.TORRENT_DOWNLOADER = int(torrent_downloader) headphones.DOWNLOAD_DIR = download_dir - headphones.BLACKHOLE = blackhole headphones.BLACKHOLE_DIR = blackhole_dir headphones.USENET_RETENTION = usenet_retention headphones.HEADPHONES_INDEXER = use_headphones_indexer