Cleanup playlists
This commit is contained in:
parent
3f053d9eed
commit
43cbd4f6fe
10 changed files with 175 additions and 121 deletions
19
templates/playlist.tpl
Normal file
19
templates/playlist.tpl
Normal file
|
@ -0,0 +1,19 @@
|
|||
{include file="inc/head.tpl"}
|
||||
<div class="wrapper">
|
||||
<div class="main">
|
||||
{include file="inc/logo.tpl"}
|
||||
<p>Videos extracted from the<i>
|
||||
<a href="{$video->webpage_url}">
|
||||
{$video->title}</a></i> playlist:
|
||||
</p>
|
||||
{foreach $video->entries as $video}
|
||||
<div class="playlist-entry">
|
||||
<img class="thumb" src="{$video->thumbnail}" alt="" width="200" />
|
||||
<h3><a href="{$video->webpage_url}">{$video->title}</a></h3>
|
||||
<a class="downloadBtn" href="{path_for name="redirect"}?url={$video->webpage_url}">Download</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{include file="inc/footer.tpl"}
|
|
@ -3,95 +3,92 @@
|
|||
<div itemscope itemtype="http://schema.org/VideoObject">
|
||||
<div class="main">
|
||||
{include file="inc/logo.tpl"}
|
||||
{foreach $vidarr as $video}
|
||||
<p id="download_intro{$video@index}" class="download_intro">You are going to download<i itemprop="name">
|
||||
<a itemprop="url" id="video_link{$video@index}"
|
||||
class="video_link"
|
||||
data-ext="{$video->ext}"
|
||||
data-video="{$video->url|escape}"
|
||||
href="{$video->webpage_url}">
|
||||
{$video->title}</a></i>.
|
||||
</p>
|
||||
{if isset($video->thumbnail)}
|
||||
<img itemprop="thumbnailUrl" class="thumb" src="{$video->thumbnail}" alt="" />
|
||||
{/if}
|
||||
{if isset($video->description)}
|
||||
<meta itemprop="description" content="{$video->description|escape}" />
|
||||
{/if}
|
||||
{if isset($video->upload_date)}
|
||||
<meta itemprop="uploadDate" content="{$video->upload_date}" />
|
||||
{/if}
|
||||
<br/>
|
||||
{if isset($video->formats)}
|
||||
<h3><label for="format{$video@index}">Available formats:</label></h3>
|
||||
<form action="{path_for name="redirect"}">
|
||||
<input type="hidden" name="url" value="{$video->webpage_url}" />
|
||||
{if uglyUrls}
|
||||
<input type="hidden" name="page" value="redirect" />
|
||||
{/if}
|
||||
<select name="format" id="format{$video@index}" class="formats monospace">
|
||||
<optgroup label="Generic formats">
|
||||
<option value="best{$protocol}">
|
||||
<p id="download_intro">You are going to download<i itemprop="name">
|
||||
<a itemprop="url" id="video_link"
|
||||
data-ext="{$video->ext}"
|
||||
data-video="{$video->url|escape}"
|
||||
href="{$video->webpage_url}">
|
||||
{$video->title}</a></i>.
|
||||
</p>
|
||||
{if isset($video->thumbnail)}
|
||||
<img itemprop="thumbnailUrl" class="thumb" src="{$video->thumbnail}" alt="" />
|
||||
{/if}
|
||||
{if isset($video->description)}
|
||||
<meta itemprop="description" content="{$video->description|escape}" />
|
||||
{/if}
|
||||
{if isset($video->upload_date)}
|
||||
<meta itemprop="uploadDate" content="{$video->upload_date}" />
|
||||
{/if}
|
||||
<br/>
|
||||
{if isset($video->formats)}
|
||||
<h3><label for="format">Available formats:</label></h3>
|
||||
<form action="{path_for name="redirect"}">
|
||||
<input type="hidden" name="url" value="{$video->webpage_url}" />
|
||||
{if $uglyUrls}
|
||||
<input type="hidden" name="page" value="redirect" />
|
||||
{/if}
|
||||
<select name="format" id="format" class="formats monospace">
|
||||
<optgroup label="Generic formats">
|
||||
<option value="best{$protocol}">
|
||||
{strip}
|
||||
Best ({$video->ext})
|
||||
{/strip}
|
||||
</option>
|
||||
{if $remux}
|
||||
<option value="bestvideo+bestaudio">
|
||||
Remux best video with best audio
|
||||
</option>
|
||||
{/if}
|
||||
<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}
|
||||
Best ({$video->ext})
|
||||
{/strip}
|
||||
</option>
|
||||
{if $remux}
|
||||
<option value="bestvideo+bestaudio">
|
||||
Remux best video with best audio
|
||||
</option>
|
||||
{/if}
|
||||
<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}
|
||||
{for $foo=1 to (5 - ($format->ext|strlen))}
|
||||
<option value="{$format->format_id}">
|
||||
{$format->ext}
|
||||
{for $foo=1 to (5 - ($format->ext|strlen))}
|
||||
|
||||
{/for}
|
||||
{if isset($format->width)}
|
||||
{$format->width}x{$format->height}
|
||||
{for $foo=1 to (10 - (("{$format->width}x{$format->height}")|strlen))}
|
||||
|
||||
{/for}
|
||||
{if isset($format->width)}
|
||||
{$format->width}x{$format->height}
|
||||
{for $foo=1 to (10 - (("{$format->width}x{$format->height}")|strlen))}
|
||||
|
||||
{/for}
|
||||
{else}
|
||||
{for $foo=1 to 10}
|
||||
|
||||
{/for}
|
||||
{/if}
|
||||
{if isset($format->filesize)}
|
||||
{($format->filesize/1000000)|round:2} MB
|
||||
{for $foo=1 to (7 - (($format->filesize/1000000)|round:2|strlen))}
|
||||
|
||||
{/for}
|
||||
{else}
|
||||
{for $foo=1 to 10}
|
||||
|
||||
{/for}
|
||||
{/if}
|
||||
{if isset($format->format_note)}
|
||||
{$format->format_note}
|
||||
{/if}
|
||||
({$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{$protocol}" />
|
||||
<a class="downloadBtn" href="{$video->url|escape}">Download</a><br/>
|
||||
{/if}
|
||||
<hr />
|
||||
{/foreach}
|
||||
{else}
|
||||
{for $foo=1 to 10}
|
||||
|
||||
{/for}
|
||||
{/if}
|
||||
{if isset($format->filesize)}
|
||||
{($format->filesize/1000000)|round:2} MB
|
||||
{for $foo=1 to (7 - (($format->filesize/1000000)|round:2|strlen))}
|
||||
|
||||
{/for}
|
||||
{else}
|
||||
{for $foo=1 to 10}
|
||||
|
||||
{/for}
|
||||
{/if}
|
||||
{if isset($format->format_note)}
|
||||
{$format->format_note}
|
||||
{/if}
|
||||
({$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{$protocol}" />
|
||||
<a class="downloadBtn"
|
||||
href="{$video->url|escape}">Download</a><br/>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{include file="inc/footer.tpl"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue