mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-15 16:19:28 +01:00
Added reencode options to gui
This commit is contained in:
@@ -109,11 +109,11 @@ header { min-height: 68px; width: 100%; min-width: 935px; padding-left: 0px; pad
|
||||
h1 { font-size: 24px; }
|
||||
h2 { font-size: 20px; }
|
||||
h3 { font-size: 16px; }
|
||||
h4 { font-size: 13px; }
|
||||
h4 { font-size: 14px; }
|
||||
|
||||
p.indented { padding-top: 20px; margin-left: 20px; font-size: 14px; }
|
||||
p.center { text-align: center; font-size: 18px; }
|
||||
.smalltext2 { font-size: 11px; margin-left: 45px; }
|
||||
.smalltext2 { font-size: 12px; margin-left: 45px; }
|
||||
|
||||
div#updatebar { text-align: center; min-width: 970px; width: 100%; background-color: light-blue; float: left; }
|
||||
div#logo { float: left; padding-left: 10px; }
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
</select>
|
||||
Bitrate: <input type="text" name="bitrate" value="${config['bitrate']}" size="3" maxlength="5" />kbps <br>
|
||||
<br>
|
||||
<h3>Path to Encoder:</h3><input type="text" name="encoder" value="{config['encoderfolder']}" size="43">
|
||||
<h3>Path to Encoder:</h3><input type="text" name="encoderfolder" value="${config['encoderfolder']}" size="43">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<td>
|
||||
<h3>SABnzbd Host:</h3><input type="text" name="sab_host" value="${config['sab_host']}" size="30" maxlength="40"><br>
|
||||
|
||||
<i class="smalltext">usually localhost:8080</i>
|
||||
<i class="smalltext">usually http://localhost:8080</i>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@@ -260,16 +260,24 @@
|
||||
<td>
|
||||
<h2>Re-Encoding Options:</h2>
|
||||
<br>
|
||||
<h3><input type="checkbox" name="reencode" value="1" />Convert Lossless to mp3</h3>
|
||||
<h3><input type="checkbox" name="encode" value="1" ${config['encode']}/>Convert Lossless to mp3</h3>
|
||||
<i class="smalltext">Note: this option requires the lame or ffdshow encoder</i>
|
||||
<br><br>
|
||||
<%
|
||||
if config['encoder'] == 'lame':
|
||||
lameselect = 'selected="selected"'
|
||||
ffdshowselect = ''
|
||||
else:
|
||||
lameselect = ''
|
||||
ffdshowselect = 'selected="selected"'
|
||||
%>
|
||||
<h3>Encoder: <select name="encoder">
|
||||
<option value="lame">lame</option>
|
||||
<option value="ffdshow">ffdshow</option>
|
||||
<option value="lame" ${lameselect}>lame</option>
|
||||
<option value="ffdshow" ${ffdshowselect}>ffdshow</option>
|
||||
</select>
|
||||
Bitrate: <input type="text" name="encode_bitrate" value="" size="3" maxlength="5" />kbps <br>
|
||||
Bitrate: <input type="text" name="bitrate" value="${config['bitrate']}" size="3" maxlength="5" />kbps <br>
|
||||
<br>
|
||||
<h3>Path to Encoder:</h3><input type="text" name="encoder" value="" size="43">
|
||||
<h3>Path to Encoder:</h3><input type="text" name="encoderfolder" value="${config['encoderfolder']}" size="43">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -256,12 +256,10 @@ def initialize():
|
||||
|
||||
ENCODERFOLDER = check_setting_str(CFG, 'General', 'encoderfolder', '')
|
||||
ENCODER = check_setting_str(CFG, 'General', 'encoder', 'ffmpeg')
|
||||
BITRATE = check_setting_int(CFG, 'General', 'bitrate', 128)
|
||||
BITRATE = check_setting_int(CFG, 'General', 'bitrate', 192)
|
||||
SAMPLINGFREQUENCY= check_setting_int(CFG, 'General', 'samplingfrequency', 44100)
|
||||
ENCODE = bool(check_setting_int(CFG, 'General', 'encode', 0))
|
||||
|
||||
|
||||
|
||||
if not LOG_DIR:
|
||||
LOG_DIR = os.path.join(DATA_DIR, 'logs')
|
||||
|
||||
|
||||
@@ -304,7 +304,8 @@ class WebInterface(object):
|
||||
|
||||
interface_dir = os.path.join(headphones.PROG_DIR, 'data/interfaces/')
|
||||
interface_list = [ name for name in os.listdir(interface_dir) if os.path.isdir(os.path.join(interface_dir, name)) ]
|
||||
|
||||
print 'Value going in: '
|
||||
print headphones.ENCODER
|
||||
config = {
|
||||
"http_host" : headphones.HTTP_HOST,
|
||||
"http_user" : headphones.HTTP_USERNAME,
|
||||
@@ -365,7 +366,7 @@ class WebInterface(object):
|
||||
nzbsorg=0, nzbsorg_uid=None, nzbsorg_hash=None, newzbin=0, newzbin_uid=None, newzbin_password=None, preferred_quality=0, preferred_bitrate=None, detect_bitrate=0, move_files=0,
|
||||
rename_files=0, correct_metadata=0, cleanup_files=0, add_album_art=0, embed_album_art=0, destination_dir=None, folder_format=None, file_format=None, include_extras=0, interface=None, log_dir=None,
|
||||
encode=0, encoder=None, bitrate=None, encoderfolder=None):
|
||||
|
||||
|
||||
headphones.HTTP_HOST = http_host
|
||||
headphones.HTTP_PORT = http_port
|
||||
headphones.HTTP_USERNAME = http_username
|
||||
|
||||
Reference in New Issue
Block a user