Download youtube-dl with composer (fixes #35)
This commit is contained in:
parent
347ec92f35
commit
05b144cb7b
5 changed files with 89 additions and 6 deletions
|
@ -5,7 +5,9 @@
|
||||||
"homepage": "http://alltubedownload.net/",
|
"homepage": "http://alltubedownload.net/",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"smarty/smarty": "~3.1"
|
"smarty/smarty": "~3.1",
|
||||||
|
"rg3/youtube-dl": "2015.10.24",
|
||||||
|
"symfony/var-dumper": "~2.7.6"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"paas": {
|
"paas": {
|
||||||
|
@ -14,6 +16,20 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "package",
|
||||||
|
"package": {
|
||||||
|
"name": "rg3/youtube-dl",
|
||||||
|
"version": "2015.10.24",
|
||||||
|
"source": {
|
||||||
|
"url": "https://github.com/rg3/youtube-dl.git",
|
||||||
|
"type": "git",
|
||||||
|
"reference": "2015.10.24"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Pierre Rudloff",
|
"name": "Pierre Rudloff",
|
||||||
|
|
71
composer.lock
generated
71
composer.lock
generated
|
@ -1,11 +1,22 @@
|
||||||
{
|
{
|
||||||
"_readme": [
|
"_readme": [
|
||||||
"This file locks the dependencies of your project to a known state",
|
"This file locks the dependencies of your project to a known state",
|
||||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"hash": "1d95265fc34ff6df149985554a8ba0d6",
|
"hash": "0f26a6f71839164cb9ca3b6905832232",
|
||||||
|
"content-hash": "34cc3c83cf4cbf26da3aa7c8f15a4b50",
|
||||||
"packages": [
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "rg3/youtube-dl",
|
||||||
|
"version": "2015.10.24",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/rg3/youtube-dl.git",
|
||||||
|
"reference": "2015.10.24"
|
||||||
|
},
|
||||||
|
"type": "library"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "smarty/smarty",
|
"name": "smarty/smarty",
|
||||||
"version": "v3.1.27",
|
"version": "v3.1.27",
|
||||||
|
@ -60,6 +71,62 @@
|
||||||
"templating"
|
"templating"
|
||||||
],
|
],
|
||||||
"time": "2015-06-18 00:55:59"
|
"time": "2015-06-18 00:55:59"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/var-dumper",
|
||||||
|
"version": "v2.7.6",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/var-dumper.git",
|
||||||
|
"reference": "eb033050050916b6bfa51be71009ef67b16046c9"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/eb033050050916b6bfa51be71009ef67b16046c9",
|
||||||
|
"reference": "eb033050050916b6bfa51be71009ef67b16046c9",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.9"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-symfony_debug": ""
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.7-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"Resources/functions/dump.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\VarDumper\\": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony mechanism for exploring and dumping PHP variables",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"debug",
|
||||||
|
"dump"
|
||||||
|
],
|
||||||
|
"time": "2015-10-25 17:17:38"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
* @license GNU General Public License http://www.gnu.org/licenses/gpl.html
|
* @license GNU General Public License http://www.gnu.org/licenses/gpl.html
|
||||||
* @link http://rudloff.pro
|
* @link http://rudloff.pro
|
||||||
* */
|
* */
|
||||||
define('YOUTUBE_DL', './youtube-dl');
|
define('YOUTUBE_DL', __DIR__.'/vendor/rg3/youtube-dl/youtube_dl/__main__.py');
|
||||||
define('PYTHON', '/usr/bin/python');
|
define('PYTHON', '/usr/bin/python');
|
||||||
define('PARAMS', '--no-playlist --no-warnings -f best');
|
define('PARAMS', '--no-playlist --no-warnings -f best');
|
||||||
if (getenv('CONVERT')) {
|
if (getenv('CONVERT')) {
|
||||||
|
|
|
@ -64,7 +64,7 @@ Class VideoDownload
|
||||||
* */
|
* */
|
||||||
static function getFilename($url, $format=null)
|
static function getFilename($url, $format=null)
|
||||||
{
|
{
|
||||||
$cmd=PYTHON.' youtube-dl';
|
$cmd=PYTHON.' '.YOUTUBE_DL;
|
||||||
if (isset($format)) {
|
if (isset($format)) {
|
||||||
$cmd .= ' -f '.escapeshellarg($format);
|
$cmd .= ' -f '.escapeshellarg($format);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,6 @@
|
||||||
"url": "https://github.com/Rudloff/alltube.git"
|
"url": "https://github.com/Rudloff/alltube.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "./node_modules/grunt-cli/bin/grunt; curl -L https://yt-dl.org/downloads/latest/youtube-dl -o youtube-dl; curl http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz -o ffmpeg.tar.xz; tar xJf ffmpeg.tar.xz -C ffmpeg --strip-components=1"
|
"postinstall": "./node_modules/grunt-cli/bin/grunt; curl http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz -o ffmpeg.tar.xz; tar xJf ffmpeg.tar.xz -C ffmpeg --strip-components=1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue