diff --git a/data/interfaces/default/config.html b/data/interfaces/default/config.html
index 5688ce6d..509f5585 100644
--- a/data/interfaces/default/config.html
+++ b/data/interfaces/default/config.html
@@ -1402,6 +1402,11 @@
+
+
+
+ If different from format selected above
+
diff --git a/headphones/music_encoder.py b/headphones/music_encoder.py
index c25748f7..5f79e896 100644
--- a/headphones/music_encoder.py
+++ b/headphones/music_encoder.py
@@ -128,7 +128,7 @@ def encode(albumPath):
logger.warn('Cannot re-encode .ogg %s', music.decode(headphones.SYS_ENCODING, 'replace'))
else:
encode = True
- elif headphones.CONFIG.ENCODEROUTPUTFORMAT == 'mp3' or headphones.CONFIG.ENCODEROUTPUTFORMAT == 'm4a':
+ else:
if music.decode(headphones.SYS_ENCODING, 'replace').lower().endswith('.' + headphones.CONFIG.ENCODEROUTPUTFORMAT) and (int(infoMusic.bitrate / 1000) <= headphones.CONFIG.BITRATE):
logger.info('%s has bitrate <= %skb, will not be re-encoded', music, headphones.CONFIG.BITRATE)
else:
diff --git a/headphones/webserve.py b/headphones/webserve.py
index 121e8667..5385ac31 100644
--- a/headphones/webserve.py
+++ b/headphones/webserve.py
@@ -1309,6 +1309,12 @@ class WebInterface(object):
kwargs[plain_config] = kwargs[use_config]
del kwargs[use_config]
+ # Check if encoderoutputformat is set multiple times
+ if len(kwargs['encoderoutputformat'][-1]) > 1:
+ kwargs['encoderoutputformat'] = kwargs['encoderoutputformat'][-1]
+ else:
+ kwargs['encoderoutputformat'] = kwargs['encoderoutputformat'][0]
+
extra_newznabs = []
for kwarg in [x for x in kwargs if x.startswith('newznab_host')]:
newznab_host_key = kwarg