Add a stream parameter in config (fixes #24 and #39)

This commit is contained in:
Pierre Rudloff 2017-01-16 11:29:56 +01:00
parent d96a1e4867
commit 4e1c1ca953
5 changed files with 56 additions and 24 deletions

View file

@ -29,17 +29,18 @@
{/if}
<select name="format" id="format" class="formats monospace">
<optgroup label="Generic formats">
<option value="best">
<option value="best{$protocol}">
{strip}
Best ({$video->ext})
{/strip}
</option>
<option value="worst">
<option value="worst{$protocol}">
Worst
</option>
</optgroup>
<optgroup label="Detailed formats" class="monospace">
{foreach $video->formats as $format}
{if $config->stream || $format->protocol|in_array:array('http', 'https')}
{strip}
<option value="{$format->format_id}">
{$format->ext}
@ -72,13 +73,14 @@
&nbsp;({$format->format_id})
</option>
{/strip}
{/if}
{/foreach}
</optgroup>
</select><br/><br/>
<input class="downloadBtn" type="submit" value="Download" /><br/>
</form>
{else}
<input type="hidden" name="format" value="best" />
<input type="hidden" name="format" value="best{$protocol}" />
<a class="downloadBtn"
href="{$video->url|escape}">Download</a><br/>
{/if}