Merge branch 'release-3.0.0-beta5'

This commit is contained in:
Pierre Rudloff 2020-12-17 20:06:09 +01:00
commit c9aa41d206
12 changed files with 121 additions and 50 deletions

View file

@ -60,7 +60,7 @@ class FrontController extends BaseController
[
'class' => 'index',
'description' => $this->localeManager->t(
'Easily download videos from Youtube, Dailymotion, Vimeo and other websites.'
'Easily download videos from YouTube, Dailymotion, Vimeo and other websites.'
),
'supportedLocales' => $this->localeManager->getSupportedLocales(),
]
@ -103,7 +103,7 @@ class FrontController extends BaseController
'extractors' => $this->downloader->getExtractors(),
'class' => 'extractors',
'title' => $this->localeManager->t('Supported websites'),
'description' => $this->localeManager->t('List of all supported websites from which Alltube Download ' .
'description' => $this->localeManager->t('List of all supported websites from which AllTube Download ' .
'can extract video or audio files'),
]
);
@ -128,7 +128,7 @@ class FrontController extends BaseController
'class' => 'password',
'title' => $this->localeManager->t('Password prompt'),
'description' => $this->localeManager->t(
'You need a password in order to download this video with Alltube Download'
'You need a password in order to download this video with AllTube Download'
),
]
);

View file

@ -81,7 +81,7 @@ class ViewFactory
$view->registerPlugin('block', 't', [$localeManager, 'smartyTranslate']);
$view->offsetSet('canonical', self::getCanonicalUrl($request));
$view->offsetSet('locale', $container->get('locale')->getLocale());
$view->offsetSet('locale', $container->get('locale'));
$view->offsetSet('config', $container->get('config'));
$view->offsetSet('domain', $uri->withBasePath('')->getBaseUrl());

View file

@ -28,11 +28,10 @@ class ReleaseCommand extends Tasks
$result = $gitTask
->arg('describe')
->run();
$result->provideOutputdata();
$tmpDir = $this->_tmpDir();
$filename = 'alltube-' . trim((string)$result->getOutputData()) . '.zip';
$filename = 'alltube-' . trim((string)$result->getMessage()) . '.zip';
/** @var FilesystemStack $rmTask */
$rmTask = $this->taskFilesystemStack();

View file

@ -36,15 +36,15 @@
"symfony/translation": "^4.0",
"symfony/yaml": "^4.0",
"webfontkit/open-sans": "^1.0",
"ytdl-org/youtube-dl": "2020.11.01.1",
"ytdl-org/youtube-dl": "^2020.11",
"zonuexe/http-accept-language": "^0.4.1"
},
"require-dev": {
"consolidation/robo": "^2.1",
"ergebnis/composer-normalize": "^2.6",
"insite/composer-dangling-locked-deps": "^0.2.0",
"insite/composer-dangling-locked-deps": "^0.2.1",
"php-mock/php-mock-mockery": "^1.3",
"phpro/grumphp": "^1.0",
"phpro/grumphp": "^1.1",
"phpstan/phpstan": "^0.12.25",
"phpunit/phpunit": "^8.4",
"sensiolabs/security-checker": "^6.0",
@ -87,10 +87,10 @@
"type": "package",
"package": {
"name": "ytdl-org/youtube-dl",
"version": "2020.11.01.1",
"version": "2020.11.12",
"dist": {
"type": "tar",
"url": "https://files.pythonhosted.org/packages/2d/70/bd9ec7f14efab2811fc4bd39cd586ed5e292547552310ee863ff84fa7791/youtube_dl-2020.11.1.1.tar.gz"
"type": "zip",
"url": "https://github.com/ytdl-org/youtube-dl/archive/2020.11.12.zip"
}
}
}

