mirror of
https://github.com/rembo10/headphones.git
synced 2026-03-22 20:59:27 +00:00
850 lines
29 KiB
HTML
850 lines
29 KiB
HTML
<%inherit file="base.html"/>
|
|
<%!
|
|
import headphones
|
|
%>
|
|
|
|
<%def name="headerIncludes()">
|
|
<div id="subhead_container">
|
|
<ul id="subhead_menu">
|
|
<li><a href="shutdown">Shut Down</a></li>
|
|
<li><a href="restart">Restart</a></li>
|
|
</ul>
|
|
</div>
|
|
</%def>
|
|
<%def name="body()">
|
|
<form action="configUpdate" method="post">
|
|
<div class="table_wrapper">
|
|
<a name="Interface"><h1>Web Interface</h1></a>
|
|
<table class="configtable" summary="Web Interface">
|
|
<tr>
|
|
<td>
|
|
<h3>HTTP Host:</h3>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="http_host" value="${config['http_host']}" size="25" maxlength="40" />
|
|
<div class="tooltip">
|
|
<span>
|
|
Localhost or 0.0.0.0
|
|
</span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<h3>HTTP Port:</h3>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="http_port" value="${config['http_port']}" size="10" maxlength="40" />
|
|
<div class="tooltip">
|
|
<span>
|
|
Default is: 8181
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
<h3>HTTP Username:</h3>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="http_username" value="${config['http_user']}" size="30" maxlength="40" />
|
|
</td>
|
|
<td>
|
|
<h3>HTTP Password:</h3>
|
|
</td>
|
|
<td>
|
|
<input type="password" name="http_password" value="${config['http_pass']}" size="30" maxlength="40" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<h3>Enable API
|
|
<input class="styled" type="checkbox" name="api_enabled" id="api_enabled" value="1" ${config['api_enabled']} />
|
|
</h3>
|
|
<div id="apioptions">
|
|
<br>
|
|
<h3>API key:<input type="text" name="api_key" id="api_key" value="${config['api_key']}" size="30"><input class="submit" type="button" value="Generate" id="generate_api"></h3><br><br>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<h3>
|
|
Layout:
|
|
</h3>
|
|
</td>
|
|
<td>
|
|
<select class="styled" name="interface">
|
|
%for interface in config['interface_list']:
|
|
<%
|
|
if interface == headphones.INTERFACE:
|
|
selected = 'selected="selected"'
|
|
else:
|
|
selected = ''
|
|
%>
|
|
<option value="${interface}" ${selected}>
|
|
${interface}
|
|
</option>
|
|
%endfor
|
|
</select>
|
|
<!--
|
|
Make config for change of ColorStyle.css.
|
|
-->
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<h3>Launch Browser on Startup:</h3>
|
|
</td>
|
|
<td>
|
|
<input class="styled" type="checkbox" name="launch_browser" value="1" ${config['launch_browser']} />
|
|
</td>
|
|
<td>
|
|
<h3>Download Scan Interval:</h3>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="download_scan_interval" value="${config['download_scan_interval']}" size="10" maxlength="40"> mins
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<h3>NZB Search Interval:</h3>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="nzb_search_interval" value="${config['nzb_search_interval']}" size="10" maxlength="40"> mins
|
|
</td>
|
|
<td>
|
|
<h3>Library Scan Interval:</h3>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="libraryscan_interval" value="${config['libraryscan_interval']}" size="10" maxlength="40"> mins
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="table_wrapper">
|
|
<a name="Download"><h1>Download Settings</h1></a>
|
|
<table class="configtable" summary="Download Settings">
|
|
<tr>
|
|
<td colspan="2">
|
|
<h2>SABnzbd:</h2>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<h3>
|
|
SABnzbd Host:
|
|
</h3>
|
|
<input type="text" name="sab_host" value="${config['sab_host']}" size="30" maxlength="40" />
|
|
<div class="tooltip">
|
|
<span>
|
|
Usually http://localhost:8080
|
|
</span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<h3>
|
|
SABnzbd Username:
|
|
</h3>
|
|
<input type="text" name="sab_username" value="${config['sab_user']}" size="20" maxlength="40" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<h3>
|
|
SABnzbd API:
|
|
</h3>
|
|
<input type="text" name="sab_apikey" value="${config['sab_api']}" size="36" maxlength="40" />
|
|
</td>
|
|
<td>
|
|
<h3>SABnzbd Password:</h3>
|
|
<input type="password" name="sab_password" value="${config['sab_pass']}" size="20" maxlength="40" />
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<h3>SABnzbd Category:</h3><input type="text" name="sab_category" value="${config['sab_cat']}" size="20" maxlength="40" />
|
|
</td>
|
|
<td>
|
|
<h3>Music Download Directory:</h3><input type="text" name="download_dir" value="${config['download_dir']}" size="40" />
|
|
<div class="tooltip">
|
|
<span>
|
|
Full path to the directory where SAB downloads your music | i.e. /Users/name/Downloads/music
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<h3>
|
|
Use Black Hole
|
|
<input class="styled" type="checkbox" name="blackhole" value="1" ${config['use_blackhole']} />
|
|
</h3>
|
|
</td>
|
|
|
|
<td>
|
|
<h3>
|
|
Black Hole Directory:
|
|
</h3>
|
|
<input type="text" name="blackhole_dir" value="${config['blackhole_dir']}" size="40" />
|
|
<div class="tooltip">
|
|
<span>
|
|
Folder your Download program watches for NZBs
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td>
|
|
<h3>
|
|
Usenet Retention:
|
|
</h3>
|
|
<input type="text" name="usenet_retention" value="${config['usenet_retention']}" size="5" maxlength="10" />
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td colspan="2">
|
|
<h2>Torrent:</h2>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<h3>Black Hole Directory:</h3><input type="text" name="torrentblackhole_dir" value="${config['torrentblackhole_dir']}" size="40">
|
|
<div class="tooltip">
|
|
<span>Folder your Download program watches for Torrents</span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<h3>
|
|
Minimum seeders:
|
|
</h3>
|
|
<input type="text" name="numberofseeders" value="${config['numberofseeders']}" size="5" />
|
|
<div class="tooltip">
|
|
<span>
|
|
Number of minimum seeders a torrent must have to be accepted
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<h3>
|
|
Music Download Directory:
|
|
</h3>
|
|
<input type="text" name="download_torrent_dir" value="${config['download_torrent_dir']}" size="40" />
|
|
|
|
<div class="tooltip">
|
|
<span>
|
|
Full path to the directory where your torrent client downloads your music
|
|
i.e. /Users/name/Downloads/music
|
|
</span>
|
|
</div>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="table_wrapper">
|
|
<a name="Providers">
|
|
<h1>
|
|
Search Providers
|
|
</h1>
|
|
</a>
|
|
<table class="configtable" summary="Search Providers">
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
NZBMatrix:
|
|
<input class="styled" type="checkbox" name="nzbmatrix" value="1" ${config['use_nzbmatrix']} />
|
|
</p>
|
|
|
|
</td>
|
|
<td>
|
|
<p>
|
|
NZBMatrix Username
|
|
<input type="text" name="nzbmatrix_username" value="${config['nzbmatrix_user']}" size="30" maxlength="40" />
|
|
</p>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
<p>NZBMatrix API:
|
|
<input type="text" name="nzbmatrix_apikey" value="${config['nzbmatrix_api']}" size="36" maxlength="40" />
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="newznab" value="1" ${config['use_newznab']} />
|
|
Newznab:
|
|
</p>
|
|
</td>
|
|
|
|
<td>
|
|
<h3>Newznab Host: </h3>
|
|
<input type="text" name="newznab_host" value="${config['newznab_host']}" size="30" maxlength="40" />
|
|
<div class="tooltip">
|
|
<span>
|
|
i.e. http://nzb.su
|
|
</span>
|
|
</div>
|
|
</td>
|
|
|
|
<td>
|
|
<h3>Newznab API: </h3>
|
|
<input type="text" name="newznab_apikey" value="${config['newznab_api']}" size="36" maxlength="40" />
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<h3>NZBs.org:
|
|
<input class="styled" type="checkbox" name="nzbsorg" value="1" ${config['use_nzbsorg']} />
|
|
</h3>
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<h3>NZBs.org API Key: </h3>
|
|
<input type="text" name="nzbsorg_hash" value="${config['nzbsorg_hash']}" size="30" maxlength="40">
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
Newzbin
|
|
<input class="styled" type="checkbox" name="newzbin" value="1" ${config['use_newzbin']} />
|
|
|
|
</p>
|
|
</td>
|
|
|
|
<td>
|
|
<p>
|
|
Newzbin UID:
|
|
<input type="text" name="newzbin_uid" value="${config['newzbin_uid']}" size="30" maxlength="40" />
|
|
</p>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
<p>Newzbin Password
|
|
<input type="text" name="newzbin_password" value="${config['newzbin_pass']}" size="36" maxlength="40" />
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<h2>Torrent:</h2>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="use_isohunt" value="1" ${config['use_isohunt']} />
|
|
Isohunt:
|
|
</p>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="use_mininova" value="1" ${config['use_mininova']} />
|
|
Mininova
|
|
</p>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="use_kat" value="1" ${config['use_kat']} />
|
|
Kick Ass Torrents
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="table_wrapper">
|
|
<a name="PostProcessing">
|
|
<h1>
|
|
Quality & Post Processing
|
|
</h1>
|
|
</a>
|
|
|
|
<table class="configtable" summary="Quality & Post Processing">
|
|
<tr>
|
|
<td>
|
|
<h2>Album Quality:</h2>
|
|
<p>
|
|
<input class="styled" type="radio" name="preferred_quality" value="0" ${config['pref_qual_0']} />
|
|
Highest Quality excluding Lossless
|
|
</p>
|
|
<p>
|
|
<input class="styled" type="radio" name="preferred_quality" value="1" ${config['pref_qual_1']} />
|
|
Highest Quality including Lossless
|
|
</p>
|
|
<p>
|
|
<input class="styled" type="radio" name="preferred_quality" value="3" ${config['pref_qual_3']} />
|
|
Lossless Only
|
|
</p>
|
|
<p>
|
|
<input class="styled" type="radio" name="preferred_quality" value="2" ${config['pref_qual_2']} />
|
|
Preferred Bitrate:
|
|
<input type="text" name="preferred_bitrate" value="${config['pref_bitrate']}" size="3" maxlength="5" />kbps
|
|
</p>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="detect_bitrate" value="1" ${config['detect_bitrate']} />
|
|
Auto-Detect Preferred Bitrate
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<h2>Post-Processing:</h2>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="move_files" value="1" ${config['move_files']} />
|
|
Move downloads to Destination Folder
|
|
</p>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="rename_files" value="1" ${config['rename_files']} />
|
|
Rename files
|
|
</p>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="correct_metadata" value="1" ${config['correct_metadata']} />
|
|
Correct metadata
|
|
</p>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="cleanup_files" value="1" ${config['cleanup_files']} />
|
|
Delete leftover files (.m3u, .nfo, .sfv, .nzb, etc.)
|
|
</p>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="add_album_art" value="1" ${config['add_album_art']} />
|
|
Add album art as 'folder.jpg' to album folder
|
|
</p>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="embed_album_art" value="1" ${config['embed_album_art']} />
|
|
Embed album art in each file
|
|
</p>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="embed_lyrics" value="1" ${config['embed_lyrics']} />
|
|
Embed lyrics
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<br />
|
|
|
|
<h3>
|
|
Path to Destination folder:
|
|
</h3>
|
|
<input type="text" name="destination_dir" value="${config['dest_dir']}" size="40" />
|
|
<div class="tooltip">
|
|
<span>
|
|
i.e. /Users/name/Music/iTunes or /Volumes/share/music
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="table_wrapper">
|
|
<a name="Advanced"><h1>Advanced Settings</h1></a>
|
|
|
|
<table class="configtable" summary="Advanced Settings">
|
|
<tr>
|
|
<td>
|
|
<h2>Renaming Options:</h2>
|
|
<br />
|
|
<h3>
|
|
Folder Format:
|
|
</h3>
|
|
<input type="text" name="folder_format" value="${config['folder_format']}" size="43" />
|
|
<div class="tooltip">
|
|
<span>
|
|
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]
|
|
</span>
|
|
</div>
|
|
<br /><br />
|
|
<h3>
|
|
File Format:
|
|
</h3>
|
|
<input type="text" name="file_format" value="${config['file_format']}" size="43" />
|
|
<div class="tooltip">
|
|
<span>
|
|
Use: $Track/$track (track #), $Title/$title, $Artist/$artist, $Album/$album and $Year/$year
|
|
<span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<h2>Miscellaneous:</h2>
|
|
<br />
|
|
<p>
|
|
<input class="styled" type="checkbox" name="include_extras" value="1" ${config['include_extras']} />
|
|
Automatically Include Extras When Adding an Artist
|
|
</p>
|
|
<div class="tooltip"><span>(EPs, Compilations, Live Albums, Remix Albums and Singles)</span></div><br>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="autowant_upcoming" value="1" ${config['autowant_upcoming']} />Automatically Mark Upcoming Albums as Wanted
|
|
</p>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="autowant_all" value="1" ${config['autowant_all']} />Automatically Mark All Albums as Wanted
|
|
</p>
|
|
<br />
|
|
<h3>Log Directory:</h3>
|
|
<input type="text" name="log_dir" value="${config['log_dir']}" size="40" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div class="tooltip">
|
|
<span>
|
|
Note: this option requires the lame or ffmpeg encoder
|
|
</span>
|
|
</div>
|
|
<h2>Re-Encoding Options:</h2>
|
|
<p>
|
|
<input class="styled" type="checkbox" name="encode" id="encode" value="1" ${config['encode']} />
|
|
Re-encode downloads during postprocessing
|
|
</p>
|
|
<div id="encoderoptions">
|
|
<input class="styled" type="checkbox" name="encoderlossless" value="1" ${config['encoderlossless']} />
|
|
Only re-encode lossless files (.flac)
|
|
<br />
|
|
<%
|
|
if config['encoder'] == 'lame':
|
|
lameselect = 'selected="selected"'
|
|
ffmpegselect = ''
|
|
else:
|
|
lameselect = ''
|
|
ffmpegselect = 'selected="selected"'
|
|
%>
|
|
<h4>Encoder: </h4>
|
|
<select class="styled" name="encoder">
|
|
<option value="lame" ${lameselect}>lame</option>
|
|
<option value="ffmpeg" ${ffmpegselect}>ffmpeg</option>
|
|
</select>
|
|
|
|
<h4>Format: </h4>
|
|
<select name="encoderoutputformat">
|
|
%for x in ['mp3', 'ogg', 'm4a']:
|
|
<%
|
|
if config['encoderoutputformat'] == x:
|
|
outputselect = 'selected'
|
|
else:
|
|
outputselect = ''
|
|
%>
|
|
<option value="${x}" ${outputselect}>${x}</option>
|
|
%endfor
|
|
</select>
|
|
<br />
|
|
<h3>
|
|
Audio Properties:
|
|
</h3>
|
|
<br />
|
|
<p>VBR/CBR:
|
|
<select name="encodervbrcbr">
|
|
%for x in ['cbr', 'vbr']:
|
|
<%
|
|
if config['encodervbrcbr'] == x:
|
|
outputselect = 'selected'
|
|
else:
|
|
outputselect = ''
|
|
%>
|
|
<option value=${x} ${outputselect}>${x}</option>
|
|
%endfor
|
|
</select>
|
|
</p>
|
|
<p>
|
|
Quality:
|
|
<select class="styled" name="encoderquality">
|
|
%for x in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]:
|
|
<%
|
|
if config['encoderquality'] == x:
|
|
outputselect = 'selected'
|
|
else:
|
|
outputselect = ''
|
|
%>
|
|
<option value=${x} ${outputselect}>${x}</option>
|
|
%endfor
|
|
</select>
|
|
</p>
|
|
<br />
|
|
<p>Bitrate:
|
|
<select class="styled" name="bitrate">
|
|
%for x in [64, 128, 192, 256, 320]:
|
|
<%
|
|
if config["bitrate"] == x:
|
|
bitrateselected = "selected"
|
|
else:
|
|
bitrateselected = ''
|
|
%>
|
|
<option value=${x} ${bitrateselected}> ${x} kbps</option>
|
|
%endfor
|
|
</select>
|
|
|
|
<%
|
|
if config["samplingfrequency"] == 44100:
|
|
freq44100 = 'selected="selected"'
|
|
freq48000 = ''
|
|
else:
|
|
freq44100 = ''
|
|
freq48000 = 'selected="selected"'
|
|
%>
|
|
</p>
|
|
<p>
|
|
Sampling:
|
|
<select class="styled" name="samplingfrequency">
|
|
<option value=44100 ${freq44100}>44.1 kHz</option>
|
|
<option value=48000 ${freq48000}>48.0 kHz</option>
|
|
</select>
|
|
</p>
|
|
<br />
|
|
<br />
|
|
<h3>Advanced Encoding Options:</h3>
|
|
<h4>
|
|
(ignores audio properties)
|
|
</h4>
|
|
<input type="text" name="advancedencoder" value="${config['advancedencoder']}" size="43" />
|
|
<br />
|
|
<h3>Path to Encoder:</h3>
|
|
<input type="text" name="encoderfolder" value="${config['encoderfolder']}" size="43" />
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<h2>Notifications:</h2><br>
|
|
<h3><input type="checkbox" name="prowl_enabled" id="prowl" value="1" ${config['prowl_enabled']} />Enable Prowl Notifications</h3><br>
|
|
<div id="prowloptions">
|
|
<h3>API key:</h3><input type="text" name="prowl_keys" value="${config['prowl_keys']}" size="50"><br><br>
|
|
<h3><input type="checkbox" name="prowl_onsnatch" value="1" ${config['prowl_onsnatch']} />Notify on snatch?</h3><br>
|
|
<h3>Priority (-2,-1,0,1 or 2):</h3><input type="text" name="prowl_priority" value="${config['prowl_priority']}" size="2"><br><br>
|
|
</div>
|
|
<h3><input type="checkbox" name="xbmc_enabled" id="xbmc" value="1" ${config['xbmc_enabled']} />Enable XBMC Updates</h3><br>
|
|
<div id="xbmcoptions">
|
|
<h3>XBMC Host:Port:</h3><input type="text" name="xbmc_host" value="${config['xbmc_host']}" size="30"><br>
|
|
<div class="tooltip"><span>e.g. http://localhost:8080. Separate hosts with commas</span></div>
|
|
<h3>XBMC Username:</h3><input type="text" name="xbmc_username" value="${config['xbmc_username']}" size="30"><br><br>
|
|
<h3>XBMC Password:</h3><input type="password" name="xbmc_password" value="${config['xbmc_password']}" size="30"><br><br>
|
|
<h3><input type="checkbox" name="xbmc_update" value="1" ${config['xbmc_update']} />Update XBMC Library</h3><br>
|
|
<h3><input type="checkbox" name="xbmc_notify" value="1" ${config['xbmc_notify']} />Send Notification to XBMC</h3><br>
|
|
</div>
|
|
<h3><input type="checkbox" name="nma_enabled" id="nma" value="1" ${config['nma_enabled']} />Enable NotifyMyAndroid</h3><br>
|
|
<div id="nmaoptions">
|
|
<h3>NotifyMyAndroid API Key:</h3><input type="text" name="nma_apikey" value="${config['nma_apikey']}" size="30"><br>
|
|
<i class="smalltext">Separate multiple api keys with commas</i><br>
|
|
<h3>Priority:<select class="styled" name="nma_priority"></h3>
|
|
%for x in [-2,-1,0,1,2]:
|
|
<%
|
|
if config['nma_priority'] == x:
|
|
nma_priority_selected = 'selected'
|
|
else:
|
|
nma_priority_selected = ''
|
|
|
|
if x == -2:
|
|
nma_priority_value = 'Very Low'
|
|
elif x == -1:
|
|
nma_priority_value = 'Moderate'
|
|
elif x == 0:
|
|
nma_priority_value = 'Normal'
|
|
elif x == 1:
|
|
nma_priority_value = 'High'
|
|
else:
|
|
nma_priority_value = 'Emergency'
|
|
%>
|
|
<option value=${x} ${nma_priority_selected}>${nma_priority_value}</option>
|
|
%endfor
|
|
</select>
|
|
<br><br>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<h3>Muscbrainz Mirror: <select name="mirror" id="mirror" class="styled"><h3>
|
|
%for mirror in config['mirror_list']:
|
|
<%
|
|
if mirror == headphones.MIRROR:
|
|
selected = 'selected="selected"'
|
|
else:
|
|
selected = ''
|
|
%>
|
|
<option value="${mirror}" ${selected}>${mirror}</option>
|
|
%endfor
|
|
</select>
|
|
|
|
<div id="customoptions">
|
|
<h3>Host:<br><input type="text" name="customhost" value="${config['customhost']}" size="20"></h3>
|
|
<h3>Port:<br><input type="text" name="customport" value="${config['customport']}" size="8"></h3>
|
|
<h3>Sleep Interval:<br><input type="text" name="customsleep" value="${config['customsleep']}" size="4"></h3>
|
|
</div>
|
|
|
|
<div id="hpserveroptions">
|
|
<h3>Username:<br><input type="text" name="hpuser" value="${config['hpuser']}" size="20"></h3>
|
|
<h3>Password:<br><input type="password" name="hppass" value="${config['hppass']}" size="15"></h3>
|
|
<i class="smalltext2"><a href="http://headphones.codeshy.com/vip">Get an Account</a></p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<p class="center">
|
|
<input class="submit save" type="submit" value="Save Changes" />
|
|
<br />
|
|
(Web Interface changes require a restart to take effect)
|
|
</p>
|
|
</form>
|
|
</%def>
|
|
|
|
<%def name="javascriptIncludes()">
|
|
<script>
|
|
|
|
$("save").click(function(){
|
|
messageDialog("update", "Your settings has been saved!")
|
|
});
|
|
|
|
hideServerDivs = function () {
|
|
$("#customoptions").hide("fast");
|
|
$("#hpserveroptions").hide("fast");
|
|
};
|
|
|
|
handleNewSelection = function () {
|
|
|
|
hideServerDivs();
|
|
|
|
switch ($(this).val()) {
|
|
case 'custom':
|
|
$("#customoptions").show("fast");
|
|
break;
|
|
case 'headphones':
|
|
$("#hpserveroptions").show("fast");
|
|
break;
|
|
}
|
|
};
|
|
|
|
|
|
$(document).ready(function()
|
|
{
|
|
if ($("#api_enabled").is(":checked"))
|
|
{
|
|
$("#apioptions").show();
|
|
}
|
|
else
|
|
{
|
|
$("#apioptions").hide();
|
|
}
|
|
|
|
$("#api_enabled").click(function(){
|
|
if ($("#api_enabled").is(":checked"))
|
|
{
|
|
$("#apioptions").show("fast");
|
|
}
|
|
else
|
|
{
|
|
$("#apioptions").hide("fast");
|
|
}
|
|
});
|
|
|
|
$('#api_key').click(function(){ $('#api_key').select() });
|
|
$("#generate_api").click(function(){
|
|
$.get('generateAPI',
|
|
function(data){
|
|
if (data.error != undefined) {
|
|
alert(data.error);
|
|
return;
|
|
}
|
|
$('#api_key').val(data);
|
|
});
|
|
});
|
|
if ($("#encode").is(":checked"))
|
|
{
|
|
$("#encoderoptions").show();
|
|
}
|
|
else
|
|
{
|
|
$("#encoderoptions").hide();
|
|
}
|
|
|
|
$("#encode").click(function(){
|
|
if ($("#encode").is(":checked"))
|
|
{
|
|
$("#encoderoptions").show("fast");
|
|
}
|
|
else
|
|
{
|
|
$("#encoderoptions").hide("fast");
|
|
}
|
|
});
|
|
|
|
if ($("#prowl").is(":checked"))
|
|
{
|
|
$("#prowloptions").show();
|
|
}
|
|
else
|
|
{
|
|
$("#prowloptions").hide();
|
|
}
|
|
|
|
$("#prowl").click(function(){
|
|
if ($("#prowl").is(":checked"))
|
|
{
|
|
$("#prowloptions").show("fast");
|
|
}
|
|
else
|
|
{
|
|
$("#prowloptions").hide("fast");
|
|
}
|
|
});
|
|
|
|
if ($("#xbmc").is(":checked"))
|
|
{
|
|
$("#xbmcoptions").show();
|
|
}
|
|
else
|
|
{
|
|
$("#xbmcoptions").hide();
|
|
}
|
|
|
|
$("#xbmc").click(function(){
|
|
if ($("#xbmc").is(":checked"))
|
|
{
|
|
$("#xbmcoptions").show("fast");
|
|
}
|
|
else
|
|
{
|
|
$("#xbmcoptions").hide("fast");
|
|
}
|
|
});
|
|
|
|
if ($("#nma").is(":checked"))
|
|
{
|
|
$("#nmaoptions").show();
|
|
}
|
|
else
|
|
{
|
|
$("#nmaoptions").hide();
|
|
}
|
|
|
|
$("#nma").click(function(){
|
|
if ($("#nma").is(":checked"))
|
|
{
|
|
$("#nmaoptions").show("fast");
|
|
}
|
|
else
|
|
{
|
|
$("#nmaoptions").hide("fast");
|
|
}
|
|
});
|
|
$("#mirror").change(handleNewSelection);
|
|
handleNewSelection.apply($("#mirror"));
|
|
|
|
});
|
|
|
|
//Slide toggle
|
|
$(document).ready(function(){
|
|
$(".configtable").addClass("closed");
|
|
});
|
|
</script>
|
|
</%def>
|