mirror of
https://github.com/rembo10/headphones.git
synced 2026-03-21 12:19:27 +00:00
409 lines
15 KiB
HTML
409 lines
15 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()">
|
||
<div id="paddingheader">
|
||
<h1><h1>
|
||
</div>
|
||
<div class="table_wrapper">
|
||
<form action="configUpdate" method="post">
|
||
<a name="web_interface"><h1><u>Web Interface</u></h1></a>
|
||
|
||
<table class="configtable" summary="Web Interface">
|
||
<tr>
|
||
<td>
|
||
<h3>HTTP Host:</h3>
|
||
<input type="text" name="http_host" value="${config['http_host']}" size="30" maxlength="40"><br>
|
||
<i class="smalltext">i.e. localhost or 0.0.0.0</i>
|
||
</td>
|
||
<td>
|
||
<h3>HTTP Username:</h3>
|
||
<input type="text" name="http_username" value="${config['http_user']}" size="30" maxlength="40">
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>
|
||
<h3>HTTP Port:</h3>
|
||
<input type="text" name="http_port" value="${config['http_port']}" size="10" maxlength="40">
|
||
</td>
|
||
|
||
<td>
|
||
<h3>HTTP Password:</h3>
|
||
<input type="password" name="http_password" value="${config['http_pass']}" size="30" maxlength="40">
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>
|
||
<h3>Launch Browser on Startup: <input type="checkbox" name="launch_browser" value="1" ${config['launch_browser']} /></h3>
|
||
</td>
|
||
<td>
|
||
<h3>Download Scan Interval (mins):</h3>
|
||
<input type="text" name="download_scan_interval" value="${config['download_scan_interval']}" size="10" maxlength="40">
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
|
||
<td>
|
||
<h3>NZB Search Interval (mins):</h3>
|
||
<input type="text" name="nzb_search_interval" value="${config['nzb_search_interval']}" size="10" maxlength="40">
|
||
</td>
|
||
|
||
<td>
|
||
<h3>Library Scan Interval (mins):</h3>
|
||
<input type="text" name="libraryscan_interval" value="${config['libraryscan_interval']}" size="10" maxlength="40">
|
||
</td>
|
||
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div class="table_wrapper">
|
||
<a name="download"><h1><u>Download Settings</u></h1></a>
|
||
<table class="configtable" summary="Download Settings">
|
||
<tr>
|
||
<td>
|
||
<h3>SABnzbd Host:</h3><input type="text" name="sab_host" value="${config['sab_host']}" size="30" maxlength="40"><br>
|
||
|
||
<i class="smalltext">usually http://localhost:8080</i>
|
||
</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="50"><br>
|
||
|
||
<i class="smalltext">Full path to the directory where SAB downloads your music<br>
|
||
i.e. /Users/name/Downloads/music</i>
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>
|
||
<h3>Use Black Hole: <input 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="50"><br>
|
||
|
||
<i class="smalltext">Folder your Download program watches for NZBs</i>
|
||
</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td>
|
||
<h3>Usenet Retention:<input type="text" name="usenet_retention" value="${config['usenet_retention']}" size="20" maxlength="40"></h3>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div class="table_wrapper">
|
||
<a name="providers"><h1><u>Search Providers</u></h1></a>
|
||
<table class="configtable" summary="Search Providers">
|
||
<tr>
|
||
<td id="middle">
|
||
<h3>NZBMatrix: <input type="checkbox" name="nzbmatrix" value="1" ${config['use_nzbmatrix']} /></h3>
|
||
</td>
|
||
|
||
<td>
|
||
<h3>NZBMatrix Username: </h3>
|
||
<input type="text" name="nzbmatrix_username" value="${config['nzbmatrix_user']}" size="30" maxlength="40">
|
||
</td>
|
||
|
||
<td>
|
||
<h3>NZBMatrix API: </h3>
|
||
<input type="text" name="nzbmatrix_apikey" value="${config['nzbmatrix_api']}" size="36" maxlength="40">
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td id="middle">
|
||
<h3>Newznab: <input type="checkbox" name="newznab" value="1" ${config['use_newznab']} /></h3>
|
||
</td>
|
||
|
||
<td>
|
||
<h3>Newznab Host: </h3>
|
||
<input type="text" name="newznab_host" value="${config['newznab_host']}" size="30" maxlength="40"><br>
|
||
<i class="smalltext">i.e. http://nzb.su</i>
|
||
</td>
|
||
|
||
<td>
|
||
<h3>Newznab API: </h3>
|
||
<input type="text" name="newznab_apikey" value="${config['newznab_api']}" size="36" maxlength="40">
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td id="middle">
|
||
<h3>NZBs.org: <input type="checkbox" name="nzbsorg" value="1" ${config['use_nzbsorg']} /></h3>
|
||
</td>
|
||
|
||
<td>
|
||
|
||
<h3>NZBs.org UID: </h3>
|
||
<input type="text" name="nzbsorg_uid" value="${config['nzbsorg_uid']}" size="30" maxlength="40">
|
||
|
||
</td>
|
||
|
||
<td>
|
||
|
||
<h3>NZBs.org Hash: </h3>
|
||
<input type="text" name="nzbsorg_hash" value="${config['nzbsorg_hash']}" size="36" maxlength="40">
|
||
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td id="middle">
|
||
<h3>Newzbin: <input type="checkbox" name="newzbin" value="1" ${config['use_newzbin']} /></h3>
|
||
</td>
|
||
|
||
<td>
|
||
<h3>Newzbin UID: </h3>
|
||
<input type="text" name="newzbin_uid" value="${config['newzbin_uid']}" size="30" maxlength="40">
|
||
|
||
</td>
|
||
|
||
<td>
|
||
<h3>Newzbin Password: </h3>
|
||
<input type="text" name="newzbin_password" value="${config['newzbin_pass']}" size="36" maxlength="40">
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div class="table_wrapper">
|
||
<a name="post_processing"><h1><u>Quality & Post Processing</u></h1></a>
|
||
|
||
<table class="configtable" summary="Quality & Post Processing">
|
||
<tr>
|
||
<td>
|
||
<h2>Album Quality:</h2><br>
|
||
<h4><input type="radio" name="preferred_quality" value="0" ${config['pref_qual_0']} /> Highest Quality excluding Lossless</h4>
|
||
<h4><input type="radio" name="preferred_quality" value="1" ${config['pref_qual_1']} /> Highest Quality including Lossless</h4>
|
||
<h4><input type="radio" name="preferred_quality" value="3" ${config['pref_qual_3']} /> Lossless Only</h4>
|
||
<h4><input 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</h4>
|
||
<i class="smalltext2"><input type="checkbox" name="detect_bitrate" value="1" ${config['detect_bitrate']} />Auto-Detect Preferred Bitrate </i>
|
||
</td>
|
||
<td>
|
||
<h2>Post-Processing:</h2>
|
||
<h4><input type="checkbox" name="move_files" value="1" ${config['move_files']} /> Move downloads to Destination Folder</h4>
|
||
<h4><input type="checkbox" name="rename_files" value="1" ${config['rename_files']} /> Rename files</h4>
|
||
<h4><input type="checkbox" name="correct_metadata" value="1" ${config['correct_metadata']} /> Correct metadata</h4>
|
||
<h4><input type="checkbox" name="cleanup_files" value="1" ${config['cleanup_files']} /> Delete leftover files (.m3u, .nfo, .sfv, .nzb, etc.)</h4>
|
||
<h4><input type="checkbox" name="add_album_art" value="1" ${config['add_album_art']}> Add album art as 'folder.jpg' to album folder</h4>
|
||
<h4><input type="checkbox" name="embed_album_art" value="1" ${config['embed_album_art']}> Embed album art in each file</h4>
|
||
<h4><input type="checkbox" name="embed_lyrics" value="1" ${config['embed_lyrics']}> Embed lyrics</h4>
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>
|
||
<br>
|
||
|
||
<h3>Path to Destination folder:</h3><input type="text" name="destination_dir" value="${config['dest_dir']}" size="50">
|
||
<br>
|
||
<i class="smalltext">i.e. /Users/name/Music/iTunes or /Volumes/share/music</i>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div class="table_wrapper">
|
||
<a name="advanced_settings"><h1><u>Advanced Settings</u></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"><br>
|
||
<i class="smalltext">Use: artist, album, year and first (first letter in artist name)<br />
|
||
E.g.: first/artist/album [year] = G/Girl Talk/All Day [2010]</i>
|
||
<br><br>
|
||
<h3>File Format:</h3><input type="text" name="file_format" value="${config['file_format']}" size="43">
|
||
<br>
|
||
<i class="smalltext">Use: tracknumber, title, artist, album and year</i>
|
||
</td>
|
||
<td>
|
||
<h2>Miscellaneous:</h2>
|
||
<br>
|
||
<h3><input type="checkbox" name="include_extras" value="1" ${config['include_extras']} />Automatically Include Extras When Adding an Artist</h3>
|
||
<i class="smalltext">(EPs, Compilations, Live Albums, Remix Albums and Singles)</i>
|
||
<br><br>
|
||
<h3>Interface: <select name="interface"><h3>
|
||
%for interface in config['interface_list']:
|
||
<%
|
||
if interface == headphones.INTERFACE:
|
||
selected = 'selected="selected"'
|
||
else:
|
||
selected = ''
|
||
%>
|
||
<option value="${interface}" ${selected}>${interface}</option>
|
||
%endfor
|
||
</select>
|
||
<br><br>
|
||
<h3>Log Directory:</h3><input type="text" name="log_dir" value="${config['log_dir']}" size="50">
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<h2>Re-Encoding Options:</h2>
|
||
<i class="smalltext">Note: this option requires the lame or ffmpeg encoder</i>
|
||
<br><br>
|
||
<h3><input type="checkbox" name="encode" id="encode" value="1" ${config['encode']}/> Re-encode downloads during postprocessing</h3>
|
||
<br>
|
||
<div id="encoderoptions">
|
||
<h4><input type="checkbox" name="encoderlossless" value="1" ${config['encoderlossless']}/> Only re-encode lossless files (.flac)</h4>
|
||
<br>
|
||
<%
|
||
if config['encoder'] == 'lame':
|
||
lameselect = 'selected="selected"'
|
||
ffmpegselect = ''
|
||
else:
|
||
lameselect = ''
|
||
ffmpegselect = 'selected="selected"'
|
||
%>
|
||
<h4>Encoder: <select name="encoder">
|
||
<option value="lame" ${lameselect}>lame</option>
|
||
<option value="ffmpeg" ${ffmpegselect}>ffmpeg</option>
|
||
</select>
|
||
|
||
Format: <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></h4>
|
||
<br>
|
||
|
||
<h3>Audio Properties:</h3>
|
||
<br>
|
||
<h4>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>
|
||
|
||
Quality: <select 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></h4>
|
||
|
||
<br>
|
||
<h4>Bitrate: <select 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"'
|
||
%>
|
||
Sampling: <select name="samplingfrequency">
|
||
<option value=44100 ${freq44100}>44.1 kHz</option>
|
||
<option value=48000 ${freq48000}>48.0 kHz</option>
|
||
</select></h4>
|
||
<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>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<p class="center"><input type="submit" value="Save Changes"><br>
|
||
(Web Interface changes require a restart to take effect)</h3>
|
||
</form>
|
||
</%def>
|
||
|
||
<%def name="javascriptIncludes()">
|
||
<script>
|
||
$(document).ready(function()
|
||
{
|
||
if ($("#encode").is(":checked"))
|
||
{
|
||
$("#encoderoptions").show();
|
||
}
|
||
else
|
||
{
|
||
$("#encoderoptions").hide();
|
||
}
|
||
|
||
$("#encode").click(function(){
|
||
if ($("#encode").is(":checked"))
|
||
{
|
||
$("#encoderoptions").show("fast");
|
||
}
|
||
else
|
||
{
|
||
$("#encoderoptions").hide("fast");
|
||
}
|
||
});
|
||
});
|
||
</script>
|
||
</%def> |