107
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "bee6586d027b96688eff86864e22c246",
"content-hash": "6902afc1fff243b16cd33396a2603e2e",
"packages": [
{
"name": "aura/session",
@ -2426,10 +2426,10 @@
},
{
"name": "ytdl-org/youtube-dl",
"version": "2020.11.01.1",
"version": "2020.11.12",
"dist": {
"type": "tar",
"url": "https://files.pythonhosted.org/packages/2d/70/bd9ec7f14efab2811fc4bd39cd586ed5e292547552310ee863ff84fa7791/youtube_dl-2020.11.1.1.tar.gz"
"type": "zip",
"url": "https://github.com/ytdl-org/youtube-dl/archive/2020.11.12.zip"
},
"type": "library"
},
@ -3894,16 +3894,16 @@
},
{
"name": "insite/composer-dangling-locked-deps",
"version": "0.2.0",
"version": "0.2.1",
"source": {
"type": "git",
"url": "https://github.com/prudloff-insite/composer-dangling-locked-deps.git",
"reference": "373820e7680f2e98e1fe8259f04474cea5745806"
"reference": "73e0f7096f860ff7c326194463373c364923f3fc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/prudloff-insite/composer-dangling-locked-deps/zipball/373820e7680f2e98e1fe8259f04474cea5745806",
"reference": "373820e7680f2e98e1fe8259f04474cea5745806",
"url": "https://api.github.com/repos/prudloff-insite/composer-dangling-locked-deps/zipball/73e0f7096f860ff7c326194463373c364923f3fc",
"reference": "73e0f7096f860ff7c326194463373c364923f3fc",
"shasum": ""
},
"require": {
@ -3911,7 +3911,7 @@
"ocramius/package-versions": "^1.4"
},
"require-dev": {
"composer/composer": "^1.10",
"composer/composer": "^2.0",
"phpro/grumphp": "^0.21.0"
},
"type": "composer-plugin",
@ -3929,7 +3929,7 @@
"GPL-2.0-or-later"
],
"description": "Detect dangling Composer locked dependencies",
"time": "2020-10-05T10:24:52+00:00"
"time": "2020-11-16T13:45:00+00:00"
},
{
"name": "justinrainbow/json-schema",
@ -4307,6 +4307,74 @@
],
"time": "2019-08-09T12:45:53+00:00"
},
{
"name": "ondram/ci-detector",
"version": "3.5.1",
"source": {
"type": "git",
"url": "https://github.com/OndraM/ci-detector.git",
"reference": "594e61252843b68998bddd48078c5058fe9028bd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/OndraM/ci-detector/zipball/594e61252843b68998bddd48078c5058fe9028bd",
"reference": "594e61252843b68998bddd48078c5058fe9028bd",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.2",
"lmc/coding-standard": "^1.3 || ^2.0",
"php-parallel-lint/php-parallel-lint": "^1.1",
"phpstan/extension-installer": "^1.0.3",
"phpstan/phpstan": "^0.12.0",
"phpstan/phpstan-phpunit": "^0.12.1",
"phpunit/phpunit": "^7.1 || ^8.0 || ^9.0"
},
"type": "library",
"autoload": {
"psr-4": {
"OndraM\\CiDetector\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ondřej Machulda",
"email": "ondrej.machulda@gmail.com"
}
],
"description": "Detect continuous integration environment and provide unified access to properties of current build",
"keywords": [
"CircleCI",
"Codeship",
"Wercker",
"adapter",
"appveyor",
"aws",
"aws codebuild",
"bamboo",
"bitbucket",
"buddy",
"ci-info",
"codebuild",
"continuous integration",
"continuousphp",
"drone",
"github",
"gitlab",
"interface",
"jenkins",
"teamcity",
"travis"
],
"time": "2020-09-04T11:21:14+00:00"
},
{
"name": "opis/closure",
"version": "3.6.0",
@ -4790,16 +4858,16 @@
},
{
"name": "phpro/grumphp",
"version": "v1.0.0",
"version": "v1.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpro/grumphp.git",
"reference": "8d2e85beab65311350ec57f1bb6396b07b4a97b6"
"reference": "8c0b39169ea83e6c7bdd3573ba351dd0d52a42fa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpro/grumphp/zipball/8d2e85beab65311350ec57f1bb6396b07b4a97b6",
"reference": "8d2e85beab65311350ec57f1bb6396b07b4a97b6",
"url": "https://api.github.com/repos/phpro/grumphp/zipball/8c0b39169ea83e6c7bdd3573ba351dd0d52a42fa",
"reference": "8c0b39169ea83e6c7bdd3573ba351dd0d52a42fa",
"shasum": ""
},
"require": {
@ -4811,6 +4879,7 @@
"ext-json": "*",
"gitonomy/gitlib": "^1.0.3",
"monolog/monolog": "~1.16 || ^2.0",
"ondram/ci-detector": "^3.5",
"opis/closure": "^3.5",
"php": "^7.3",
"psr/container": "^1.0",
@ -4829,8 +4898,8 @@
"require-dev": {
"brianium/paratest": "^4.1",
"composer/composer": "~1.9 || ^2.0@dev",
"jakub-onderka/php-parallel-lint": "~1.0",
"nikic/php-parser": "~4.0",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpspec/phpspec": "^6.2",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.2"
@ -4840,14 +4909,13 @@
"behat/behat": "Lets GrumPHP validate your project features.",
"brianium/paratest": "Lets GrumPHP run PHPUnit in parallel.",
"codeception/codeception": "Lets GrumPHP run your project's full stack tests",
"codegyre/robo": "Lets GrumPHP run your automated PHP tasks.",
"consolidation/robo": "Lets GrumPHP run your automated PHP tasks.",
"designsecurity/progpilot": "Lets GrumPHP be sure that there are no vulnerabilities in your code.",
"doctrine/orm": "Lets GrumPHP validate your Doctrine mapping files.",
"ergebnis/composer-normalize": "Lets GrumPHP tidy and normalize your composer.json file.",
"friendsofphp/php-cs-fixer": "Lets GrumPHP automatically fix your codestyle.",
"friendsoftwig/twigcs": "Lets GrumPHP check Twig coding standard.",
"infection/infection": "Lets GrumPHP evaluate the quality your unit tests",
"jakub-onderka/php-parallel-lint": "Lets GrumPHP quickly lint your entire code base.",
"maglnet/composer-require-checker": "Lets GrumPHP analyze composer dependencies.",
"malukenho/kawaii-gherkin": "Lets GrumPHP lint your Gherkin files.",
"nette/tester": "Lets GrumPHP run your unit tests with nette tester.",
@ -4855,6 +4923,7 @@
"pestphp/pest": "Lets GrumPHP run your unit test with Pest PHP",
"phan/phan": "Lets GrumPHP unleash a static analyzer on your code",
"phing/phing": "Lets GrumPHP run your automated PHP tasks.",
"php-parallel-lint/php-parallel-lint": "Lets GrumPHP quickly lint your entire code base.",
"phpmd/phpmd": "Lets GrumPHP sort out the mess in your code",
"phpspec/phpspec": "Lets GrumPHP spec your code.",
"phpstan/phpstan": "Lets GrumPHP discover bugs in your code without running it.",
@ -4866,7 +4935,7 @@
"squizlabs/php_codesniffer": "Lets GrumPHP sniff on your code.",
"sstalle/php7cc": "Lets GrumPHP check PHP 5.3 - 5.6 code compatibility with PHP 7.",
"symfony/phpunit-bridge": "Lets GrumPHP run your unit tests with the phpunit-bridge of Symfony.",
"symplify/easycodingstandard": "Lets GrumPHP check coding standard.",
"symplify/easy-coding-standard": "Lets GrumPHP check coding standard.",
"vimeo/psalm": "Lets GrumPHP discover errors in your code without running it."
},
"bin": [
@ -4896,7 +4965,7 @@
}
],
"description": "A composer plugin that enables source code quality checks.",
"time": "2020-09-25T05:15:46+00:00"
"time": "2020-10-30T11:36:42+00:00"
},
{
"name": "phpspec/prophecy",

View file

@ -69,8 +69,8 @@ msgid "Video password"
msgstr "Mot de passe de la vidéo"
#: templates/index.tpl:8
msgid "Copy here the URL of your video (Youtube, Dailymotion, etc.)"
msgstr "Copiez ici l'URL de votre vidéo (Youtube, Dailymotion, etc.)"
msgid "Copy here the URL of your video (YouTube, Dailymotion, etc.)"
msgstr "Copiez ici l'URL de votre vidéo (YouTube, Dailymotion, etc.)"
#: templates/index.tpl:25
msgid "Audio only (MP3)"
@ -219,17 +219,17 @@ msgstr "Impossible de trouver l'URL de la vidéo."
#: controllers/FrontController.php:64
msgid ""
"Easily download videos from Youtube, Dailymotion, Vimeo and other websites."
"Easily download videos from YouTube, Dailymotion, Vimeo and other websites."
msgstr ""
"Téléchargez facilement des vidéos depuis Youtube, Dailymotion, Vimeo et "
"Téléchargez facilement des vidéos depuis YouTube, Dailymotion, Vimeo et "
"d'autres sites web."
#: controllers/FrontController.php:110
msgid ""
"List of all supported websites from which Alltube Download can extract video "
"List of all supported websites from which AllTube Download can extract video "
"or audio files"
msgstr ""
"Liste de tous les sites web depuis lesquels Alltube Download peut extraire "
"Liste de tous les sites web depuis lesquels AllTube Download peut extraire "
"des fichiers vidéo ou audio"
#: controllers/FrontController.php:136
@ -238,9 +238,9 @@ msgstr "Demande de mot de passe"
#: controllers/FrontController.php:138
msgid ""
"You need a password in order to download this video with Alltube Download"
"You need a password in order to download this video with AllTube Download"
msgstr ""
"Vous avez besoin d'un mot de passe pour télécharger cette vidéo avec Alltube "
"Vous avez besoin d'un mot de passe pour télécharger cette vidéo avec AllTube "
"Download"
#: controllers/FrontController.php:169

View file

@ -127,7 +127,7 @@ msgid "Video password"
msgstr ""
#: templates/index.tpl:8
msgid "Copy here the URL of your video (Youtube, Dailymotion, etc.)"
msgid "Copy here the URL of your video (YouTube, Dailymotion, etc.)"
msgstr ""
#: templates/index.tpl:25
@ -173,12 +173,12 @@ msgstr ""
#: classes/Controller/FrontController.php:65
msgid ""
"Easily download videos from Youtube, Dailymotion, Vimeo and other websites."
"Easily download videos from YouTube, Dailymotion, Vimeo and other websites."
msgstr ""
#: classes/Controller/FrontController.php:112
msgid ""
"List of all supported websites from which Alltube Download can extract video "
"List of all supported websites from which AllTube Download can extract video "
"or audio files"
msgstr ""
@ -188,7 +188,7 @@ msgstr ""
#: classes/Controller/FrontController.php:140
msgid ""
"You need a password in order to download this video with Alltube Download"
"You need a password in order to download this video with AllTube Download"
msgstr ""
#: classes/Controller/FrontController.php:174

View file

@ -12,7 +12,7 @@ You can usually download the video by doing *File > Save to* or *ctrl + S*.
so it has low RAM and CPU.
AllTube probably won't switch to a more expensive hosting
because this project does not earn any financial ressources
because this project does not earn any financial resources
(although [donations are welcome](https://liberapay.com/Rudloff/))
and you are encouraged to host it yourself.
@ -91,7 +91,7 @@ You need to add this to your `config.yml` file:
stream: true
```
Note that this can use a lot of ressources on your server.
Note that this can use a lot of resources on your server.
## Download M3U videos
@ -129,7 +129,7 @@ remux: true
## Convert videos to something other than MP3
By default the `convert` option only allows converting to MP3,
in order to keep things simple and ressources usage low.
in order to keep things simple and resources usage low.
However, you can use the `convertAdvanced` option like this:
```yaml

View file

@ -1,5 +1,5 @@
<!doctype html>
<html {if isset($locale)}lang="{$locale->getBcp47()}"{/if}>
<html lang="{$locale->getLocale()->getBcp47()}">
<head>
<meta charset="UTF-8"/>
<meta name=viewport content="width=device-width, initial-scale=1"/>

View file

@ -2,8 +2,8 @@
{if isset($supportedLocales) AND count($supportedLocales) > 1}
<div class="locales small-font">
<button class="localesBtn small-font" title="{t}Switch language{/t}">
{if isset($locale) AND $locale->getCountry()}
{$locale->getCountry()->getEmoji()}
{if $locale->getLocale()->getCountry()}
{$locale->getLocale()->getCountry()->getEmoji()}
{else}
{t}Set language{/t}
{/if}

View file

@ -5,7 +5,7 @@
alt="{$config->appName}" width="328" height="284"></div>
<form action="{path_for name="info"}">
<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>
<div class="champs">
<span class="URLinput_wrapper">

View file

@ -6,6 +6,7 @@
namespace Alltube\Test;
use Alltube\Locale;
use Alltube\Controller\BaseController;
use Alltube\Controller\DownloadController;
use Alltube\Controller\FrontController;
@ -34,6 +35,8 @@ abstract class ControllerTest extends ContainerTest
{
parent::setUp();
$this->container->get('locale')->setLocale(new Locale('en_US'));
$frontController = new FrontController($this->container);
$downloadController = new DownloadController($this->container);