refactor: Cleanup best format logic
Reuse $defaultFormat everywhere instead of duplicating conditions
This commit is contained in:
parent
506584ceee
commit
f315343798
2 changed files with 11 additions and 12 deletions
|
@ -27,7 +27,7 @@
|
|||
{/if}
|
||||
<select name="format" id="format" class="formats monospace">
|
||||
<optgroup label="{t}Generic formats{/t}">
|
||||
<option value="{if $config->stream}best{else}best[protocol=https]/best[protocol=http]{/if}">
|
||||
<option value="{$defaultFormat}">
|
||||
{strip}
|
||||
{t}Best{/t} ({$video->ext})
|
||||
{/strip}
|
||||
|
@ -37,7 +37,7 @@
|
|||
{t}Remux best video with best audio{/t}
|
||||
</option>
|
||||
{/if}
|
||||
<option value="{if $config->stream}worst{else}worst[protocol=https]/worst[protocol=http]{/if}">
|
||||
<option value="{$defaultFormat|replace:best:worst}">
|
||||
{t}Worst{/t}
|
||||
</option>
|
||||
</optgroup>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue