mirror of
https://github.com/rembo10/headphones.git
synced 2026-03-21 12:19:27 +00:00
Merge pull request #12 from gugahoi/patch-1
Change some of the config html
This commit is contained in:
312
config.py
312
config.py
@@ -44,76 +44,242 @@ def var_to_chk(variable):
|
||||
else:
|
||||
return ''
|
||||
|
||||
form = '''<div class="table"><div class="config">
|
||||
<form action="configUpdate" method="post">
|
||||
<h1><u>Web Interface</u></h1>
|
||||
<table class="configtable"><tr><td><p>HTTP Host:</p>
|
||||
<input type="text" name="http_host" value="%s" size="30" maxlength="40"/><br />
|
||||
<p class="smalltext">i.e. localhost or 0.0.0.0</td>
|
||||
<td><p>HTTP Username:</p>
|
||||
<input type="text" name="http_username" value="%s" size="30" maxlength="40"/></td></tr>
|
||||
<tr><td><br /><p>HTTP Port:</p>
|
||||
<input type="text" name="http_port" value="%s" size="20" maxlength="40"/></td>
|
||||
<td><br /><p>HTTP Password:</p>
|
||||
<input type="password" name="http_password" value="%s" size="30" maxlength="40"/></td></tr>
|
||||
<tr><td><br /><p>Launch Browser on Startup:</p>
|
||||
<input type="checkbox" name="launch_browser" value="1" %s/>Enabled</td></tr></table>
|
||||
<h1><u>Download Settings</u></h1>
|
||||
<table class="configtable"><tr><td><p>SABnzbd Host:</p>
|
||||
<input type="text" name="sab_host" value="%s" size="30" maxlength="40"/><br />
|
||||
<p class="smalltext">usually localhost:8080</td>
|
||||
<td><p>SABnzbd Username:</p>
|
||||
<input type="text" name="sab_username" value="%s" size="20" maxlength="40"/></td></tr>
|
||||
<tr><td><br /><p>SABnzbd API:</p>
|
||||
<input type="text" name="sab_apikey" value="%s" size="46" maxlength="40"/></td>
|
||||
<td><br /><p>SABnzbd Password:</p>
|
||||
<input type="password" name="sab_password" value="%s" size="20" maxlength="40"/></td></tr>
|
||||
<tr><td><br /><p>SABnzbd Category:</p>
|
||||
<input type="text" name="sab_category" value="%s" size="20" maxlength="40"/></td>
|
||||
<td><br /><p>Music Download Directory:</p>
|
||||
<input type="text" name="music_download_dir" value="%s" size="60" maxlength="40"/><br />
|
||||
<p class="smalltext">Absolute or relative path to the dir where SAB downloads your music<br />
|
||||
i.e. Downloads/music or /Users/name/Downloads/music</td></tr>
|
||||
<tr><td><br /><p>Usenet Retention:</p>
|
||||
<input type="text" name="usenet_retention" value="%s" size="20" maxlength="40"/></td></tr></table>
|
||||
<h1><u>Search Providers</u></h1>
|
||||
<table class="configtable"><tr><td><p>Enable NZBMatrix:</p>
|
||||
<input type="checkbox" name="nzbmatrix" value="1" %s/>Enabled<br /></td>
|
||||
<td><p>NZBMatrix Username:</p>
|
||||
<input type="text" name="nzbmatrix_username" value="%s" size="30" maxlength="40"/><br /></td>
|
||||
<td><p>NZBMatrix API:</p>
|
||||
<input type="text" name="nzbmatrix_apikey" value="%s" size="46" maxlength="40"/></td></tr>
|
||||
<tr><td><br /><br /><p>Enable Newznab:</p>
|
||||
<input type="checkbox" name="newznab" value="1" %s/>Enabled<br /></td>
|
||||
<td><br /><br /><p>Newznab Host:</p>
|
||||
<input type="text" name="newznab_host" value="%s" size="30" maxlength="40"/><br />
|
||||
<p class="smalltext"> i.e. http://nzb.su</p></td>
|
||||
<td><br /><br /><p>Newznab API:</p>
|
||||
<input type="text" name="newznab_apikey" value="%s" size="46" maxlength="40"/></td></tr>
|
||||
<tr><td><br /><br /><p>Enable NZBs.org:</p>
|
||||
<input type="checkbox" name="nzbsorg" value="1" %s/>Enabled<br /></td>
|
||||
<td><br /><br /><p>NZBs.org UID:</p>
|
||||
<input type="text" name="nzbsorg_uid" value="%s" size="30" maxlength="40"/><br /></td>
|
||||
<td><br /><br /><p>NZBs.org Hash:</p>
|
||||
<input type="text" name="nzbsorg_hash" value="%s" size="46" maxlength="40"/></td></tr></table>
|
||||
<h1><u>Quality & Post Processing</u></h1>
|
||||
<table class="configtable"><tr><td><p>Album Quality:</p>
|
||||
<input type="checkbox" name="include_lossless" value="1" %s/>Include lossless
|
||||
<input type="checkbox" name="flac_to_mp3" value="1" %s/>Convert lossless to mp3</td>
|
||||
<td><p>iTunes:</p>
|
||||
<input type="checkbox" name="move_to_itunes" value="1" %s/>Move downloads to iTunes</td></tr>
|
||||
<tr><td><br /><p>Path to iTunes folder:</p>
|
||||
<input type="text" name="path_to_itunes" value="%s" size="60" maxlength="40"/><br />
|
||||
<p class="smalltext">i.e. Music/iTunes or /Users/name/Music/iTunes</p></td>
|
||||
<td><p>Renaming & Metadata:</p>
|
||||
<input type="checkbox" name="rename_mp3s" value="1" %s/>Rename & add metadata<br /><br />
|
||||
<input type="checkbox" name="cleanup" value="1" %s/>Delete leftover files</td></td></tr>
|
||||
<tr><td><br /><p>Album Art:</p>
|
||||
<input type="checkbox" name="add_album_art" value="1" %s/>Add album art</td></tr></table>
|
||||
<p class="center"><input type="submit" value=" Save Changes "/><br />
|
||||
(For now, all changes require a restart to take effect)</p></form></div></div>''' % (http_host, http_username,
|
||||
http_port, http_password, var_to_chk(launch_browser), sab_host, sab_username, sab_apikey, sab_password,
|
||||
sab_category, music_download_dir, usenet_retention, var_to_chk(nzbmatrix), nzbmatrix_username, nzbmatrix_apikey,
|
||||
var_to_chk(newznab), newznab_host, newznab_apikey, var_to_chk(nzbsorg), nzbsorg_uid, nzbsorg_hash,
|
||||
var_to_chk(include_lossless), var_to_chk(flac_to_mp3), var_to_chk(move_to_itunes), path_to_itunes, var_to_chk(rename_mp3s),
|
||||
var_to_chk(cleanup), var_to_chk(add_album_art))
|
||||
form = '''
|
||||
<br>
|
||||
<center>
|
||||
<div class="smalltext">
|
||||
<a href="#web_interface" >Web Interface</a> |
|
||||
<a href="#download" class="smalltext">Download Settings</a> |
|
||||
<a href="#providers" class="smalltext">Search Providers</a> |
|
||||
<a href="#post_processing" class="smalltext">Quality & Post Processing</a>
|
||||
</div>
|
||||
</center>
|
||||
<div class="table">
|
||||
<div class="config">
|
||||
<form action="configUpdate" method="post">
|
||||
<a name="web_interface"><h1><u>Web Interface</u></h1></a>
|
||||
|
||||
<table class="configtable" summary="Web Interface">
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
HTTP Host: <br><br>
|
||||
<input type="text" name="http_host" value="%s" size="30" maxlength="40"><br>
|
||||
<i class="smalltext">i.e. localhost or 0.0.0.0</i>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
HTTP Username: <br><br>
|
||||
<input type="text" name="http_username" value="%s" size="30" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
HTTP Port: <br><br>
|
||||
<input type="text" name="http_port" value="%s" size="20" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<p>
|
||||
HTTP Password: <br><br>
|
||||
<input type="password" name="http_password" value="%s" size="30" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<p>Launch Browser on Startup:<input type="checkbox" name="launch_browser" value="1" %s /></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<a name="download"><h1><u>Download Settings</u></h1></a>
|
||||
|
||||
<table class="configtable" summary="Download Settings">
|
||||
<tr>
|
||||
<td>
|
||||
<p>SABnzbd Host:</p><input type="text" name="sab_host" value="%s" size="30" maxlength="40"><br>
|
||||
|
||||
<i class="smalltext">usually localhost:8080</i>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<p>SABnzbd Username:</p><input type="text" name="sab_username" value="%s" size="20" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>SABnzbd API:</p><input type="text" name="sab_apikey" value="%s" size="46" maxlength="40">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>SABnzbd Password:</p><input type="password" name="sab_password" value="%s" size="20" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>SABnzbd Category:</p><input type="text" name="sab_category" value="%s" size="20" maxlength="40">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>Music Download Directory:</p><input type="text" name="music_download_dir" value="%s" size="60" maxlength="40"><br>
|
||||
|
||||
<i class="smalltext">Absolute or relative path to the dir where SAB downloads your music<br>
|
||||
i.e. Downloads/music or /Users/name/Downloads/music</i>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>Usenet Retention:</p><input type="text" name="usenet_retention" value="%s" size="20" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<a name="providers"><h1><u>Search Providers</u></h1></a>
|
||||
|
||||
<table class="configtable" summary="Search Providers">
|
||||
<tr>
|
||||
<td>
|
||||
<p>NZBMatrix: <input type="checkbox" name="nzbmatrix" value="1" %s /></p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<p>
|
||||
NZBMatrix Username: <br>
|
||||
<input type="text" name="nzbmatrix_username" value="%s" size="30" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<p>
|
||||
NZBMatrix API: <br>
|
||||
<input type="text" name="nzbmatrix_apikey" value="%s" size="46" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>Newznab: <input type="checkbox" name="newznab" value="1" %s /></p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>
|
||||
Newznab Host:<br>
|
||||
<input type="text" name="newznab_host" value="%s" size="30" maxlength="40"><br>
|
||||
<i class="smalltext">i.e. http://nzb.su</i>
|
||||
</p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>
|
||||
Newznab API:<br>
|
||||
<input type="text" name="newznab_apikey" value="%s" size="46" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>NZBs.org:<input type="checkbox" name="nzbsorg" value="1" %s /></p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>
|
||||
NZBs.org UID:<br>
|
||||
<input type="text" name="nzbsorg_uid" value="%s" size="30" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>
|
||||
NZBs.org Hash:<br>
|
||||
<input type="text" name="nzbsorg_hash" value="%s" size="46" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<a name="post_processing"><h1><u>Quality & Post Processing</u></h1></a>
|
||||
|
||||
<table class="configtable" summary="Quality & Post Processing">
|
||||
<tr>
|
||||
<td>
|
||||
<p><b>Album Quality:</b></p>
|
||||
<input type="checkbox" name="include_lossless" value="1" %s />Include lossless <br>
|
||||
<input type="checkbox" name="flac_to_mp3" value="1" %s />Convert lossless to mp3
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<p>
|
||||
<p><b>iTunes:</b></p>
|
||||
<input type="checkbox" name="move_to_itunes" value="1" %s />Move downloads to iTunes
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p><b>Path to iTunes folder</b>:<br><input type="text" name="path_to_itunes" value="%s" size="60" maxlength="40">
|
||||
<br>
|
||||
<i class="smalltext">i.e. Music/iTunes or /Users/name/Music/iTunes</i>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<b>Renaming & Metadata:</b>
|
||||
<p>
|
||||
<input type="checkbox" name="rename_mp3s" value="1" %s />Rename & add metadata
|
||||
<br>
|
||||
<input type="checkbox" name="cleanup" value="1" %s />Delete leftover files
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
<p><b>Album Art:</b></p>
|
||||
<input type="checkbox" name="add_album_art" value="1" %s>Add album art
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p class="center"><input type="submit" value="Save Changes"><br>
|
||||
(For now, all changes require a restart to take effect)</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>''' % (http_host, http_username, http_port, http_password, var_to_chk(launch_browser), sab_host, sab_username, sab_apikey, sab_password, sab_category, music_download_dir, usenet_retention, var_to_chk(nzbmatrix), nzbmatrix_username, nzbmatrix_apikey, var_to_chk(newznab), newznab_host, newznab_apikey, var_to_chk(nzbsorg), nzbsorg_uid, nzbsorg_hash, var_to_chk(include_lossless), var_to_chk(flac_to_mp3), var_to_chk(move_to_itunes), path_to_itunes, var_to_chk(rename_mp3s), var_to_chk(cleanup), var_to_chk(add_album_art))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user