Display download options even when video only has one format

This commit is contained in:
Pierre Rudloff 2019-11-07 23:42:48 +01:00
parent d0add4955d
commit adba68edbc

View file

@ -20,11 +20,11 @@
<br/> <br/>
<form action="{path_for name="download"}"> <form action="{path_for name="download"}">
<input type="hidden" name="url" value="{$video->webpage_url}" /> <input type="hidden" name="url" value="{$video->webpage_url}" />
{if isset($video->formats) && count($video->formats) > 1}
<h3><label for="format">{t}Available formats:{/t}</label></h3>
{if $config->uglyUrls} {if $config->uglyUrls}
<input type="hidden" name="page" value="download" /> <input type="hidden" name="page" value="download" />
{/if} {/if}
{if isset($video->formats) && count($video->formats) > 1}
<h3><label for="format">{t}Available formats:{/t}</label></h3>
<select name="format" id="format" class="formats monospace"> <select name="format" id="format" class="formats monospace">
<optgroup label="{t}Generic formats{/t}"> <optgroup label="{t}Generic formats{/t}">
{foreach $config->genericFormats as $format => $name} {foreach $config->genericFormats as $format => $name}
@ -70,6 +70,7 @@
{/foreach} {/foreach}
</optgroup> </optgroup>
</select><br/><br/> </select><br/><br/>
{/if}
{if $config->stream} {if $config->stream}
<input type="checkbox" checked name="stream" id="stream"/> <input type="checkbox" checked name="stream" id="stream"/>
<label for="stream">{t}Stream the video through the server{/t}</label> <label for="stream">{t}Stream the video through the server{/t}</label>
@ -90,7 +91,6 @@
<span id="customBitrateUnit">{t}kbit/s audio{/t}</span> <span id="customBitrateUnit">{t}kbit/s audio{/t}</span>
<br/><br/> <br/><br/>
{/if} {/if}
{/if}
<input class="downloadBtn" type="submit" value="{t}Download{/t}" /><br/> <input class="downloadBtn" type="submit" value="{t}Download{/t}" /><br/>
</form> </form>
</main> </main>