Merge branch 'release/1.2.0'

This commit is contained in:
Pierre Rudloff 2018-08-13 10:07:42 +02:00
commit b343084819
12 changed files with 361 additions and 242 deletions

View file

@ -1,4 +1,5 @@
FROM php:7.0-apache FROM php:7.0-apache
RUN apt-get update && apt-get install -my gnupg
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

View file

@ -32,6 +32,11 @@
"PYTHON": { "PYTHON": {
"description": "Path to python binary", "description": "Path to python binary",
"value": "/app/.heroku/python/bin/python" "value": "/app/.heroku/python/bin/python"
},
"STREAM": {
"description": "Enable stream mode",
"value": "false",
"required": false
} }
}, },
"website": "https://alltubedownload.net/" "website": "https://alltubedownload.net/"

View file

@ -144,7 +144,7 @@ class Config
*/ */
private function getEnv() private function getEnv()
{ {
foreach (['CONVERT', 'PYTHON', 'AUDIO_BITRATE'] as $var) { foreach (['CONVERT', 'PYTHON', 'AUDIO_BITRATE', 'STREAM'] as $var) {
$env = getenv($var); $env = getenv($var);
if ($env) { if ($env) {
$prop = lcfirst(str_replace('_', '', ucwords(strtolower($var), '_'))); $prop = lcfirst(str_replace('_', '', ucwords(strtolower($var), '_')));

View file

@ -222,24 +222,26 @@ class VideoDownload
{ {
$arguments = []; $arguments = [];
foreach ([ if ($video->protocol == 'rtmp') {
'url' => '-rtmp_tcurl', foreach ([
'webpage_url' => '-rtmp_pageurl', 'url' => '-rtmp_tcurl',
'player_url' => '-rtmp_swfverify', 'webpage_url' => '-rtmp_pageurl',
'flash_version' => '-rtmp_flashver', 'player_url' => '-rtmp_swfverify',
'play_path' => '-rtmp_playpath', 'flash_version' => '-rtmp_flashver',
'app' => '-rtmp_app', 'play_path' => '-rtmp_playpath',
] as $property => $option) { 'app' => '-rtmp_app',
if (isset($video->{$property})) { ] as $property => $option) {
$arguments[] = $option; if (isset($video->{$property})) {
$arguments[] = $video->{$property}; $arguments[] = $option;
$arguments[] = $video->{$property};
}
} }
}
if (isset($video->rtmp_conn)) { if (isset($video->rtmp_conn)) {
foreach ($video->rtmp_conn as $conn) { foreach ($video->rtmp_conn as $conn) {
$arguments[] = '-rtmp_conn'; $arguments[] = '-rtmp_conn';
$arguments[] = $conn; $arguments[] = $conn;
}
} }
} }
@ -268,27 +270,46 @@ class VideoDownload
* @param int $audioBitrate Audio bitrate of the converted file * @param int $audioBitrate Audio bitrate of the converted file
* @param string $filetype Filetype of the converted file * @param string $filetype Filetype of the converted file
* @param bool $audioOnly True to return an audio-only file * @param bool $audioOnly True to return an audio-only file
* @param string $from Start the conversion at this time
* @param string $to End the conversion at this time
* *
* @throws Exception If avconv/ffmpeg is missing * @throws Exception If avconv/ffmpeg is missing
* *
* @return Process Process * @return Process Process
*/ */
private function getAvconvProcess(stdClass $video, $audioBitrate, $filetype = 'mp3', $audioOnly = true) private function getAvconvProcess(
{ stdClass $video,
$audioBitrate,
$filetype = 'mp3',
$audioOnly = true,
$from = null,
$to = null
) {
if (!$this->checkCommand([$this->config->avconv, '-version'])) { if (!$this->checkCommand([$this->config->avconv, '-version'])) {
throw new Exception(_('Can\'t find avconv or ffmpeg at ').$this->config->avconv.'.'); throw new Exception(_('Can\'t find avconv or ffmpeg at ').$this->config->avconv.'.');
} }
if ($video->protocol == 'rtmp') { $durationRegex = '/(\d+:)?(\d+:)?(\d+)/';
$rtmpArguments = $this->getRtmpArguments($video);
} else { $afterArguments = [];
$rtmpArguments = [];
}
if ($audioOnly) { if ($audioOnly) {
$videoArguments = ['-vn']; $afterArguments[] = '-vn';
} else { }
$videoArguments = [];
if (!empty($from)) {
if (!preg_match($durationRegex, $from)) {
throw new Exception(_('Invalid start time: ').$from.'.');
}
$afterArguments[] = '-ss';
$afterArguments[] = $from;
}
if (!empty($to)) {
if (!preg_match($durationRegex, $to)) {
throw new Exception(_('Invalid end time: ').$to.'.');
}
$afterArguments[] = '-to';
$afterArguments[] = $to;
} }
$arguments = array_merge( $arguments = array_merge(
@ -296,13 +317,13 @@ class VideoDownload
$this->config->avconv, $this->config->avconv,
'-v', $this->config->avconvVerbosity, '-v', $this->config->avconvVerbosity,
], ],
$rtmpArguments, $this->getRtmpArguments($video),
[ [
'-i', $video->url, '-i', $video->url,
'-f', $filetype, '-f', $filetype,
'-b:a', $audioBitrate.'k', '-b:a', $audioBitrate.'k',
], ],
$videoArguments, $afterArguments,
[ [
'pipe:1', 'pipe:1',
] ]
@ -322,13 +343,15 @@ class VideoDownload
* @param string $url URL of page * @param string $url URL of page
* @param string $format Format to use for the video * @param string $format Format to use for the video
* @param string $password Video password * @param string $password Video password
* @param string $from Start the conversion at this time
* @param string $to End the conversion at this time
* *
* @throws Exception If your try to convert and M3U8 video * @throws Exception If your try to convert and M3U8 video
* @throws Exception If the popen stream was not created correctly * @throws Exception If the popen stream was not created correctly
* *
* @return resource popen stream * @return resource popen stream
*/ */
public function getAudioStream($url, $format, $password = null) public function getAudioStream($url, $format, $password = null, $from = null, $to = null)
{ {
$video = $this->getJSON($url, $format, $password); $video = $this->getJSON($url, $format, $password);
@ -336,13 +359,15 @@ class VideoDownload
throw new Exception(_('Conversion of playlists is not supported.')); throw new Exception(_('Conversion of playlists is not supported.'));
} }
if (in_array($video->protocol, ['m3u8', 'm3u8_native'])) { if (isset($video->protocol)) {
throw new Exception(_('Conversion of M3U8 files is not supported.')); if (in_array($video->protocol, ['m3u8', 'm3u8_native'])) {
} elseif ($video->protocol == 'http_dash_segments') { throw new Exception(_('Conversion of M3U8 files is not supported.'));
throw new Exception(_('Conversion of DASH segments is not supported.')); } elseif ($video->protocol == 'http_dash_segments') {
throw new Exception(_('Conversion of DASH segments is not supported.'));
}
} }
$avconvProc = $this->getAvconvProcess($video, $this->config->audioBitrate); $avconvProc = $this->getAvconvProcess($video, $this->config->audioBitrate, 'mp3', true, $from, $to);
$stream = popen($avconvProc->getCommandLine(), 'r'); $stream = popen($avconvProc->getCommandLine(), 'r');

View file

@ -98,7 +98,7 @@ class FrontController
$session = $session_factory->newInstance($cookies); $session = $session_factory->newInstance($cookies);
$this->sessionSegment = $session->getSegment(self::class); $this->sessionSegment = $session->getSegment(self::class);
if ($this->config->remux) { if ($this->config->remux) {
$this->defaultFormat = 'bestvideo+bestaudio'; $this->defaultFormat = 'bestvideo+bestaudio,best';
} elseif ($this->config->stream) { } elseif ($this->config->stream) {
$this->defaultFormat = 'best'; $this->defaultFormat = 'best';
} }
@ -201,7 +201,57 @@ class FrontController
} }
/** /**
* Return the converted MP3 file. * Return a converted MP3 file.
*
* @param Request $request PSR-7 request
* @param Response $response PSR-7 response
* @param array $params GET query parameters
* @param string $password Video password
*
* @return Response HTTP response
*/
private function getConvertedAudioResponse(Request $request, Response $response, array $params, $password = null)
{
if (!isset($params['from'])) {
$params['from'] = '';
}
if (!isset($params['to'])) {
$params['to'] = '';
}
$response = $response->withHeader(
'Content-Disposition',
'attachment; filename="'.
$this->download->getAudioFilename($params['url'], 'bestaudio/best', $password).'"'
);
$response = $response->withHeader('Content-Type', 'audio/mpeg');
if ($request->isGet() || $request->isPost()) {
try {
$process = $this->download->getAudioStream(
$params['url'],
'bestaudio/best',
$password,
$params['from'],
$params['to']
);
} catch (Exception $e) {
$process = $this->download->getAudioStream(
$params['url'],
$this->defaultFormat,
$password,
$params['from'],
$params['to']
);
}
$response = $response->withBody(new Stream($process));
}
return $response;
}
/**
* Return the MP3 file.
* *
* @param Request $request PSR-7 request * @param Request $request PSR-7 request
* @param Response $response PSR-7 response * @param Response $response PSR-7 response
@ -213,6 +263,10 @@ class FrontController
private function getAudioResponse(Request $request, Response $response, array $params, $password = null) private function getAudioResponse(Request $request, Response $response, array $params, $password = null)
{ {
try { try {
if (isset($params['from']) || isset($params['to'])) {
throw new Exception('Force convert when we need to seek.');
}
if ($this->config->stream) { if ($this->config->stream) {
return $this->getStream($params['url'], 'mp3', $response, $request, $password); return $this->getStream($params['url'], 'mp3', $response, $request, $password);
} else { } else {
@ -223,23 +277,7 @@ class FrontController
} catch (PasswordException $e) { } catch (PasswordException $e) {
return $this->password($request, $response); return $this->password($request, $response);
} catch (Exception $e) { } catch (Exception $e) {
$response = $response->withHeader( return $this->getConvertedAudioResponse($request, $response, $params, $password);
'Content-Disposition',
'attachment; filename="'.
$this->download->getAudioFilename($params['url'], 'bestaudio/best', $password).'"'
);
$response = $response->withHeader('Content-Type', 'audio/mpeg');
if ($request->isGet() || $request->isPost()) {
try {
$process = $this->download->getAudioStream($params['url'], 'bestaudio/best', $password);
} catch (Exception $e) {
$process = $this->download->getAudioStream($params['url'], $this->defaultFormat, $password);
}
$response = $response->withBody(new Stream($process));
}
return $response;
} }
} }
@ -305,7 +343,12 @@ class FrontController
public function video(Request $request, Response $response) public function video(Request $request, Response $response)
{ {
$params = $request->getQueryParams(); $params = $request->getQueryParams();
if (isset($params['url'])) {
if (!isset($params['url']) && isset($params['v'])) {
$params['url'] = $params['v'];
}
if (isset($params['url']) && !empty($params['url'])) {
$password = $request->getParam('password'); $password = $request->getParam('password');
if (isset($password)) { if (isset($password)) {
$this->sessionSegment->setFlash($params['url'], $password); $this->sessionSegment->setFlash($params['url'], $password);

View file

@ -260,11 +260,10 @@ footer a:hover {
width:622px; width:622px;
} }
.mp3 p { .mp3-inner {
padding:3px; padding:3px;
} }
.audio:not(:checked), .audio:not(:checked),
.audio:checked { .audio:checked {
left: -9999px; left: -9999px;
@ -273,7 +272,7 @@ footer a:hover {
.audio:not(:checked) + label, .audio:not(:checked) + label,
.audio:checked + label { .audio:checked + label {
cursor: pointer; cursor: pointer;
line-height:22px; line-height:20px;
padding-left: 82px; padding-left: 82px;
position: relative; position: relative;
} }
@ -373,7 +372,15 @@ footer a:hover {
width:73px; width:73px;
} }
.seekOptions {
display: none;
margin-top: 15px;
text-align: center;
}
.audio:checked ~ .seekOptions {
display: block;
}
/* Playlists */ /* Playlists */

View file

@ -1,19 +1,11 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: AllTube Download\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: Pierre Rudloff <contact@rudloff.pro>\n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.11\n" "X-Generator: POEditor.com\n"
"Project-Id-Version: AllTube Download\n"
#: templates/error.tpl:5 "Language: fr\n"
msgid "An error occurred"
msgstr "Une erreur est survenue"
#: templates/error.tpl:6 #: templates/error.tpl:6
msgid "Please check the URL of your video." msgid "Please check the URL of your video."
@ -27,9 +19,9 @@ msgstr "Vidéos extraites depuis"
msgid ":" msgid ":"
msgstr " :" msgstr " :"
#: templates/playlist.tpl:26 templates/password.tpl:10 templates/video.tpl:96 #: templates/playlist.tpl:26 templates/video.tpl:96 templates/video.tpl:99
#: templates/video.tpl:99 templates/index.tpl:19 #: templates/password.tpl:10 templates/index.tpl:19
#: controllers/FrontController.php:275 #: controllers/FrontController.php:315
msgid "Download" msgid "Download"
msgstr "Télécharger" msgstr "Télécharger"
@ -49,7 +41,7 @@ msgstr "L'accès à cette vidéo nécessite un mot de passe."
msgid "Video password" msgid "Video password"
msgstr "Mot de passe de la vidéo" msgstr "Mot de passe de la vidéo"
#: templates/extractors.tpl:4 controllers/FrontController.php:165 #: templates/extractors.tpl:4 controllers/FrontController.php:167
msgid "Supported websites" msgid "Supported websites"
msgstr "Sites web supportés" msgstr "Sites web supportés"
@ -81,18 +73,6 @@ msgstr "Pire qualité"
msgid "Detailed formats" msgid "Detailed formats"
msgstr "Formats détaillés" msgstr "Formats détaillés"
#: templates/video.tpl:85
msgid "Convert into a custom format:"
msgstr "Convertir dans un format personnalisé :"
#: templates/video.tpl:91
msgid "with"
msgstr "avec de l'audio à"
#: templates/video.tpl:93
msgid "kbit/s audio"
msgstr "kbit/s"
#: templates/inc/footer.tpl:4 #: templates/inc/footer.tpl:4
msgid "Code by" msgid "Code by"
msgstr "Développé par" msgstr "Développé par"
@ -109,18 +89,6 @@ msgstr "Obtenir le code"
msgid "Based on" msgid "Based on"
msgstr "Basé sur" msgstr "Basé sur"
#: templates/inc/footer.tpl:14
msgid "Donate using Liberapay"
msgstr "Faire un don avec Liberapay"
#: templates/inc/footer.tpl:14
msgid "Donate"
msgstr "Faire un don"
#: templates/inc/header.tpl:4
msgid "Switch language"
msgstr "Changer de langue"
#: templates/inc/header.tpl:21 #: templates/inc/header.tpl:21
msgid "Share on Twitter" msgid "Share on Twitter"
msgstr "Partager sur Twitter" msgstr "Partager sur Twitter"
@ -133,108 +101,137 @@ msgstr "Partager sur Facebook"
msgid "Copy here the URL of your video (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.)" msgstr "Copiez ici l'URL de votre vidéo (Youtube, Dailymotion, etc.)"
#: templates/index.tpl:24 #: templates/index.tpl:25
msgid "Audio only (MP3)" msgid "Audio only (MP3)"
msgstr "Audio uniquement (MP3)" msgstr "Audio uniquement (MP3)"
#: templates/index.tpl:29 #: templates/index.tpl:36
msgid "See all supported websites" msgid "See all supported websites"
msgstr "Voir tous les sites supportés" msgstr "Voir tous les sites supportés"
#: templates/index.tpl:31 #: templates/index.tpl:38
msgid "Drag this to your bookmarks bar:" msgid "Drag this to your bookmarks bar:"
msgstr "Glissez ce lien dans votre barre de favoris :" msgstr "Glissez ce lien dans votre barre de favoris :"
#: templates/index.tpl:32 #: templates/index.tpl:39
msgid "Bookmarklet" msgid "Bookmarklet"
msgstr "Bookmarklet" msgstr "Bookmarklet"
#: templates/inc/header.tpl:4
msgid "Switch language"
msgstr "Changer de langue"
#: templates/error.tpl:5
msgid "An error occurred"
msgstr "Une erreur est survenue"
#: templates/video.tpl:85
msgid "Convert into a custom format:"
msgstr "Convertir dans un format personnalisé :"
#: templates/video.tpl:93
msgid "kbit/s audio"
msgstr "kbit/s"
#: templates/video.tpl:91
msgid "with"
msgstr "avec de l'audio à"
#: classes/VideoDownload.php:117 #: classes/VideoDownload.php:117
msgid "Wrong password" msgid "Wrong password"
msgstr "Mauvais mot de passe" msgstr "Mauvais mot de passe"
#: classes/VideoDownload.php:364 classes/VideoDownload.php:526
msgid "Conversion of M3U8 files is not supported."
msgstr "La conversion des fichiers M3U8 n'est pas possible."
#: classes/VideoDownload.php:375 classes/VideoDownload.php:412
#: classes/VideoDownload.php:445 classes/VideoDownload.php:478
#: classes/VideoDownload.php:534
msgid "Could not open popen stream."
msgstr "Impossible d'ouvrir le flux popen."
#: classes/VideoDownload.php:502
msgid "Could not open fopen stream."
msgstr "Impossible d'ouvrir le flux fopen."
#: controllers/FrontController.php:124
msgid "Easily download videos from Youtube, Dailymotion, Vimeo and other websites."
msgstr "Téléchargez facilement des vidéos depuis Youtube, Dailymotion, Vimeo et d'autres sites web."
#: controllers/FrontController.php:168
msgid "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 des fichiers vidéo ou audio"
#: controllers/FrontController.php:193
msgid "Password prompt"
msgstr "Demande de mot de passe"
#: controllers/FrontController.php:194
msgid "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 Download"
#: controllers/FrontController.php:311
msgid "Video download"
msgstr "Téléchargement d'une vidéo"
#: controllers/FrontController.php:312
msgid "Download video from "
msgstr "Téléchargement d'une vidéo depuis "
#: controllers/FrontController.php:315
msgid "from"
msgstr "depuis"
#: controllers/FrontController.php:378
msgid "Error"
msgstr "Erreur"
#: controllers/FrontController.php:450
msgid "You need to enable remux mode to merge two formats."
msgstr "Vous devez activer le mode remux pour fusionner deux formats."
#: controllers/FrontController.php:525
msgid "Can't find URL of video."
msgstr "Impossible de trouver l'URL de la vidéo."
#: classes/VideoDownload.php:289 classes/VideoDownload.php:394
msgid "Can't find avconv or ffmpeg at "
msgstr "Impossible de trouver avconv ou ffmpeg à "
#: templates/inc/footer.tpl:14
msgid "Donate"
msgstr "Faire un don"
#: classes/VideoDownload.php:158 #: classes/VideoDownload.php:158
msgid "youtube-dl returned an empty URL." msgid "youtube-dl returned an empty URL."
msgstr "youtube-dl a retourné une URL vide." msgstr "youtube-dl a retourné une URL vide."
#: classes/VideoDownload.php:279 classes/VideoDownload.php:369 #: classes/VideoDownload.php:359
msgid "Can't find avconv or ffmpeg at "
msgstr "Impossible de trouver avconv ou ffmpeg à "
#: classes/VideoDownload.php:336
msgid "Conversion of playlists is not supported." msgid "Conversion of playlists is not supported."
msgstr "Impossible de convertir une playlist." msgstr "Impossible de convertir une playlist."
#: classes/VideoDownload.php:340 classes/VideoDownload.php:501 #: classes/VideoDownload.php:366
msgid "Conversion of M3U8 files is not supported."
msgstr "La conversion des fichiers M3U8 n'est pas possible."
#: classes/VideoDownload.php:342
msgid "Conversion of DASH segments is not supported." msgid "Conversion of DASH segments is not supported."
msgstr "Impossible de convertir des segments DASH." msgstr "Impossible de convertir des segments DASH."
#: classes/VideoDownload.php:350 classes/VideoDownload.php:387 #: templates/inc/footer.tpl:14
#: classes/VideoDownload.php:420 classes/VideoDownload.php:453 msgid "Donate using Liberapay"
#: classes/VideoDownload.php:509 msgstr "Faire un don avec Liberapay"
msgid "Could not open popen stream."
msgstr "Impossible d'ouvrir le flux popen."
#: classes/VideoDownload.php:477 #: classes/VideoDownload.php:302
msgid "Could not open fopen stream." msgid "Invalid start time: "
msgstr "Impossible d'ouvrir le flux fopen." msgstr "Horodatage de début non-valide :␣"
#: controllers/FrontController.php:122 #: classes/VideoDownload.php:309
msgid "" msgid "Invalid end time: "
"Easily download videos from Youtube, Dailymotion, Vimeo and other websites." msgstr "Horodatage de fin non-valide :␣"
msgstr ""
"Téléchargez facilement des vidéos depuis Youtube, Dailymotion, Vimeo et "
"d'autres sites web."
#: controllers/FrontController.php:166 #: templates/index.tpl:28
msgid "" msgid "From"
"List of all supported websites from which Alltube Download can extract video " msgstr "À partir de"
"or audio files"
msgstr ""
"Liste de tous les sites web depuis lesquels Alltube Download peut extraire "
"des fichiers vidéo ou audio"
#: controllers/FrontController.php:191 #: templates/index.tpl:29
msgid "Password prompt" msgid "to"
msgstr "Demande de mot de passe" msgstr "jusqu'à"
#: controllers/FrontController.php:192
msgid ""
"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 "
"Download"
#: controllers/FrontController.php:271
msgid "Video download"
msgstr "Téléchargement d'une vidéo"
#: controllers/FrontController.php:272
msgid "Download video from "
msgstr "Téléchargement d'une vidéo depuis "
#: controllers/FrontController.php:275
msgid "from"
msgstr "depuis"
#: controllers/FrontController.php:338
msgid "Error"
msgstr "Erreur"
#: controllers/FrontController.php:410
msgid "You need to enable remux mode to merge two formats."
msgstr "Vous devez activer le mode remux pour fusionner deux formats."
#: controllers/FrontController.php:485
msgid "Can't find URL of video."
msgstr "Impossible de trouver l'URL de la vidéo."
#~ msgid "AllTube Download on Facebook"
#~ msgstr "AllTube Download sur Facebook"
#~ msgid "Like us on Facebook"
#~ msgstr "Suivez-nous sur Facebook"

View file

@ -1,12 +1,40 @@
msgid "" msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8\n" msgstr "Content-Type: text/plain; charset=UTF-8\n"
#: templates/error.tpl:5 #: templates/inc/footer.tpl:4
msgid "An error occurred" msgid "Code by"
msgstr "" msgstr ""
#: templates/error.tpl:6 #: templates/inc/footer.tpl:6
msgid "Please check the URL of your video." msgid "Design by"
msgstr ""
#: templates/inc/footer.tpl:10
msgid "Get the code"
msgstr ""
#: templates/inc/footer.tpl:12
msgid "Based on"
msgstr ""
#: templates/inc/footer.tpl:14
msgid "Donate using Liberapay"
msgstr ""
#: templates/inc/footer.tpl:14
msgid "Donate"
msgstr ""
#: templates/inc/header.tpl:4
msgid "Switch language"
msgstr ""
#: templates/inc/header.tpl:21
msgid "Share on Twitter"
msgstr ""
#: templates/inc/header.tpl:23
msgid "Share on Facebook"
msgstr "" msgstr ""
#: templates/playlist.tpl:5 #: templates/playlist.tpl:5
@ -17,9 +45,9 @@ msgstr ""
msgid ":" msgid ":"
msgstr "" msgstr ""
#: templates/playlist.tpl:26 templates/password.tpl:10 templates/video.tpl:96 #: templates/playlist.tpl:26 templates/video.tpl:96 templates/video.tpl:99
#: templates/video.tpl:99 templates/index.tpl:19 #: templates/password.tpl:10 templates/index.tpl:19
#: controllers/FrontController.php:275 #: controllers/FrontController.php:315
msgid "Download" msgid "Download"
msgstr "" msgstr ""
@ -27,19 +55,7 @@ msgstr ""
msgid "More options" msgid "More options"
msgstr "" msgstr ""
#: templates/password.tpl:5 #: templates/extractors.tpl:4 controllers/FrontController.php:167
msgid "This video is protected"
msgstr ""
#: templates/password.tpl:6
msgid "You need a password in order to download this video."
msgstr ""
#: templates/password.tpl:8
msgid "Video password"
msgstr ""
#: templates/extractors.tpl:4 controllers/FrontController.php:165
msgid "Supported websites" msgid "Supported websites"
msgstr "" msgstr ""
@ -83,59 +99,51 @@ msgstr ""
msgid "kbit/s audio" msgid "kbit/s audio"
msgstr "" msgstr ""
#: templates/inc/footer.tpl:4 #: templates/error.tpl:5
msgid "Code by" msgid "An error occurred"
msgstr "" msgstr ""
#: templates/inc/footer.tpl:6 #: templates/error.tpl:6
msgid "Design by" msgid "Please check the URL of your video."
msgstr "" msgstr ""
#: templates/inc/footer.tpl:10 #: templates/password.tpl:5
msgid "Get the code" msgid "This video is protected"
msgstr "" msgstr ""
#: templates/inc/footer.tpl:12 #: templates/password.tpl:6
msgid "Based on" msgid "You need a password in order to download this video."
msgstr "" msgstr ""
#: templates/inc/footer.tpl:14 #: templates/password.tpl:8
msgid "Donate using Liberapay" msgid "Video password"
msgstr ""
#: templates/inc/footer.tpl:14
msgid "Donate"
msgstr ""
#: templates/inc/header.tpl:4
msgid "Switch language"
msgstr ""
#: templates/inc/header.tpl:21
msgid "Share on Twitter"
msgstr ""
#: templates/inc/header.tpl:23
msgid "Share on Facebook"
msgstr "" msgstr ""
#: templates/index.tpl:8 #: 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 "" msgstr ""
#: templates/index.tpl:24 #: templates/index.tpl:25
msgid "Audio only (MP3)" msgid "Audio only (MP3)"
msgstr "" msgstr ""
#: templates/index.tpl:28
msgid "From"
msgstr ""
#: templates/index.tpl:29 #: templates/index.tpl:29
msgid "to"
msgstr ""
#: templates/index.tpl:36
msgid "See all supported websites" msgid "See all supported websites"
msgstr "" msgstr ""
#: templates/index.tpl:31 #: templates/index.tpl:38
msgid "Drag this to your bookmarks bar:" msgid "Drag this to your bookmarks bar:"
msgstr "" msgstr ""
#: templates/index.tpl:32 #: templates/index.tpl:39
msgid "Bookmarklet" msgid "Bookmarklet"
msgstr "" msgstr ""
@ -147,72 +155,80 @@ msgstr ""
msgid "youtube-dl returned an empty URL." msgid "youtube-dl returned an empty URL."
msgstr "" msgstr ""
#: classes/VideoDownload.php:279 classes/VideoDownload.php:369 #: classes/VideoDownload.php:289 classes/VideoDownload.php:394
msgid "Can't find avconv or ffmpeg at " msgid "Can't find avconv or ffmpeg at "
msgstr "" msgstr ""
#: classes/VideoDownload.php:336 #: classes/VideoDownload.php:302
msgid "Invalid start time: "
msgstr ""
#: classes/VideoDownload.php:309
msgid "Invalid end time: "
msgstr ""
#: classes/VideoDownload.php:359
msgid "Conversion of playlists is not supported." msgid "Conversion of playlists is not supported."
msgstr "" msgstr ""
#: classes/VideoDownload.php:340 classes/VideoDownload.php:501 #: classes/VideoDownload.php:364 classes/VideoDownload.php:526
msgid "Conversion of M3U8 files is not supported." msgid "Conversion of M3U8 files is not supported."
msgstr "" msgstr ""
#: classes/VideoDownload.php:342 #: classes/VideoDownload.php:366
msgid "Conversion of DASH segments is not supported." msgid "Conversion of DASH segments is not supported."
msgstr "" msgstr ""
#: classes/VideoDownload.php:350 classes/VideoDownload.php:387 #: classes/VideoDownload.php:375 classes/VideoDownload.php:412
#: classes/VideoDownload.php:420 classes/VideoDownload.php:453 #: classes/VideoDownload.php:445 classes/VideoDownload.php:478
#: classes/VideoDownload.php:509 #: classes/VideoDownload.php:534
msgid "Could not open popen stream." msgid "Could not open popen stream."
msgstr "" msgstr ""
#: classes/VideoDownload.php:477 #: classes/VideoDownload.php:502
msgid "Could not open fopen stream." msgid "Could not open fopen stream."
msgstr "" msgstr ""
#: controllers/FrontController.php:122 #: controllers/FrontController.php:124
msgid "" msgid ""
"Easily download videos from Youtube, Dailymotion, Vimeo and other websites." "Easily download videos from Youtube, Dailymotion, Vimeo and other websites."
msgstr "" msgstr ""
#: controllers/FrontController.php:166 #: controllers/FrontController.php:168
msgid "" 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" "or audio files"
msgstr "" msgstr ""
#: controllers/FrontController.php:191 #: controllers/FrontController.php:193
msgid "Password prompt" msgid "Password prompt"
msgstr "" msgstr ""
#: controllers/FrontController.php:192 #: controllers/FrontController.php:194
msgid "" 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 "" msgstr ""
#: controllers/FrontController.php:271 #: controllers/FrontController.php:311
msgid "Video download" msgid "Video download"
msgstr "" msgstr ""
#: controllers/FrontController.php:272 #: controllers/FrontController.php:312
msgid "Download video from " msgid "Download video from "
msgstr "" msgstr ""
#: controllers/FrontController.php:275 #: controllers/FrontController.php:315
msgid "from" msgid "from"
msgstr "" msgstr ""
#: controllers/FrontController.php:338 #: controllers/FrontController.php:378
msgid "Error" msgid "Error"
msgstr "" msgstr ""
#: controllers/FrontController.php:410 #: controllers/FrontController.php:450
msgid "You need to enable remux mode to merge two formats." msgid "You need to enable remux mode to merge two formats."
msgstr "" msgstr ""
#: controllers/FrontController.php:485 #: controllers/FrontController.php:525
msgid "Can't find URL of video." msgid "Can't find URL of video."
msgstr "" msgstr ""

View file

@ -47,6 +47,10 @@ $app->any(
'/video', '/video',
[$controller, 'video'] [$controller, 'video']
)->setName('video'); )->setName('video');
$app->any(
'/watch',
[$controller, 'video']
);
$app->get( $app->get(
'/redirect', '/redirect',
[$controller, 'redirect'] [$controller, 'redirect']

View file

@ -1,7 +1,7 @@
{ {
"name": "alltube", "name": "alltube",
"description": "HTML GUI for youtube-dl", "description": "HTML GUI for youtube-dl",
"version": "1.1.3", "version": "1.2.0",
"author": "Pierre Rudloff", "author": "Pierre Rudloff",
"bugs": "https://github.com/Rudloff/alltube/issues", "bugs": "https://github.com/Rudloff/alltube/issues",
"dependencies": { "dependencies": {

View file

@ -8,6 +8,20 @@ Most recent browsers automatically play a video
if it is a format they know how to play. if it is a format they know how to play.
You can ususally download the video by doing *File > Save to* or *ctrl + S*. You can ususally download the video by doing *File > Save to* or *ctrl + S*.
## Why is [alltubedownload.net](https://alltubedownload.net) so slow?
[alltubedownload.net](https://alltubedownload.net) is hosted on a free [Heroku server](https://www.heroku.com/pricing)
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
(although [donations are welcome](https://liberapay.com/Rudloff/))
and you are encouraged to host it yourself.
## alltubedownload.net often says "An error occurred in the application…"
See above.
## How do I change config parameters? ## How do I change config parameters?
You need to create a YAML file called `config.yml` in the `config/` folder. You need to create a YAML file called `config.yml` in the `config/` folder.

View file

@ -19,9 +19,16 @@
<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">
<p><input type="checkbox" id="audio" class="audio" name="audio"> <div class="mp3-inner">
<label for="audio"><span class="ui"></span> <input type="checkbox" id="audio" class="audio" name="audio">
{t}Audio only (MP3){/t}</label></p> <label for="audio"><span class="ui"></span>
{t}Audio only (MP3){/t}
</label>
<div class="seekOptions">
{t}From{/t} <input type="text" placeholder="00:00:00" value="" name="from" />
{t}to{/t} <input type="text" placeholder="00:22:30" value="" name="to" />
</div>
</div>
</div> </div>
{/if} {/if}
</div> </div>