Provide config toggle to set 'audio' conversion on as default (#310)
* Provide config toggle to set 'audio' conversion on as default * Fix git cherry pick mistake * Update templates/index.tpl Co-authored-by: Pierre Rudloff <contact@rudloff.pro> * Add default audio config option to config.example Co-authored-by: Pierre Rudloff <contact@rudloff.pro>
This commit is contained in:
parent
f9aab3c404
commit
2e8350ce1a
4 changed files with 12 additions and 1 deletions
|
@ -140,6 +140,13 @@ class Config
|
|||
*/
|
||||
public $debug = false;
|
||||
|
||||
/**
|
||||
* Default to audio.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $defaultAudio = false;
|
||||
|
||||
/**
|
||||
* Config constructor.
|
||||
*
|
||||
|
|
|
@ -55,3 +55,6 @@ genericFormats:
|
|||
|
||||
# Enable debug mode.
|
||||
debug: false
|
||||
|
||||
# True to enable audio conversion mode by default
|
||||
defaultAudio: false
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
{if $config->convert}
|
||||
<div class="mp3 small-font">
|
||||
<div class="mp3-inner">
|
||||
<input type="checkbox" id="audio" class="audio" name="audio">
|
||||
<input type="checkbox" id="audio" class="audio" name="audio" {($config->defaultAudio) ? 'checked' : ''}>
|
||||
<label for="audio"><span class="ui"></span>
|
||||
{t}Audio only (MP3){/t}
|
||||
</label>
|
||||
|
|
|
@ -75,6 +75,7 @@ class ConfigTest extends BaseTest
|
|||
$this->assertIsBool($config->uglyUrls);
|
||||
$this->assertIsBool($config->stream);
|
||||
$this->assertIsBool($config->remux);
|
||||
$this->assertIsBool($config->defaultAudio);
|
||||
$this->assertIsInt($config->audioBitrate);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue