Lint
This commit is contained in:
parent
957de61892
commit
d4c1357c32
16 changed files with 255 additions and 242 deletions
10
.travis.yml
10
.travis.yml
|
@ -2,10 +2,10 @@
|
||||||
language: php
|
language: php
|
||||||
php: 7.3
|
php: 7.3
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- language-pack-fr
|
- language-pack-fr
|
||||||
install: composer install --no-progress
|
install: composer install --no-progress
|
||||||
script:
|
script:
|
||||||
- composer lint
|
- composer lint
|
||||||
- composer test
|
- composer test
|
||||||
|
|
30
grumphp.yml
30
grumphp.yml
|
@ -1,17 +1,17 @@
|
||||||
---
|
---
|
||||||
parameters:
|
parameters:
|
||||||
ascii: ~
|
ascii: ~
|
||||||
tasks:
|
tasks:
|
||||||
jsonlint: ~
|
jsonlint: ~
|
||||||
xmllint: ~
|
xmllint: ~
|
||||||
yamllint: ~
|
yamllint: ~
|
||||||
composer: ~
|
composer: ~
|
||||||
phpcs:
|
phpcs:
|
||||||
standard: PSR12
|
standard: PSR12
|
||||||
ignore_patterns:
|
ignore_patterns:
|
||||||
- RoboFile.php
|
- RoboFile.php
|
||||||
phpstan:
|
phpstan:
|
||||||
level: max
|
level: max
|
||||||
configuration: phpstan.neon
|
configuration: phpstan.neon
|
||||||
ignore_patterns:
|
ignore_patterns:
|
||||||
- RoboFile.php
|
- RoboFile.php
|
||||||
|
|
30
phpunit.xml
30
phpunit.xml
|
@ -1,18 +1,18 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<phpunit bootstrap="tests/bootstrap.php">
|
<phpunit bootstrap="tests/bootstrap.php">
|
||||||
<filter>
|
<filter>
|
||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>classes/</directory>
|
<directory>classes/</directory>
|
||||||
<directory>controllers/</directory>
|
<directory>controllers/</directory>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Tests">
|
<testsuite name="Tests">
|
||||||
<directory>tests/</directory>
|
<directory>tests/</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
<logging>
|
<logging>
|
||||||
<log type="coverage-html" target="coverage/"/>
|
<log type="coverage-html" target="coverage/"/>
|
||||||
<log type="coverage-clover" target="clover.xml"/>
|
<log type="coverage-clover" target="clover.xml"/>
|
||||||
</logging>
|
</logging>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|
|
@ -1,21 +1,23 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE HTML>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
<title>AllTube Download - Maintenance</title>
|
<title>AllTube Download - Maintenance</title>
|
||||||
<link rel="stylesheet" href="../dist/main.css"/>
|
<link rel="stylesheet" href="../dist/main.css"/>
|
||||||
<link rel="icon" href="../img/favicon.png"/>
|
<link rel="icon" href="../img/favicon.png"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<h1>
|
<h1>
|
||||||
<img class="logo" src="../img/logo.png" alt="AllTube Download" width="328" height="284"/>
|
<img class="logo" src="../img/logo.png" alt="AllTube Download" width="328" height="284"/>
|
||||||
</h1>
|
</h1>
|
||||||
<div>An error occurred in the application and your page could not be served. Please try again in a few moments.</div>
|
<div>An error occurred in the application and your page could not be served. Please try again in a few
|
||||||
</div>
|
moments.
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</div>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE HTML>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
<title>AllTube Download - Maintenance</title>
|
<title>AllTube Download - Maintenance</title>
|
||||||
<link rel="stylesheet" href="../dist/main.css"/>
|
<link rel="stylesheet" href="../dist/main.css"/>
|
||||||
<link rel="icon" href="../img/favicon.png"/>
|
<link rel="icon" href="../img/favicon.png"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<h1>
|
<h1>
|
||||||
<img class="logo" src="../img/logo.png" alt="AllTube Download" width="328" height="284"/>
|
<img class="logo" src="../img/logo.png" alt="AllTube Download" width="328" height="284"/>
|
||||||
</h1>
|
</h1>
|
||||||
<div>This application is undergoing maintenance right now. Please check back later.</div>
|
<div>This application is undergoing maintenance right now. Please check back later.</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</div>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
<url>
|
<url>
|
||||||
<loc>https://alltubedownload.net/</loc>
|
<loc>https://alltubedownload.net/</loc>
|
||||||
<changefreq>yearly</changefreq>
|
<changefreq>yearly</changefreq>
|
||||||
<priority>1</priority>
|
<priority>1</priority>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>https://alltubedownload.net/extractors</loc>
|
<loc>https://alltubedownload.net/extractors</loc>
|
||||||
<changefreq>weekly</changefreq>
|
<changefreq>weekly</changefreq>
|
||||||
</url>
|
</url>
|
||||||
</urlset>
|
</urlset>
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
{t}Please check the URL of your video.{/t}
|
{t}Please check the URL of your video.{/t}
|
||||||
<p><i>{$error|escape}</i></p>
|
<p><i>{$error|escape}</i></p>
|
||||||
</main>
|
</main>
|
||||||
{include file='inc/footer.tpl'}
|
{include file='inc/footer.tpl'}
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
{include file='inc/logo.tpl'}
|
{include file='inc/logo.tpl'}
|
||||||
<h2 class="titre">{t}Supported websites{/t}</h2>
|
<h2 class="titre">{t}Supported websites{/t}</h2>
|
||||||
<div class="tripleliste">
|
<div class="tripleliste">
|
||||||
<ul>
|
<ul>
|
||||||
{foreach $extractors as $extractor}
|
{foreach $extractors as $extractor}
|
||||||
<li>{$extractor}</li>
|
<li>{$extractor}</li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{include file='inc/footer.tpl'}
|
{include file='inc/footer.tpl'}
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
·
|
·
|
||||||
|
|
||||||
<a rel="noopener" target="_blank" title="{t}Donate using Liberapay{/t}"
|
<a rel="noopener" target="_blank" title="{t}Donate using Liberapay{/t}"
|
||||||
href="https://liberapay.com/Rudloff/donate">
|
href="https://liberapay.com/Rudloff/donate">
|
||||||
{t}Donate{/t}
|
{t}Donate{/t}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html {if isset($locale)}lang="{$locale->getBcp47()}"{/if}>
|
<html {if isset($locale)}lang="{$locale->getBcp47()}"{/if}>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8"/>
|
||||||
<meta name=viewport content="width=device-width, initial-scale=1">
|
<meta name=viewport content="width=device-width, initial-scale=1">
|
||||||
{if isset($description)}
|
{if isset($description)}
|
||||||
<meta name="description" content="{$description|escape}" />
|
<meta name="description" content="{$description|escape}"/>
|
||||||
<meta name="twitter:description" content="{$description|escape}" />
|
<meta name="twitter:description" content="{$description|escape}"/>
|
||||||
<meta property="og:description" content="{$description|escape}" />
|
<meta property="og:description" content="{$description|escape}"/>
|
||||||
{/if}
|
{/if}
|
||||||
<link rel="stylesheet" href="{base_url}/css/fonts.css" />
|
<link rel="stylesheet" href="{base_url}/css/fonts.css"/>
|
||||||
<link rel="stylesheet" href="{base_url}/css/style.css" />
|
<link rel="stylesheet" href="{base_url}/css/style.css"/>
|
||||||
<title>{$config->appName}{if isset($title)} - {$title|escape}{/if}</title>
|
<title>{$config->appName}{if isset($title)} - {$title|escape}{/if}</title>
|
||||||
<link rel="canonical" href="{$canonical}" />
|
<link rel="canonical" href="{$canonical}"/>
|
||||||
<link rel="icon" href="{base_url}/img/favicon.png" />
|
<link rel="icon" href="{base_url}/img/favicon.png"/>
|
||||||
<meta property="og:title" content="{$config->appName}{if isset($title)} - {$title|escape}{/if}" />
|
<meta property="og:title" content="{$config->appName}{if isset($title)} - {$title|escape}{/if}"/>
|
||||||
<meta property="og:image" content="{base_url}/img/logo.png" />
|
<meta property="og:image" content="{base_url}/img/logo.png"/>
|
||||||
<meta name="twitter:card" content="summary" />
|
<meta name="twitter:card" content="summary"/>
|
||||||
<meta name="twitter:title" content="{$config->appName}{if isset($title)} - {$title|escape}{/if}" />
|
<meta name="twitter:title" content="{$config->appName}{if isset($title)} - {$title|escape}{/if}"/>
|
||||||
<meta name="twitter:image" content="{base_url}/img/logo.png" />
|
<meta name="twitter:image" content="{base_url}/img/logo.png"/>
|
||||||
<meta name="twitter:creator" content="@Tael67" />
|
<meta name="twitter:creator" content="@Tael67"/>
|
||||||
<meta name="theme-color" content="#4F4F4F">
|
<meta name="theme-color" content="#4F4F4F">
|
||||||
<link rel="manifest" href="{base_url}/resources/manifest.json" />
|
<link rel="manifest" href="{base_url}/resources/manifest.json"/>
|
||||||
</head>
|
</head>
|
||||||
<body class="{$class}">
|
<body class="{$class}">
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
{if $supportedLocale != $locale}
|
{if $supportedLocale != $locale}
|
||||||
<li>
|
<li>
|
||||||
<a hreflang="{$supportedLocale->getBcp47()}"
|
<a hreflang="{$supportedLocale->getBcp47()}"
|
||||||
lang="{$supportedLocale->getBcp47()}"
|
lang="{$supportedLocale->getBcp47()}"
|
||||||
href="{path_for name='locale' data=['locale'=>$supportedLocale->getIso15897()]}">
|
href="{path_for name='locale' data=['locale'=>$supportedLocale->getIso15897()]}">
|
||||||
{if $supportedLocale->getCountry()}
|
{if $supportedLocale->getCountry()}
|
||||||
{$supportedLocale->getCountry()->getEmoji()}
|
{$supportedLocale->getCountry()->getEmoji()}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<h1 class="logobis">
|
<h1 class="logobis">
|
||||||
<a class="logocompatible" href="{base_url}">
|
<a class="logocompatible" href="{base_url}">
|
||||||
<span class="logocompatiblemask"><img src="{base_url}/img/logocompatiblemask.png" width="447" height="107" alt="{$config->appName}" /></span>
|
<span class="logocompatiblemask"><img src="{base_url}/img/logocompatiblemask.png" width="447" height="107"
|
||||||
</a></h1>
|
alt="{$config->appName}"/></span>
|
||||||
|
</a></h1>
|
||||||
|
|
|
@ -2,41 +2,45 @@
|
||||||
{include file='inc/header.tpl'}
|
{include file='inc/header.tpl'}
|
||||||
<main class="main">
|
<main class="main">
|
||||||
<div><img class="logo" src="{base_url}/img/logo.png"
|
<div><img class="logo" src="{base_url}/img/logo.png"
|
||||||
alt="{$config->appName}" width="328" height="284"></div>
|
alt="{$config->appName}" width="328" height="284"></div>
|
||||||
<form action="{path_for name="info"}">
|
<form action="{path_for name="info"}">
|
||||||
<label class="labelurl" for="url">
|
<label class="labelurl" for="url">
|
||||||
{t}Copy here the URL of your video (Youtube, Dailymotion, etc.){/t}
|
{t}Copy here the URL of your video (Youtube, Dailymotion, etc.){/t}
|
||||||
</label>
|
</label>
|
||||||
<div class="champs">
|
<div class="champs">
|
||||||
<span class="URLinput_wrapper">
|
<span class="URLinput_wrapper">
|
||||||
<!-- We used to have an autofocus attribute on this field but it triggerd a very specific CSS bug: https://github.com/Rudloff/alltube/issues/117 -->
|
<!-- We used to have an autofocus attribute on this field but it triggerd a very specific CSS bug: https://github.com/Rudloff/alltube/issues/117 -->
|
||||||
<input class="URLinput large-font" type="url" name="url" id="url"
|
<input class="URLinput large-font" type="url" name="url" id="url"
|
||||||
required placeholder="http://example.com/video" />
|
required placeholder="http://example.com/video"/>
|
||||||
</span>
|
</span>
|
||||||
{if $config->uglyUrls}
|
{if $config->uglyUrls}
|
||||||
<input type="hidden" name="page" value="info" />
|
<input type="hidden" name="page" value="info"/>
|
||||||
{/if}
|
{/if}
|
||||||
<input class="downloadBtn large-font" type="submit" value="{t}Download{/t}" /><br/>
|
<input class="downloadBtn large-font" type="submit" value="{t}Download{/t}"/><br/>
|
||||||
{if $config->convert}
|
{if $config->convert}
|
||||||
<div class="mp3 small-font">
|
<div class="mp3 small-font">
|
||||||
<div class="mp3-inner">
|
<div class="mp3-inner">
|
||||||
<input type="checkbox" id="audio" class="audio" name="audio">
|
<input type="checkbox" id="audio" class="audio" name="audio">
|
||||||
<label for="audio"><span class="ui"></span>
|
<label for="audio"><span class="ui"></span>
|
||||||
{t}Audio only (MP3){/t}
|
{t}Audio only (MP3){/t}
|
||||||
</label>
|
</label>
|
||||||
<div class="seekOptions">
|
<div class="seekOptions">
|
||||||
<label for="from">{t}From{/t}</label> <input type="text" pattern="(\d+:)?(\d+:)?\d+(\.\d+)?" placeholder="HH:MM:SS" value="" name="from" id="from" />
|
<label for="from">{t}From{/t}</label> <input type="text" pattern="(\d+:)?(\d+:)?\d+(\.\d+)?"
|
||||||
<label for="to">{t}to{/t}</label> <input type="text" pattern="(\d+:)?(\d+:)?\d+(\.\d+)?" placeholder="HH:MM:SS" value="" name="to" id="to" />
|
placeholder="HH:MM:SS" value="" name="from"
|
||||||
|
id="from"/>
|
||||||
|
<label for="to">{t}to{/t}</label> <input type="text" pattern="(\d+:)?(\d+:)?\d+(\.\d+)?"
|
||||||
|
placeholder="HH:MM:SS" value="" name="to" id="to"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{/if}
|
||||||
{/if}
|
</div>
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
<a class="combatiblelink small-font" href="{path_for name="extractors"}">{t}See all supported websites{/t}</a>
|
<a class="combatiblelink small-font" href="{path_for name="extractors"}">{t}See all supported websites{/t}</a>
|
||||||
<div id="bookmarklet" class="bookmarklet_wrapper">
|
<div id="bookmarklet" class="bookmarklet_wrapper">
|
||||||
<p> {t}Drag this to your bookmarks bar:{/t} </p>
|
<p> {t}Drag this to your bookmarks bar:{/t} </p>
|
||||||
<a class="bookmarklet small-font" href="javascript:window.location='{$domain}{path_for name='info'}?url='+encodeURIComponent(location.href);">{t}Bookmarklet{/t}</a>
|
<a class="bookmarklet small-font"
|
||||||
|
href="javascript:window.location='{$domain}{path_for name='info'}?url='+encodeURIComponent(location.href);">{t}Bookmarklet{/t}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
|
@ -1,100 +1,105 @@
|
||||||
{include file="inc/head.tpl"}
|
{include file="inc/head.tpl"}
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div itemscope itemtype="http://schema.org/VideoObject">
|
<div itemscope itemtype="http://schema.org/VideoObject">
|
||||||
<main class="main">
|
<main class="main">
|
||||||
{include file="inc/logo.tpl"}
|
{include file="inc/logo.tpl"}
|
||||||
{$title="<i itemprop='name'>
|
{$title="<i itemprop='name'>
|
||||||
<a itemprop='url' id='video_link'
|
<a itemprop='url' id='video_link'
|
||||||
href='{$video->webpage_url}'>
|
href='{$video->webpage_url}'>
|
||||||
{$video->title}</a></i>"}
|
{$video->title}</a></i>"}
|
||||||
<p id="download_intro">
|
<p id="download_intro">
|
||||||
{t params=['@title' => $title]}You are going to download @title.{/t}
|
{t params=['@title' => $title]}You are going to download @title.{/t}
|
||||||
</p>
|
</p>
|
||||||
{if isset($video->thumbnail)}
|
{if isset($video->thumbnail)}
|
||||||
<img itemprop="thumbnailUrl" class="thumb" src="{$video->thumbnail}" alt="" />
|
<img itemprop="thumbnailUrl" class="thumb" src="{$video->thumbnail}" alt=""/>
|
||||||
{/if}
|
{/if}
|
||||||
{if isset($video->description)}
|
{if isset($video->description)}
|
||||||
<meta itemprop="description" content="{$video->description|escape}" />
|
<meta itemprop="description" content="{$video->description|escape}"/>
|
||||||
{/if}
|
{/if}
|
||||||
{if isset($video->upload_date)}
|
{if isset($video->upload_date)}
|
||||||
<meta itemprop="uploadDate" content="{$video->upload_date}" />
|
<meta itemprop="uploadDate" content="{$video->upload_date}"/>
|
||||||
{/if}
|
{/if}
|
||||||
<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 $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}
|
{if isset($video->formats) && count($video->formats) > 1}
|
||||||
<h3><label for="format">{t}Available formats:{/t}</label></h3>
|
<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}
|
||||||
<option value="{$format}">{t}{$name}{/t}</option>
|
<option value="{$format}">{t}{$name}{/t}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</optgroup>
|
</optgroup>
|
||||||
<optgroup label="{t}Detailed formats{/t}" class="monospace">
|
<optgroup label="{t}Detailed formats{/t}" class="monospace">
|
||||||
{foreach $video->formats as $format}
|
{foreach $video->formats as $format}
|
||||||
{if $config->stream || $format->protocol|in_array:array('http', 'https')}
|
{if $config->stream || $format->protocol|in_array:array('http', 'https')}
|
||||||
{strip}
|
{strip}
|
||||||
<option value="{$format->format_id}">
|
<option value="{$format->format_id}">
|
||||||
{$format->ext}
|
{$format->ext}
|
||||||
{for $foo=1 to (5 - ($format->ext|strlen))}
|
{for $foo=1 to (5 - ($format->ext|strlen))}
|
||||||
|
|
||||||
{/for}
|
{/for}
|
||||||
{if isset($format->width)}
|
{if isset($format->width)}
|
||||||
{$format->width}x{$format->height}
|
{$format->width}x{$format->height}
|
||||||
{for $foo=1 to (10 - (("{$format->width}x{$format->height}")|strlen))}
|
{for $foo=1 to (10 - (("{$format->width}x{$format->height}")|strlen))}
|
||||||
|
|
||||||
{/for}
|
{/for}
|
||||||
{else}
|
{else}
|
||||||
{for $foo=1 to 10}
|
{for $foo=1 to 10}
|
||||||
|
|
||||||
{/for}
|
{/for}
|
||||||
{/if}
|
{/if}
|
||||||
{if isset($format->filesize)}
|
{if isset($format->filesize)}
|
||||||
{($format->filesize/1000000)|round:2} MB
|
{($format->filesize/1000000)|round:2} MB
|
||||||
{for $foo=1 to (7 - (($format->filesize/1000000)|round:2|strlen))}
|
{for $foo=1 to (7 - (($format->filesize/1000000)|round:2|strlen))}
|
||||||
|
|
||||||
{/for}
|
{/for}
|
||||||
{else}
|
{else}
|
||||||
{for $foo=1 to 10}
|
{for $foo=1 to 10}
|
||||||
|
|
||||||
{/for}
|
{/for}
|
||||||
{/if}
|
{/if}
|
||||||
{if isset($format->format_note)}
|
{if isset($format->format_note)}
|
||||||
{$format->format_note}
|
{$format->format_note}
|
||||||
{/if}
|
{/if}
|
||||||
({$format->format_id})
|
({$format->format_id})
|
||||||
</option>
|
</option>
|
||||||
{/strip}
|
{/strip}
|
||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</optgroup>
|
</optgroup>
|
||||||
</select><br/><br/>
|
</select>
|
||||||
{/if}
|
<br/>
|
||||||
{if $config->stream}
|
<br/>
|
||||||
<input type="checkbox" {if $config->stream != 'ask'}checked{/if} name="stream" id="stream"/>
|
{/if}
|
||||||
<label for="stream">{t}Stream the video through the server{/t}</label>
|
{if $config->stream}
|
||||||
<br/><br/>
|
<input type="checkbox" {if $config->stream != 'ask'}checked{/if} name="stream" id="stream"/>
|
||||||
{/if}
|
<label for="stream">{t}Stream the video through the server{/t}</label>
|
||||||
{if $config->convertAdvanced}
|
<br/>
|
||||||
<input type="checkbox" name="customConvert" id="customConvert"/>
|
<br/>
|
||||||
<label for="customConvert">{t}Convert into a custom format:{/t}</label>
|
{/if}
|
||||||
<select title="{t}Custom format{/t}" name="customFormat" aria-label="{t}Format to convert to{/t}">
|
{if $config->convertAdvanced}
|
||||||
{foreach $config->convertAdvancedFormats as $format}
|
<input type="checkbox" name="customConvert" id="customConvert"/>
|
||||||
<option>{$format}</option>
|
<label for="customConvert">{t}Convert into a custom format:{/t}</label>
|
||||||
{/foreach}
|
<select title="{t}Custom format{/t}" name="customFormat" aria-label="{t}Format to convert to{/t}">
|
||||||
</select>
|
{foreach $config->convertAdvancedFormats as $format}
|
||||||
{t}with{/t}
|
<option>{$format}</option>
|
||||||
<label for="customBitrate" class="sr-only">{t}Bit rate{/t}</label>
|
{/foreach}
|
||||||
<input type="number" value="{$config->audioBitrate}" title="{t}Custom bitrate{/t}" class="customBitrate"
|
</select>
|
||||||
name="customBitrate" id="customBitrate" aria-describedby="customBitrateUnit" />
|
{t}with{/t}
|
||||||
<span id="customBitrateUnit">{t}kbit/s audio{/t}</span>
|
<label for="customBitrate" class="sr-only">{t}Bit rate{/t}</label>
|
||||||
<br/><br/>
|
<input type="number" value="{$config->audioBitrate}" title="{t}Custom bitrate{/t}"
|
||||||
{/if}
|
class="customBitrate"
|
||||||
<input class="downloadBtn" type="submit" value="{t}Download{/t}" /><br/>
|
name="customBitrate" id="customBitrate" aria-describedby="customBitrateUnit"/>
|
||||||
</form>
|
<span id="customBitrateUnit">{t}kbit/s audio{/t}</span>
|
||||||
</main>
|
<br/>
|
||||||
</div>
|
<br/>
|
||||||
{include file="inc/footer.tpl"}
|
{/if}
|
||||||
|
<input class="downloadBtn" type="submit" value="{t}Download{/t}"/><br/>
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
{include file="inc/footer.tpl"}
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
<p>{t}You need a password in order to download this video.{/t}</p>
|
<p>{t}You need a password in order to download this video.{/t}</p>
|
||||||
<form action="" method="POST">
|
<form action="" method="POST">
|
||||||
<label class="sr-only" for="password">{t}Video password{/t}</label>
|
<label class="sr-only" for="password">{t}Video password{/t}</label>
|
||||||
<input class="URLinput" type="password" name="password" id="password" />
|
<input class="URLinput" type="password" name="password" id="password"/>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<input class="downloadBtn" type="submit" value="{t}Download{/t}" />
|
<input class="downloadBtn" type="submit" value="{t}Download{/t}"/>
|
||||||
</form>
|
</form>
|
||||||
</main>
|
</main>
|
||||||
{include file='inc/footer.tpl'}
|
{include file='inc/footer.tpl'}
|
||||||
|
|
|
@ -1,43 +1,44 @@
|
||||||
{include file="inc/head.tpl"}
|
{include file="inc/head.tpl"}
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<main class="main">
|
<main class="main">
|
||||||
{include file="inc/logo.tpl"}
|
{include file="inc/logo.tpl"}
|
||||||
|
|
||||||
{if isset($video->title)}
|
{if isset($video->title)}
|
||||||
{$title="<i>
|
{$title="<i>
|
||||||
<a href='{$video->webpage_url}'>
|
<a href='{$video->webpage_url}'>
|
||||||
{$video->title}</a>
|
{$video->title}</a>
|
||||||
</i>"}
|
</i>"}
|
||||||
<p>
|
<p>
|
||||||
{t params=['@title'=>$title]}Videos extracted from @title:{/t}
|
{t params=['@title'=>$title]}Videos extracted from @title:{/t}
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if $config->stream}
|
{if $config->stream}
|
||||||
<a href="{path_for name="download"}?url={$video->webpage_url}" class="downloadBtn">Download everything</a>
|
<a href="{path_for name="download"}?url={$video->webpage_url}" class="downloadBtn">Download everything</a>
|
||||||
{/if}
|
{/if}
|
||||||
{foreach $video->entries as $entry}
|
{foreach $video->entries as $entry}
|
||||||
<div class="playlist-entry">
|
<div class="playlist-entry">
|
||||||
<h3 class="playlist-entry-title"><a target="_blank" href="{strip}
|
<h3 class="playlist-entry-title"><a target="_blank" href="{strip}
|
||||||
{if isset($entry->ie_key) and $entry->ie_key == Youtube and !filter_var($entry->url, FILTER_VALIDATE_URL)}
|
{if isset($entry->ie_key) and $entry->ie_key == Youtube and !filter_var($entry->url, FILTER_VALIDATE_URL)}
|
||||||
https://www.youtube.com/watch?v=
|
https://www.youtube.com/watch?v=
|
||||||
{/if}
|
{/if}
|
||||||
{$entry->url}
|
{$entry->url}
|
||||||
{/strip}">
|
{/strip}">
|
||||||
{if !isset($entry->title)}
|
{if !isset($entry->title)}
|
||||||
{if $entry->ie_key == YoutubePlaylist}
|
{if $entry->ie_key == YoutubePlaylist}
|
||||||
Playlist
|
Playlist
|
||||||
{else}
|
{else}
|
||||||
Video
|
Video
|
||||||
{/if}
|
{/if}
|
||||||
{else}
|
{else}
|
||||||
{$entry->title}
|
{$entry->title}
|
||||||
{/if}
|
{/if}
|
||||||
</a></h3>
|
</a></h3>
|
||||||
<a target="_blank" class="downloadBtn" href="{path_for name="download"}?url={$entry->url}">{t}Download{/t}</a>
|
<a target="_blank" class="downloadBtn"
|
||||||
<a target="_blank" href="{path_for name="info"}?url={$entry->url}">{t}More options{/t}</a>
|
href="{path_for name="download"}?url={$entry->url}">{t}Download{/t}</a>
|
||||||
</div>
|
<a target="_blank" href="{path_for name="info"}?url={$entry->url}">{t}More options{/t}</a>
|
||||||
{/foreach}
|
</div>
|
||||||
|
{/foreach}
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
{include file="inc/footer.tpl"}
|
{include file="inc/footer.tpl"}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue