From f1cbad030a5be959781d4f58d28d27ad24bf084c Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Mon, 4 Jan 2016 15:28:25 +0100 Subject: [PATCH 01/28] Update doc about avconv path (see #42) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ea68dbf..57bcb2a 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,5 @@ If you don't want to enable conversions, you can disable it in *config.yml*. On Debian-based systems: sudo apt-get install libavcodec-extra rtmpdump + +You also probably need to edit the *avconv* variable in *config.yml* so that it points to your ffmpeg/avconv binary (*/usr/bin/avconv* on Debian/Ubuntu). From cd0b51aac68d2f5f69102ca520b7ac26d6175562 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Mon, 4 Jan 2016 17:46:12 +0100 Subject: [PATCH 02/28] Correct avconv package name (see #42) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 57bcb2a..d424f31 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,6 @@ If you don't want to enable conversions, you can disable it in *config.yml*. On Debian-based systems: - sudo apt-get install libavcodec-extra rtmpdump + sudo apt-get install libav-tools rtmpdump You also probably need to edit the *avconv* variable in *config.yml* so that it points to your ffmpeg/avconv binary (*/usr/bin/avconv* on Debian/Ubuntu). From 2f0ca03edc2bacb56e4ab2b6654fc0fbb633088f Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Mon, 11 Jan 2016 23:57:53 +0100 Subject: [PATCH 03/28] youtube-dl update --- composer.json | 6 +++--- composer.lock | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 86888ad..40d9fbb 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "type": "project", "require": { "smarty/smarty": "~3.1", - "rg3/youtube-dl": "2015.12.29", + "rg3/youtube-dl": "2016.01.09", "slim/slim": "~2.6.2", "slim/views": "~0.1.3", "rudloff/smarty-plugin-noscheme": "~0.1.0", @@ -28,11 +28,11 @@ "type": "package", "package": { "name": "rg3/youtube-dl", - "version": "2015.12.29", + "version": "2016.01.09", "source": { "url": "https://github.com/rg3/youtube-dl.git", "type": "git", - "reference": "2015.12.29" + "reference": "7a34302e95ee66f770b1eba720847831c40121a2" } } }, diff --git a/composer.lock b/composer.lock index d47734f..516fe4c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "4ab91a81eeb4af64b1c2385f00c96135", - "content-hash": "e9a52d9ff3660f110122e1ab8b784bba", + "hash": "53dc045ca69db48893c7180e8438f057", + "content-hash": "4bf259cef086300ca805e36de4052949", "packages": [ { "name": "ffmpeg/ffmpeg", @@ -199,11 +199,11 @@ }, { "name": "rg3/youtube-dl", - "version": "2015.12.29", + "version": "2016.01.09", "source": { "type": "git", "url": "https://github.com/rg3/youtube-dl.git", - "reference": "2015.12.29" + "reference": "7a34302e95ee66f770b1eba720847831c40121a2" }, "type": "library" }, From f89a5958836d095cf93c28c755759631cd684649 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 12 Jan 2016 00:01:01 +0100 Subject: [PATCH 04/28] Don't set node version --- package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/package.json b/package.json index 80ad990..2dfa6d8 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,6 @@ "grunt-contrib-compress": "~0.14.0", "bower": "~1.7.1" }, - "engines": { - "node": "~0.10.29" - }, "repository": { "type": "git", "url": "https://github.com/Rudloff/alltube.git" From 8dfcd9b19662387e2713f05a8b557a6b0007e93f Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 12 Jan 2016 00:24:50 +0100 Subject: [PATCH 05/28] Specify full smarty version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 40d9fbb..7ec30e9 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "homepage": "http://alltubedownload.net/", "type": "project", "require": { - "smarty/smarty": "~3.1", + "smarty/smarty": "~3.1.29", "rg3/youtube-dl": "2016.01.09", "slim/slim": "~2.6.2", "slim/views": "~0.1.3", From 7f8a36fc0bd5a2d739b41448a32853d3d6bc0744 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 12 Jan 2016 00:28:45 +0100 Subject: [PATCH 06/28] ffmpeg update --- composer.json | 2 +- composer.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 7ec30e9..bec894d 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "type": "package", "package": { "name": "ffmpeg/ffmpeg", - "version": "2.8.2", + "version": "2.8.4", "dist": { "url": "http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz", "type": "xz" diff --git a/composer.lock b/composer.lock index 516fe4c..c237cb8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,12 +4,12 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "53dc045ca69db48893c7180e8438f057", - "content-hash": "4bf259cef086300ca805e36de4052949", + "hash": "62297a3aedba705d16d04e1b21e75b84", + "content-hash": "08b11c4af74e3edc8c9be95631a424f3", "packages": [ { "name": "ffmpeg/ffmpeg", - "version": "2.8.2", + "version": "2.8.4", "dist": { "type": "xz", "url": "http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz", From 4e0f61f3f38476c34600f92960c074a0aeb1ded3 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Wed, 13 Jan 2016 19:06:33 +0100 Subject: [PATCH 07/28] Escape shell commands --- classes/VideoDownload.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/classes/VideoDownload.php b/classes/VideoDownload.php index 3d18990..3944b8d 100644 --- a/classes/VideoDownload.php +++ b/classes/VideoDownload.php @@ -33,7 +33,7 @@ Class VideoDownload { $config = Config::getInstance(); exec( - $config->python.' '.$config->youtubedl.' --dump-user-agent', + escapeshellcmd($config->python).' '.escapeshellarg($config->youtubedl).' --dump-user-agent', $version ); return $version[0]; @@ -48,7 +48,7 @@ Class VideoDownload { $config = Config::getInstance(); exec( - $config->python.' '.$config->youtubedl.' --list-extractors', + escapeshellcmd($config->python).' '.escapeshellarg($config->youtubedl).' --list-extractors', $extractors ); return $extractors; @@ -65,7 +65,7 @@ Class VideoDownload static function getFilename($url, $format=null) { $config = Config::getInstance(); - $cmd=$config->python.' '.$config->youtubedl; + $cmd = escapeshellcmd($config->python).' '.escapeshellarg($config->youtubedl); if (isset($format)) { $cmd .= ' -f '.escapeshellarg($format); } @@ -88,7 +88,7 @@ Class VideoDownload static function getJSON($url, $format=null) { $config = Config::getInstance(); - $cmd=$config->python.' '.$config->youtubedl.' '.$config->params; + $cmd = escapeshellcmd($config->python.' '.escapeshellarg($config->youtubedl).' '.$config->params); if (isset($format)) { $cmd .= ' -f '.escapeshellarg($format); } @@ -114,7 +114,7 @@ Class VideoDownload static function getURL($url, $format=null) { $config = Config::getInstance(); - $cmd=$config->python.' '.$config->youtubedl.' '.$config->params; + $cmd = escapeshellcmd($config->python.' '.escapeshellarg($config->youtubedl).' '.$config->params); if (isset($format)) { $cmd .= ' -f '.escapeshellarg($format); } From 9e8599ab6a887760a0167f727160ffb5af511521 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 2 Feb 2016 00:03:19 +0100 Subject: [PATCH 08/28] Deps update --- composer.json | 6 +++--- composer.lock | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index bec894d..7991249 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "type": "project", "require": { "smarty/smarty": "~3.1.29", - "rg3/youtube-dl": "2016.01.09", + "rg3/youtube-dl": "2016.02.01", "slim/slim": "~2.6.2", "slim/views": "~0.1.3", "rudloff/smarty-plugin-noscheme": "~0.1.0", @@ -28,11 +28,11 @@ "type": "package", "package": { "name": "rg3/youtube-dl", - "version": "2016.01.09", + "version": "2016.02.01", "source": { "url": "https://github.com/rg3/youtube-dl.git", "type": "git", - "reference": "7a34302e95ee66f770b1eba720847831c40121a2" + "reference": "2016.02.01" } } }, diff --git a/composer.lock b/composer.lock index c237cb8..ee07c79 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "62297a3aedba705d16d04e1b21e75b84", - "content-hash": "08b11c4af74e3edc8c9be95631a424f3", + "hash": "4b96cfe1ccdac6c9f1e895e2782ac22b", + "content-hash": "25903adcac9a1c8b291f19f671f940bf", "packages": [ { "name": "ffmpeg/ffmpeg", @@ -199,11 +199,11 @@ }, { "name": "rg3/youtube-dl", - "version": "2016.01.09", + "version": "2016.02.01", "source": { "type": "git", "url": "https://github.com/rg3/youtube-dl.git", - "reference": "7a34302e95ee66f770b1eba720847831c40121a2" + "reference": "2016.02.01" }, "type": "library" }, @@ -450,16 +450,16 @@ "packages-dev": [ { "name": "symfony/polyfill-mbstring", - "version": "v1.0.1", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "49ff736bd5d41f45240cec77b44967d76e0c3d25" + "reference": "1289d16209491b584839022f29257ad859b8532d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/49ff736bd5d41f45240cec77b44967d76e0c3d25", - "reference": "49ff736bd5d41f45240cec77b44967d76e0c3d25", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d", + "reference": "1289d16209491b584839022f29257ad859b8532d", "shasum": "" }, "require": { @@ -471,7 +471,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.1-dev" } }, "autoload": { @@ -505,7 +505,7 @@ "portable", "shim" ], - "time": "2015-11-20 09:19:13" + "time": "2016-01-20 09:13:37" }, { "name": "symfony/var-dumper", From 2333030f785a6cdceae0a95e169a7c7d3bb1db5a Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sat, 13 Feb 2016 16:20:25 +0100 Subject: [PATCH 09/28] Lint JSON --- composer.json | 127 ++++++++++++++++++++++++-------------------------- 1 file changed, 61 insertions(+), 66 deletions(-) diff --git a/composer.json b/composer.json index 7991249..61e710b 100644 --- a/composer.json +++ b/composer.json @@ -1,68 +1,63 @@ { - "name": "rudloff/alltube", - "description": "HTML GUI for youtube-dl", - "license": "GPL-3.0", - "homepage": "http://alltubedownload.net/", - "type": "project", - "require": { - "smarty/smarty": "~3.1.29", - "rg3/youtube-dl": "2016.02.01", - "slim/slim": "~2.6.2", - "slim/views": "~0.1.3", - "rudloff/smarty-plugin-noscheme": "~0.1.0", - "symfony/yaml": "~3.0.0", - "ffmpeg/ffmpeg": "~2.8.2" - }, - "require-dev": { - "symfony/var-dumper": "~3.0.0" - }, - "extra": { - "paas": { - "nginx-includes": [ - "nginx.conf" - ] - } - }, - "repositories": [ - { - "type": "package", - "package": { - "name": "rg3/youtube-dl", - "version": "2016.02.01", - "source": { - "url": "https://github.com/rg3/youtube-dl.git", - "type": "git", - "reference": "2016.02.01" - } - } - }, - { - "type": "package", - "package": { - "name": "ffmpeg/ffmpeg", - "version": "2.8.4", - "dist": { - "url": "http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz", - "type": "xz" - }, - "bin": [ - "ffmpeg" - ] - } - } - ], - "authors": [ - { - "name": "Pierre Rudloff", - "email": "contact@rudloff.pro", - "homepage": "https://rudloff.pro/", - "role": "Developer" - } - ], - "autoload": { - "psr-4": { - "Alltube\\": "classes/", - "Alltube\\Controller\\": "controllers/" - } - } + "name": "rudloff/alltube", + "description": "HTML GUI for youtube-dl", + "license": "GPL-3.0", + "homepage": "http://alltubedownload.net/", + "type": "project", + "require": { + "smarty/smarty": "~3.1.29", + "rg3/youtube-dl": "2016.02.01", + "slim/slim": "~2.6.2", + "slim/views": "~0.1.3", + "rudloff/smarty-plugin-noscheme": "~0.1.0", + "symfony/yaml": "~3.0.0", + "ffmpeg/ffmpeg": "~2.8.2" + }, + "require-dev": { + "symfony/var-dumper": "~3.0.0" + }, + "extra": { + "paas": { + "nginx-includes": [ + "nginx.conf" + ] + } + }, + "repositories": [{ + "type": "package", + "package": { + "name": "rg3/youtube-dl", + "version": "2016.02.01", + "source": { + "url": "https://github.com/rg3/youtube-dl.git", + "type": "git", + "reference": "2016.02.01" + } + } + }, { + "type": "package", + "package": { + "name": "ffmpeg/ffmpeg", + "version": "2.8.4", + "dist": { + "url": "http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz", + "type": "xz" + }, + "bin": [ + "ffmpeg" + ] + } + }], + "authors": [{ + "name": "Pierre Rudloff", + "email": "contact@rudloff.pro", + "homepage": "https://rudloff.pro/", + "role": "Developer" + }], + "autoload": { + "psr-4": { + "Alltube\\": "classes/", + "Alltube\\Controller\\": "controllers/" + } + } } From 6b59e3906a7266724f5c95acaa8f4c497cf43683 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sat, 13 Feb 2016 16:21:23 +0100 Subject: [PATCH 10/28] Deps update --- composer.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index ee07c79..acfeed4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "4b96cfe1ccdac6c9f1e895e2782ac22b", + "hash": "83071cf6122f7fc13b648647abd09485", "content-hash": "25903adcac9a1c8b291f19f671f940bf", "packages": [ { @@ -399,16 +399,16 @@ }, { "name": "symfony/yaml", - "version": "v3.0.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "3df409958a646dad2bc5046c3fb671ee24a1a691" + "reference": "3cf0709d7fe936e97bee9e954382e449003f1d9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/3df409958a646dad2bc5046c3fb671ee24a1a691", - "reference": "3df409958a646dad2bc5046c3fb671ee24a1a691", + "url": "https://api.github.com/repos/symfony/yaml/zipball/3cf0709d7fe936e97bee9e954382e449003f1d9a", + "reference": "3cf0709d7fe936e97bee9e954382e449003f1d9a", "shasum": "" }, "require": { @@ -444,7 +444,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-12-26 13:39:53" + "time": "2016-02-02 13:44:19" } ], "packages-dev": [ @@ -509,16 +509,16 @@ }, { "name": "symfony/var-dumper", - "version": "v3.0.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "87db8700deb12ba2b65e858f656a1f885530bcb0" + "reference": "24bb94807eff00db49374c37ebf56a0304e8aef3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/87db8700deb12ba2b65e858f656a1f885530bcb0", - "reference": "87db8700deb12ba2b65e858f656a1f885530bcb0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/24bb94807eff00db49374c37ebf56a0304e8aef3", + "reference": "24bb94807eff00db49374c37ebf56a0304e8aef3", "shasum": "" }, "require": { @@ -568,7 +568,7 @@ "debug", "dump" ], - "time": "2015-12-05 11:13:14" + "time": "2016-01-07 13:38:51" } ], "aliases": [], From 99e766310d1c9e609108cffffb2d33ba0d28f92f Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sat, 13 Feb 2016 16:21:46 +0100 Subject: [PATCH 11/28] Credit Olivier Haquette --- composer.json | 5 +++++ composer.lock | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 61e710b..2145984 100644 --- a/composer.json +++ b/composer.json @@ -53,6 +53,11 @@ "email": "contact@rudloff.pro", "homepage": "https://rudloff.pro/", "role": "Developer" + }, { + "name": "Olivier Haquette", + "email": "contact@olivierhaquette.fr", + "homepage": "http://olivierhaquette.fr/", + "role": "Designer" }], "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index acfeed4..deff28e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "83071cf6122f7fc13b648647abd09485", + "hash": "85c7efc400ab64f09501a7c6737493bf", "content-hash": "25903adcac9a1c8b291f19f671f940bf", "packages": [ { From 6912690bb8aee40c595e99999b66ca938f4dbee9 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Thu, 18 Feb 2016 19:57:29 +0100 Subject: [PATCH 12/28] Redirect api.php to video --- .htaccess | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.htaccess b/.htaccess index 5591820..44af576 100644 --- a/.htaccess +++ b/.htaccess @@ -11,3 +11,5 @@ FileETag None RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L] + +Redirect /api.php /video From b13d9aea15c9e5a81b2ee31e2d82903c9b97f784 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Thu, 18 Feb 2016 20:05:27 +0100 Subject: [PATCH 13/28] Redirect extractors.php --- .htaccess | 1 + 1 file changed, 1 insertion(+) diff --git a/.htaccess b/.htaccess index 44af576..63d29af 100644 --- a/.htaccess +++ b/.htaccess @@ -13,3 +13,4 @@ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L] Redirect /api.php /video +Redirect /extractors.php /extractors From 8655db4fb7c7da0189071e548fd0d26d2717ba93 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Thu, 18 Feb 2016 20:06:30 +0100 Subject: [PATCH 14/28] Permanent redirects --- .htaccess | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.htaccess b/.htaccess index 63d29af..83d9799 100644 --- a/.htaccess +++ b/.htaccess @@ -12,5 +12,5 @@ RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L] -Redirect /api.php /video -Redirect /extractors.php /extractors +Redirect permanent /api.php /video +Redirect permanent /extractors.php /extractors From 8a5b9a179b1b4461ffc0db0e3d39577f702b69d8 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Thu, 18 Feb 2016 22:51:12 +0100 Subject: [PATCH 15/28] Remove index.php from path (fixes ##43) --- templates/head.tpl | 10 +++++----- templates/index.tpl | 2 +- templates/logo.tpl | 2 +- templates/video.tpl | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/templates/head.tpl b/templates/head.tpl index 42ffa1e..323439f 100644 --- a/templates/head.tpl +++ b/templates/head.tpl @@ -4,25 +4,25 @@ - + AllTube Download - + - + - + - + diff --git a/templates/index.tpl b/templates/index.tpl index ce0964d..b6bdf87 100644 --- a/templates/index.tpl +++ b/templates/index.tpl @@ -1,5 +1,5 @@
-