Use redirect even if we only have one format

This commit is contained in:
Pierre Rudloff 2017-05-04 23:02:59 +02:00
parent a681804126
commit 6e8809b8bc

View file

@ -20,10 +20,10 @@
<meta itemprop="uploadDate" content="{$video->upload_date}" /> <meta itemprop="uploadDate" content="{$video->upload_date}" />
{/if} {/if}
<br/> <br/>
{if isset($video->formats)}
<h3><label for="format">Available formats:</label></h3>
<form action="{path_for name="redirect"}"> <form action="{path_for name="redirect"}">
<input type="hidden" name="url" value="{$video->webpage_url}" /> <input type="hidden" name="url" value="{$video->webpage_url}" />
{if isset($video->formats)}
<h3><label for="format">Available formats:</label></h3>
{if $config->uglyUrls} {if $config->uglyUrls}
<input type="hidden" name="page" value="redirect" /> <input type="hidden" name="page" value="redirect" />
{/if} {/if}
@ -85,9 +85,7 @@
<input class="downloadBtn" type="submit" value="Download" /><br/> <input class="downloadBtn" type="submit" value="Download" /><br/>
</form> </form>
{else} {else}
<input type="hidden" name="format" value="best{$protocol}" /> <input class="downloadBtn" type="submit" value="Download" /><br/>
<a class="downloadBtn"
href="{$video->url|escape}">Download</a><br/>
{/if} {/if}
</div> </div>
</div> </div>