Use --flat-playlist to get playlists more efficiently

This commit is contained in:
Pierre Rudloff 2017-04-28 14:43:20 +02:00
parent df2de166cb
commit 6651b45545
2 changed files with 15 additions and 7 deletions

View file

@ -38,7 +38,7 @@ class Config
*
* @var array
*/
public $params = ['--no-warnings', '--ignore-errors'];
public $params = ['--no-warnings', '--ignore-errors', '--flat-playlist'];
/**
* Enable audio conversion.

View file

@ -8,12 +8,20 @@
</p>
{foreach $video->entries as $video}
<div class="playlist-entry">
<img class="thumb" src="{$video->thumbnail}" alt="" width="200" />
<h3><a target="_blank" href="{$video->webpage_url}">{$video->title}</a></h3>
<a target="_blank" class="downloadBtn" href="{path_for name="redirect"}?url={$video->webpage_url}">Download</a>
{if count($video->formats) > 1}
<a target="_blank" href="{path_for name="video"}?url={$video->webpage_url}">More options</a>
{/if}
<h3><a target="_blank" href="{strip}
{if isset($video->ie_key) and $video->ie_key == Youtube and !filter_var($video->url, FILTER_VALIDATE_URL)}
https://www.youtube.com/watch?v=
{/if}
{$video->url}
{/strip}">
{if !isset($video->title) and $video->ie_key == YoutubePlaylist}
Playlist
{else}
{$video->title}
{/if}
</a></h3>
<a target="_blank" class="downloadBtn" href="{path_for name="redirect"}?url={$video->url}">Download</a>
<a target="_blank" href="{path_for name="video"}?url={$video->url}">More options</a>
</div>
{/foreach}