Provide config toggle to disable the 'convert seek' function in the frontend

This commit is contained in:
bellington3 2020-09-27 14:06:37 +02:00
parent 2e05989ee3
commit 1f7c50dc35
3 changed files with 10 additions and 0 deletions

View File

@ -140,6 +140,13 @@ class Config
*/
public $debug = false;
/**
* Disable audio conversion from/to seeker.
*
* @var bool
*/
public $convertSeek = true;
/**
* Config constructor.
*

View File

@ -24,6 +24,7 @@
<label for="audio"><span class="ui"></span>
{t}Audio only (MP3){/t}
</label>
{if $config->convertSeek}
<div class="seekOptions">
<label for="from">{t}From{/t}</label> <input type="text" pattern="(\d+:)?(\d+:)?\d+(\.\d+)?"
placeholder="HH:MM:SS" value="" name="from"
@ -31,6 +32,7 @@
<label for="to">{t}to{/t}</label> <input type="text" pattern="(\d+:)?(\d+:)?\d+(\.\d+)?"
placeholder="HH:MM:SS" value="" name="to" id="to"/>
</div>
{/if}
</div>
</div>
{/if}

View File

@ -75,6 +75,7 @@ class ConfigTest extends BaseTest
$this->assertIsBool($config->uglyUrls);
$this->assertIsBool($config->stream);
$this->assertIsBool($config->remux);
$this->assertIsBool($config->convertSeek);
$this->assertIsInt($config->audioBitrate);
}