Fixed up the appearance of the config page (was kind of broken on Firefox)

This commit is contained in:
rembo10
2015-07-04 17:26:47 -07:00
parent d062ab553c
commit a72bd4cb7c
2 changed files with 158 additions and 106 deletions
+148 -106
View File
@@ -659,50 +659,54 @@
<table class="configtable" summary="Quality &amp; Post Processing"> <table class="configtable" summary="Quality &amp; Post Processing">
<tr> <tr>
<td> <td>
<legend>Quality</legend>
<fieldset> <fieldset>
<legend>Quality</legend> <div class="row checkbox left clearfix nopad">
<div class="row radio clearfix">
<label title="Snatch the highest quality available, excluding lossless."> <label title="Snatch the highest quality available, excluding lossless.">
<input type="radio" name="preferred_quality" id="preferred_quality0" value="0" ${config['pref_qual_0']}> <input type="radio" name="preferred_quality" id="preferred_quality0" value="0" ${config['pref_qual_0']}>
Highest Quality excluding Lossless Highest Quality excluding Lossless
</label> </label>
</div>
<div class="row checkbox left clearfix nopad">
<label title="Snatch the highest quality available, including lossless."> <label title="Snatch the highest quality available, including lossless.">
<input type="radio" name="preferred_quality" id="preferred_quality1" value="1" ${config['pref_qual_1']}> <input type="radio" name="preferred_quality" id="preferred_quality1" value="1" ${config['pref_qual_1']}>
Highest Quality including Lossless Highest Quality including Lossless
</label> </label>
</div>
<div class="row checkbox left clearfix nopad">
<label title="Snatch only lossless quality."> <label title="Snatch only lossless quality.">
<input type="radio" name="preferred_quality" id="lossless_only" value="3" ${config['pref_qual_3']}> <input type="radio" name="preferred_quality" id="lossless_only" value="3" ${config['pref_qual_3']}>
Lossless Only Lossless Only
</label> </label>
<div id="lossless_only_options"> </div>
<span style="padding-left: 20px"> <div id="lossless_only_options" class="row left clearfix">
Reject if target size is not in bitrate range: <span style="padding-left: 20px">
<input type="text" class="override-float" name="lossless_bitrate_from" value="${config['lossless_bitrate_from']}" size="4" title="e.g. if album length = 40 mins, from = 350 kbps, then min target size = 102.5 mb, anything less will be rejected">to\ Reject if target size is not in bitrate range:
<input type="text" class="override-float" name="lossless_bitrate_to" value="${config['lossless_bitrate_to']}" size="5" title="e.g. if album length = 40 mins, to = 2000 kbps, then max target size = 586 mb, anything greater will be rejected">kbps <input type="text" class="override-float" name="lossless_bitrate_from" value="${config['lossless_bitrate_from']}" size="4" title="e.g. if album length = 40 mins, from = 350 kbps, then min target size = 102.5 mb, anything less will be rejected">to\
</span> <input type="text" class="override-float" name="lossless_bitrate_to" value="${config['lossless_bitrate_to']}" size="5" title="e.g. if album length = 40 mins, to = 2000 kbps, then max target size = 586 mb, anything greater will be rejected">kbps
</div> </span>
</div>
<div class="row left clearfix">
<label title="Prefer certain bitrate range, including lossless fallback. Use this option if you have a lot of wrong snatches."> <label title="Prefer certain bitrate range, including lossless fallback. Use this option if you have a lot of wrong snatches.">
<input type="radio" id="preferred_bitrate" name="preferred_quality" value="2" ${config['pref_qual_2']}> <input type="radio" id="preferred_bitrate" name="preferred_quality" value="2" ${config['pref_qual_2']}>
Preferred Bitrate Preferred Bitrate
<label> <label>
<div id="preferred_bitrate_options"> </div>
<div class="row"> <div id="preferred_bitrate_options" class="suboptions">
Target bitrate <div class="row nopad">
<input type="text" class="override-float" name="preferred_bitrate" value="${config['preferred_bitrate']}" size="3">kbps<br> Target bitrate:
</div> <input type="text" class="override-float" name="preferred_bitrate" value="${config['preferred_bitrate']}" size="3">kbps<br>
<div class="row"> </div>
<span style="padding-left: 20px"> <div class="row nopad">
Reject if <strong>less than</strong> <input type="text" class="override-float" name="preferred_bitrate_low_buffer" value="${config['preferred_bitrate_low']}" size="3">% or <strong>more than</strong> <input type="text" class="override-float" name="preferred_bitrate_high_buffer" value="${config['preferred_bitrate_high']}" size="3">% of the target size (leave blank for no limit)<br> Reject if <strong>less than</strong> <input type="text" class="override-float" name="preferred_bitrate_low_buffer" value="${config['preferred_bitrate_low']}" size="3">% or <strong>more than</strong> <input type="text" class="override-float" name="preferred_bitrate_high_buffer" value="${config['preferred_bitrate_high']}" size="3">% of the target size (leave blank for no limit)
</span> </div>
</div> <div class="row checkbox clearfix left nopad">
<div class="row checkbox left" style="padding-left: 20px"> <input type="checkbox" name="preferred_bitrate_allow_lossless" value="1" ${config['preferred_bitrate_allow_lossless']}>
<input type="checkbox" name="preferred_bitrate_allow_lossless" value="1" ${config['preferred_bitrate_allow_lossless']}> <label>Allow lossless if no good lossy match found</label>
<label>Allow lossless if no good lossy match found</label> </div>
</div> <div class="row checkbox clearfix left nopad">
<div class="row checkbox left" style="padding-left: 20px"> <input type="checkbox" name="detect_bitrate" value="1" ${config['detect_bitrate']} >
<input type="checkbox" name="detect_bitrate" value="1" ${config['detect_bitrate']} /> <label>Auto-Detect Preferred Bitrate</label>
<label>Auto-Detect Preferred Bitrate</label>
</div>
</div> </div>
</div> </div>
</fieldset> </fieldset>
@@ -735,69 +739,79 @@
<td> <td>
<fieldset> <fieldset>
<legend>Post-Processing</legend> <legend>Post-Processing</legend>
<div class="row checkbox left clearfix"> <div class="row checkbox left clearfix nopad">
<label>
Move downloads to Destination Folder
<input type="checkbox" name="move_files" id="move_files" value="1" ${config['move_files']} />
</label>
</div>
<div id="move_files_options" class="suboptions">
<div class="row checkbox left clearfix nopad">
<label>
Replace existing folders?
<input type="checkbox" name="replace_existing_folders" value="1" ${config['replace_existing_folders']}>
</label>
</div>
<div class="row checkbox left clearfix nopad">
<label>
Keep original folder (i.e. copy)?
<input type="checkbox" name="keep_original_folder" value="1" ${config['keep_original_folder']}>
</label>
</div>
</div>
<div class="row checkbox left clearfix nopad">
<label>
Rename files
<input type="checkbox" name="rename_files" value="1" ${config['rename_files']} />
</label>
</div>
<div class="row checkbox left clearfix nopad">
<label>
Correct metadata
<input type="checkbox" name="correct_metadata" value="1" ${config['correct_metadata']} />
</label>
</div>
<div class="row checkbox left clearfix nopad">
<label title="Use associated .cue sheet to split single file albums into multiple tracks. Requires shntool with flac or xld cli (OS X) to be installed."> <label title="Use associated .cue sheet to split single file albums into multiple tracks. Requires shntool with flac or xld cli (OS X) to be installed.">
Split single file albums into multiple tracks Split single file albums into multiple tracks
<input type="checkbox" name="cue_split" id="cue_split" value="1" ${config['cue_split']} /> <input type="checkbox" name="cue_split" id="cue_split" value="1" ${config['cue_split']} />
</label> </label>
</div> </div>
<div class="row checkbox left clearfix"> <div class="row checkbox left clearfix nopad">
<label>
Move downloads to Destination Folder
<input type="checkbox" name="move_files" id="move_files" value="1" ${config['move_files']} />
</label>
<div id="move_files_options">
<div class="row indent">
<label>
Replace existing folders?
<input type="checkbox" name="replace_existing_folders" value="1" ${config['replace_existing_folders']}>
</label>
</div>
<div class="row indent">
<label>
Keep original folder?
<input type="checkbox" name="keep_original_folder" value="1" ${config['keep_original_folder']}>
</label>
</div>
</div>
<label>
Rename files
<input type="checkbox" name="rename_files" value="1" ${config['rename_files']} />
</label>
<label>
Correct metadata
<input type="checkbox" name="correct_metadata" value="1" ${config['correct_metadata']} />
</label>
<label> <label>
Delete leftover files <small>(.m3u, .nfo, .sfv, .nzb, etc.)</small> Delete leftover files <small>(.m3u, .nfo, .sfv, .nzb, etc.)</small>
<input type="checkbox" name="cleanup_files" value="1" ${config['cleanup_files']} /> <input type="checkbox" name="cleanup_files" value="1" ${config['cleanup_files']} />
</label> </label>
</div>
<div class="row checkbox left clearfix nopad">
<label> <label>
Keep original nfo <small>(extension changed to .orig.nfo)</small> Keep original nfo <small>(extension changed to .orig.nfo)</small>
<input type="checkbox" name="keep_nfo" value="1" ${config['keep_nfo']} /> <input type="checkbox" name="keep_nfo" value="1" ${config['keep_nfo']} />
</label> </label>
</div>
<div class="row checkbox left clearfix nopad">
<label> <label>
Add album art jpeg to album folder Add album art jpeg to album folder
<input type="checkbox" name="add_album_art" id="add_album_art" value="1" ${config['add_album_art']}> <input type="checkbox" name="add_album_art" id="add_album_art" value="1" ${config['add_album_art']}>
</label> </label>
<div id="album_art_options" style="padding-left: 20px"> </div>
<div class="row"> <div id="album_art_options" style="padding-left: 20px">
as <input type="text" class="override-float" name="album_art_format" value="${config['album_art_format']}" size="10">.jpg <div class="row">
</div> as <input type="text" class="override-float" name="album_art_format" value="${config['album_art_format']}" size="10">.jpg
<small>Use $Artist/$artist, $Album/$album, $Year/$year</small>
</div> </div>
<small>Use $Artist/$artist, $Album/$album, $Year/$year</small>
</div>
<div class="row checkbox left clearfix nopad">
<label> <label>
Embed album art in each file Embed album art in each file
<input type="checkbox" name="embed_album_art" value="1" ${config['embed_album_art']}> <input type="checkbox" name="embed_album_art" value="1" ${config['embed_album_art']}>
</label> </label>
</div>
<div class="row checkbox left clearfix nopad">
<label> <label>
Embed lyrics Embed lyrics
<input type="checkbox" name="embed_lyrics" value="1" ${config['embed_lyrics']}> <input type="checkbox" name="embed_lyrics" value="1" ${config['embed_lyrics']}>
</label> </label>
<label title="Use ID3v2.3 instead of ID3v2.4">
Tag using ID3v2.3
<input type="checkbox" name="idtag" value="1" ${config['idtag']}>
</label>
</div> </div>
<div class="row"> <div class="row">
<label> <label>
@@ -1265,7 +1279,7 @@
</div> </div>
<div class="row"> <div class="row">
<label>VBR/CBR</label> <label>VBR/CBR</label>
<select name="encodervbrcbr"> <select name="encodervbrcbr" id="encodervbrcbr">
%for x in ['cbr', 'vbr']: %for x in ['cbr', 'vbr']:
<% <%
if config['encodervbrcbr'] == x: if config['encodervbrcbr'] == x:
@@ -1277,35 +1291,38 @@
%endfor %endfor
</select> </select>
</div> </div>
<div class="row"> <div id="vbr_options">
<label>Quality</label> <div class="row">
<select name="encoderquality"> <label>Quality</label>
%for x in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]: <select name="encoderquality">
<% %for x in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]:
if config['encoderquality'] == x: <%
outputselect = 'selected' if config['encoderquality'] == x:
else: outputselect = 'selected'
outputselect = '' else:
%> outputselect = ''
<option value=${x} ${outputselect}>${x}</option> %>
%endfor <option value=${x} ${outputselect}>${x}</option>
</select> %endfor
</select>
</div>
</div> </div>
<div class="row"> <div id="cbr_options">
<label>Bitrate</label> <div class="row">
<select name="bitrate"> <label>Bitrate</label>
%for x in [64, 128, 192, 256, 320]: <select name="bitrate">
<% %for x in [64, 128, 192, 256, 320]:
if config["bitrate"] == x: <%
bitrateselected = "selected" if config["bitrate"] == x:
else: bitrateselected = "selected"
bitrateselected = '' else:
%> bitrateselected = ''
<option value=${x} ${bitrateselected}> ${x} kbps</option> %>
%endfor <option value=${x} ${bitrateselected}> ${x} kbps</option>
</select> %endfor
</select>
</div>
</div> </div>
<% <%
if config["samplingfrequency"] == 44100: if config["samplingfrequency"] == 44100:
freq44100 = 'selected="selected"' freq44100 = 'selected="selected"'
@@ -1347,7 +1364,7 @@
<td> <td>
<fieldset> <fieldset>
<legend>Miscellaneous</legend> <legend>Miscellaneous</legend>
<div class="checkbox left row"> <div class="row checkbox left clearfix nopad">
<input type="checkbox" name="include_extras" id="include_extras" value="1" ${config['include_extras']} /><label>Automatically include extras when adding an artist <br> <input type="checkbox" name="include_extras" id="include_extras" value="1" ${config['include_extras']} /><label>Automatically include extras when adding an artist <br>
<% <%
which_extras_selected = "" which_extras_selected = ""
@@ -1372,26 +1389,31 @@
%endfor %endfor
</div> </div>
</div> </div>
<div class="row left checkbox"> <div class="row checkbox left clearfix nopad">
<input type="checkbox" name="official_releases_only" value="1" ${config['official_releases_only']} /><label>Only include 'official' extras (i.e. no bootlegs, promos, etc.)</label> <label><input type="checkbox" name="official_releases_only" value="1" ${config['official_releases_only']} />Only include 'official' extras (i.e. no bootlegs, promos, etc.)</label>
</div> </div>
<div class="row left checkbox"> <div class="row checkbox left clearfix nopad">
<input type="checkbox" name="autowant_upcoming" value="1" ${config['autowant_upcoming']} /><label>Automatically mark upcoming albums as wanted</label> <label><input type="checkbox" name="autowant_upcoming" value="1" ${config['autowant_upcoming']} />Automatically mark upcoming albums as wanted</label>
</div> </div>
<div class="row left checkbox"> <div class="row checkbox left clearfix nopad">
<input type="checkbox" name="autowant_all" value="1" ${config['autowant_all']} /><label>Automatically mark all albums as wanted</label> <label><input type="checkbox" name="autowant_all" value="1" ${config['autowant_all']} />Automatically mark all albums as wanted</label>
</div> </div>
<div class="row left checkbox"> <div class="row checkbox left clearfix nopad">
<input type="checkbox" title="Automatically mark manually added albums from search results as wanted" <label><input type="checkbox" title="Automatically mark manually added albums from search results as wanted"
name="autowant_manually_added" value="1" ${config['autowant_manually_added']} /> name="autowant_manually_added" value="1" ${config['autowant_manually_added']} />Automatically mark manually added albums as wanted</label>
<label>Automatically mark manually added albums as wanted</label>
</div> </div>
<div class="row left checkbox"> <div class="row checkbox left clearfix nopad">
<label title="Freeze the database, so new artists won't be added automatically. Use this if Headphones adds artists because due to wrong snatches. This check is skipped when the folder name is appended with release group ID."> <label title="Freeze the database, so new artists won't be added automatically. Use this if Headphones adds artists because due to wrong snatches. This check is skipped when the folder name is appended with release group ID.">
Don't add new artists when post-processing albums Don't add new artists when post-processing albums
<input type="checkbox" name="freeze_db" id="freeze_db" value="1" ${config['freeze_db']} /> <input type="checkbox" name="freeze_db" id="freeze_db" value="1" ${config['freeze_db']} />
</label> </label>
</div> </div>
<div class="row checkbox left clearfix">
<label title="Use ID3v2.3 instead of ID3v2.4">
Tag using ID3v2.3 instead of ID3v2.4
<input type="checkbox" name="idtag" value="1" ${config['idtag']}>
</label>
</div>
<div class="row"> <div class="row">
<label>Folder Permissions</label> <label>Folder Permissions</label>
<input type="text" name="folder_permissions" value="${config['folder_permissions']}" size="7"> <input type="text" name="folder_permissions" value="${config['folder_permissions']}" size="7">
@@ -1439,7 +1461,7 @@
<div id="songkickoptions"> <div id="songkickoptions">
<div class="row"> <div class="row">
<label>API Key</label> <label>API Key</label>
<input type="text" name="songkick_apikey" value="${config['songkick_apikey']}" size="50"> <input type="text" name="songkick_apikey" value="${config['songkick_apikey']}" size="40">
</div> </div>
<div class="row checkbox"> <div class="row checkbox">
<input type="checkbox" name="songkick_filter_enabled" id="songkick_filter" value="1" ${config['songkick_filter_enabled']} /><label>Filter by Metro Area</label> <input type="checkbox" name="songkick_filter_enabled" id="songkick_filter" value="1" ${config['songkick_filter_enabled']} /><label>Filter by Metro Area</label>
@@ -1498,7 +1520,7 @@
<label>Username</label><input type="text" class="hpuser" name="hpuser" value="${config['hpuser']}" size="20"> <label>Username</label><input type="text" class="hpuser" name="hpuser" value="${config['hpuser']}" size="20">
</div> </div>
<div class="row"> <div class="row">
<label>Password</label><input type="password" class="hppass" name="hppass" value="${config['hppass']}" size="15"><br> <label>Password</label><input type="password" class="hppass" name="hppass" value="${config['hppass']}" size="20"><br>
<a href="https://headphones.codeshy.com/vip" id="vipserver" target="_blank">Get an Account!</a> <a href="https://headphones.codeshy.com/vip" id="vipserver" target="_blank">Get an Account!</a>
</div> </div>
</div> </div>
@@ -1525,6 +1547,10 @@
$("#lameffmpegproperties").slideUp(); $("#lameffmpegproperties").slideUp();
$("#xldproperties").slideUp(); $("#xldproperties").slideUp();
}; };
hideEncodingOptionDivs = function () {
$("#vbr_options").slideUp();
$("#cbr_options").slideUp();
};
handleNewServerSelection = function () { handleNewServerSelection = function () {
hideServerDivs(); hideServerDivs();
@@ -1558,6 +1584,19 @@
} }
}; };
handleNewEncodingOptionSelection = function () {
hideEncodingOptionDivs();
switch ($(this).val()) {
case 'vbr':
$("#vbr_options").slideDown();
break;
case 'cbr':
$("#cbr_options").slideDown();
break;
}
};
function openExtrasDialog() { function openExtrasDialog() {
$("#dialog").dialog({ close: function(){ $("#dialog").dialog({ close: function(){
var elem = '<input type="button" data-success="Changes saved successfully">'; var elem = '<input type="button" data-success="Changes saved successfully">';
@@ -2120,6 +2159,9 @@
$("#encoder").change(handleNewEncoderSelection); $("#encoder").change(handleNewEncoderSelection);
handleNewEncoderSelection.apply($("#encoder")); handleNewEncoderSelection.apply($("#encoder"));
$("#encodervbrcbr").change(handleNewEncodingOptionSelection);
handleNewEncodingOptionSelection.apply($("#encodervbrcbr"));
var deletedNewznabs = 0; var deletedNewznabs = 0;
$(".remove").click(function() { $(".remove").click(function() {
+10
View File
@@ -408,6 +408,9 @@ form .checkbox small {
form .indent input { form .indent input {
margin-left: 15px; margin-left: 15px;
} }
form .suboptions {
margin-left: 15px;
}
ul, ul,
ol { ol {
margin-left: 2em; margin-left: 2em;
@@ -1420,6 +1423,13 @@ div#artistheader h2 a {
line-height: 10px; line-height: 10px;
height: 10px; height: 10px;
} }
.nopad {
margin-bottom: 0px !important;
margin-top: 0px !important;
padding-top: 0px !important;
padding-bottom: 0px !important;
padding: 0px 0px !important;
}
#album_table th#albumname, #album_table th#albumname,
#upcoming_table th#artistname, #upcoming_table th#artistname,
#wanted_table th#artistname { #wanted_table th#artistname {