Merge branch 'develop' of github.com:Rudloff/alltube into develop
This commit is contained in:
commit
6d45e89ecf
19 changed files with 296 additions and 170 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -6,7 +6,7 @@ vendor/
|
||||||
templates_c/
|
templates_c/
|
||||||
ffmpeg.tar.xz
|
ffmpeg.tar.xz
|
||||||
ffmpeg-*/
|
ffmpeg-*/
|
||||||
alltube-release.zip
|
alltube-*.zip
|
||||||
coverage/
|
coverage/
|
||||||
bower_components/
|
bower_components/
|
||||||
config.yml
|
config.yml
|
||||||
|
|
|
@ -14,6 +14,10 @@ Addtype font/truetype .ttf
|
||||||
FileETag None
|
FileETag None
|
||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^alltube\.herokuapp\.com$ [NC]
|
||||||
|
RewriteRule ^(.*)$ https://www.alltubedownload.net/$1 [R=301,L]
|
||||||
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteRule ^ index.php [QSA,L]
|
RewriteRule ^ index.php [QSA,L]
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM php:apache
|
FROM php:5.6-apache
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y libicu-dev xz-utils git zlib1g-dev python npm nodejs-legacy
|
RUN apt-get install -y libicu-dev xz-utils git zlib1g-dev python npm nodejs-legacy
|
||||||
RUN docker-php-ext-install mbstring
|
RUN docker-php-ext-install mbstring
|
||||||
|
|
10
Gruntfile.js
10
Gruntfile.js
|
@ -3,6 +3,11 @@ module.exports = function (grunt) {
|
||||||
'use strict';
|
'use strict';
|
||||||
grunt.initConfig(
|
grunt.initConfig(
|
||||||
{
|
{
|
||||||
|
githash: {
|
||||||
|
main: {
|
||||||
|
options: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
uglify: {
|
uglify: {
|
||||||
combine: {
|
combine: {
|
||||||
files: {
|
files: {
|
||||||
|
@ -52,7 +57,7 @@ module.exports = function (grunt) {
|
||||||
compress: {
|
compress: {
|
||||||
release: {
|
release: {
|
||||||
options: {
|
options: {
|
||||||
archive: 'alltube-release.zip'
|
archive: 'alltube-<%= githash.main.tag %>.zip'
|
||||||
},
|
},
|
||||||
src: ['*.php', '!config.yml', 'dist/**', 'fonts/**', '.htaccess', 'img/**', 'js/**', 'LICENSE', 'README.md', 'robots.txt', 'sitemap.xml', 'templates/**', 'templates_c/', 'vendor/**', 'classes/**', 'controllers/**', 'bower_components/**', '!vendor/ffmpeg/**', '!vendor/bin/ffmpeg']
|
src: ['*.php', '!config.yml', 'dist/**', 'fonts/**', '.htaccess', 'img/**', 'js/**', 'LICENSE', 'README.md', 'robots.txt', 'sitemap.xml', 'templates/**', 'templates_c/', 'vendor/**', 'classes/**', 'controllers/**', 'bower_components/**', '!vendor/ffmpeg/**', '!vendor/bin/ffmpeg']
|
||||||
}
|
}
|
||||||
|
@ -60,6 +65,7 @@ module.exports = function (grunt) {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
grunt.loadNpmTasks('grunt-githash');
|
||||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||||
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
|
@ -70,5 +76,5 @@ module.exports = function (grunt) {
|
||||||
grunt.registerTask('default', ['uglify', 'cssmin']);
|
grunt.registerTask('default', ['uglify', 'cssmin']);
|
||||||
grunt.registerTask('lint', ['phpcs']);
|
grunt.registerTask('lint', ['phpcs']);
|
||||||
grunt.registerTask('test', ['phpunit']);
|
grunt.registerTask('test', ['phpunit']);
|
||||||
grunt.registerTask('release', ['default', 'compress']);
|
grunt.registerTask('release', ['default', 'githash', 'compress']);
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,10 +31,11 @@ class Config
|
||||||
|
|
||||||
public $youtubedl = 'vendor/rg3/youtube-dl/youtube_dl/__main__.py';
|
public $youtubedl = 'vendor/rg3/youtube-dl/youtube_dl/__main__.py';
|
||||||
public $python = '/usr/bin/python';
|
public $python = '/usr/bin/python';
|
||||||
public $params = array('--no-playlist', '--no-warnings', '-f best');
|
public $params = array('--no-playlist', '--no-warnings', '-f best[protocol^=http]', '--playlist-end', 1);
|
||||||
public $convert = false;
|
public $convert = false;
|
||||||
public $avconv = 'vendor/bin/ffmpeg';
|
public $avconv = 'vendor/bin/ffmpeg';
|
||||||
public $curl_params = '';
|
public $rtmpdump = 'vendor/bin/rtmpdump';
|
||||||
|
public $curl_params = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Config constructor
|
* Config constructor
|
||||||
|
|
|
@ -6,13 +6,15 @@
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"smarty/smarty": "~3.1.29",
|
"smarty/smarty": "~3.1.29",
|
||||||
"rg3/youtube-dl": "2016.04.05",
|
"rg3/youtube-dl": "~2016.04.13",
|
||||||
"slim/slim": "~3.3.0",
|
"slim/slim": "3.x-dev",
|
||||||
"mathmarques/smarty-view": "~1.1.0",
|
"mathmarques/smarty-view": "~1.1.0",
|
||||||
"symfony/yaml": "~3.0.0",
|
"symfony/yaml": "~3.0.0",
|
||||||
"symfony/process": "~3.0.0",
|
"symfony/process": "~3.0.0",
|
||||||
"ffmpeg/ffmpeg": "~2.8.2",
|
"ptachoire/process-builder-chain": "~1.2.0",
|
||||||
"rudloff/smarty-plugin-noscheme": "~0.1.0"
|
"ffmpeg/ffmpeg": "dev-release",
|
||||||
|
"rudloff/smarty-plugin-noscheme": "~0.1.0",
|
||||||
|
"rudloff/rtmpdump-bin": "~2.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/var-dumper": "~3.0.0"
|
"symfony/var-dumper": "~3.0.0"
|
||||||
|
@ -28,18 +30,18 @@
|
||||||
"type": "package",
|
"type": "package",
|
||||||
"package": {
|
"package": {
|
||||||
"name": "rg3/youtube-dl",
|
"name": "rg3/youtube-dl",
|
||||||
"version": "2016.04.05",
|
"version": "2016.04.13",
|
||||||
"source": {
|
"source": {
|
||||||
"url": "https://github.com/rg3/youtube-dl.git",
|
"url": "https://github.com/rg3/youtube-dl.git",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"reference": "2016.04.05"
|
"reference": "9e285387260a019d7471c3bdbd52cc764c0e8700"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"type": "package",
|
"type": "package",
|
||||||
"package": {
|
"package": {
|
||||||
"name": "ffmpeg/ffmpeg",
|
"name": "ffmpeg/ffmpeg",
|
||||||
"version": "2.8.4",
|
"version": "dev-release",
|
||||||
"dist": {
|
"dist": {
|
||||||
"url": "http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz",
|
"url": "http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz",
|
||||||
"type": "xz"
|
"type": "xz"
|
||||||
|
|
138
composer.lock
generated
138
composer.lock
generated
|
@ -4,8 +4,8 @@
|
||||||
"Read more about it at https://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": "829ac07cae5bc43ef0ad3f5e5be618c5",
|
"hash": "f753f2447bc606e2ab66785d88bd1189",
|
||||||
"content-hash": "a7131399bb03f78ba0dcfd8ab7e98d59",
|
"content-hash": "cddbd63bbeaecc24145efac93485ae1f",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "container-interop/container-interop",
|
"name": "container-interop/container-interop",
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ffmpeg/ffmpeg",
|
"name": "ffmpeg/ffmpeg",
|
||||||
"version": "2.8.4",
|
"version": "dev-release",
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "xz",
|
"type": "xz",
|
||||||
"url": "http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz",
|
"url": "http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz",
|
||||||
|
@ -226,16 +226,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/fast-route",
|
"name": "nikic/fast-route",
|
||||||
"version": "v0.6.0",
|
"version": "v1.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nikic/FastRoute.git",
|
"url": "https://github.com/nikic/FastRoute.git",
|
||||||
"reference": "31fa86924556b80735f98b294a7ffdfb26789f22"
|
"reference": "79843dce62ac52e9b628e73d5f1264cad10c65a6"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nikic/FastRoute/zipball/31fa86924556b80735f98b294a7ffdfb26789f22",
|
"url": "https://api.github.com/repos/nikic/FastRoute/zipball/79843dce62ac52e9b628e73d5f1264cad10c65a6",
|
||||||
"reference": "31fa86924556b80735f98b294a7ffdfb26789f22",
|
"reference": "79843dce62ac52e9b628e73d5f1264cad10c65a6",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -265,7 +265,7 @@
|
||||||
"router",
|
"router",
|
||||||
"routing"
|
"routing"
|
||||||
],
|
],
|
||||||
"time": "2015-06-18 19:15:47"
|
"time": "2016-04-18 11:33:20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pimple/pimple",
|
"name": "pimple/pimple",
|
||||||
|
@ -362,16 +362,80 @@
|
||||||
],
|
],
|
||||||
"time": "2015-05-04 20:22:00"
|
"time": "2015-05-04 20:22:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "ptachoire/process-builder-chain",
|
||||||
|
"version": "1.2.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/krichprollsch/process-builder-chain.git",
|
||||||
|
"reference": "465055dbcc3b5ef792a768df935571551de4781a"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/krichprollsch/process-builder-chain/zipball/465055dbcc3b5ef792a768df935571551de4781a",
|
||||||
|
"reference": "465055dbcc3b5ef792a768df935571551de4781a",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"symfony/process": "~2.5 || ~3.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"Chain": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Pierre Tachoire",
|
||||||
|
"email": "pierre.tachoire@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Add ability to chain symfony processes",
|
||||||
|
"time": "2016-04-10 08:33:20"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "rg3/youtube-dl",
|
"name": "rg3/youtube-dl",
|
||||||
"version": "2016.04.05",
|
"version": "2016.04.13",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/rg3/youtube-dl.git",
|
"url": "https://github.com/rg3/youtube-dl.git",
|
||||||
"reference": "2016.04.05"
|
"reference": "9e285387260a019d7471c3bdbd52cc764c0e8700"
|
||||||
},
|
},
|
||||||
"type": "library"
|
"type": "library"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "rudloff/rtmpdump-bin",
|
||||||
|
"version": "2.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/Rudloff/rtmpdump-bin.git",
|
||||||
|
"reference": "133cdd80e3bab66593e88a5276158596383afd97"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/Rudloff/rtmpdump-bin/zipball/133cdd80e3bab66593e88a5276158596383afd97",
|
||||||
|
"reference": "133cdd80e3bab66593e88a5276158596383afd97",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"rtmpdump/rtmpdump": "2.3"
|
||||||
|
},
|
||||||
|
"bin": [
|
||||||
|
"rtmpdump"
|
||||||
|
],
|
||||||
|
"type": "library",
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"GPL-2.0"
|
||||||
|
],
|
||||||
|
"description": "rtmpdump binary for Linux 64 bit",
|
||||||
|
"time": "2016-04-12 19:17:32"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "rudloff/smarty-plugin-noscheme",
|
"name": "rudloff/smarty-plugin-noscheme",
|
||||||
"version": "0.1.1",
|
"version": "0.1.1",
|
||||||
|
@ -415,25 +479,28 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "slim/slim",
|
"name": "slim/slim",
|
||||||
"version": "3.3.0",
|
"version": "3.x-dev",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/slimphp/Slim.git",
|
"url": "https://github.com/slimphp/Slim.git",
|
||||||
"reference": "939f2e85d57508de9cff241d10091cd972f221c3"
|
"reference": "30cfe3c07dac28ec1129c0577e64b90ba11a54c4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/slimphp/Slim/zipball/939f2e85d57508de9cff241d10091cd972f221c3",
|
"url": "https://api.github.com/repos/slimphp/Slim/zipball/30cfe3c07dac28ec1129c0577e64b90ba11a54c4",
|
||||||
"reference": "939f2e85d57508de9cff241d10091cd972f221c3",
|
"reference": "30cfe3c07dac28ec1129c0577e64b90ba11a54c4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"container-interop/container-interop": "^1.1",
|
"container-interop/container-interop": "^1.1",
|
||||||
"nikic/fast-route": "^0.6",
|
"nikic/fast-route": "^1.0",
|
||||||
"php": ">=5.5.0",
|
"php": ">=5.5.0",
|
||||||
"pimple/pimple": "^3.0",
|
"pimple/pimple": "^3.0",
|
||||||
"psr/http-message": "^1.0"
|
"psr/http-message": "^1.0"
|
||||||
},
|
},
|
||||||
|
"provide": {
|
||||||
|
"psr/http-message-implementation": "1.0"
|
||||||
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.0",
|
"phpunit/phpunit": "^4.0",
|
||||||
"squizlabs/php_codesniffer": "^2.5"
|
"squizlabs/php_codesniffer": "^2.5"
|
||||||
|
@ -478,7 +545,7 @@
|
||||||
"micro",
|
"micro",
|
||||||
"router"
|
"router"
|
||||||
],
|
],
|
||||||
"time": "2016-03-10 21:37:40"
|
"time": "2016-05-26 08:20:33"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "smarty/smarty",
|
"name": "smarty/smarty",
|
||||||
|
@ -537,16 +604,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/process",
|
"name": "symfony/process",
|
||||||
"version": "v3.0.4",
|
"version": "v3.0.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/process.git",
|
"url": "https://github.com/symfony/process.git",
|
||||||
"reference": "e6f1f98bbd355d209a992bfff45e7edfbd4a0776"
|
"reference": "53f9407c0bb1c5a79127db8f7bfe12f0f6f3dcdb"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/process/zipball/e6f1f98bbd355d209a992bfff45e7edfbd4a0776",
|
"url": "https://api.github.com/repos/symfony/process/zipball/53f9407c0bb1c5a79127db8f7bfe12f0f6f3dcdb",
|
||||||
"reference": "e6f1f98bbd355d209a992bfff45e7edfbd4a0776",
|
"reference": "53f9407c0bb1c5a79127db8f7bfe12f0f6f3dcdb",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -582,11 +649,11 @@
|
||||||
],
|
],
|
||||||
"description": "Symfony Process Component",
|
"description": "Symfony Process Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2016-03-30 10:41:14"
|
"time": "2016-04-14 15:30:28"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/yaml",
|
"name": "symfony/yaml",
|
||||||
"version": "v3.0.4",
|
"version": "v3.0.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/yaml.git",
|
"url": "https://github.com/symfony/yaml.git",
|
||||||
|
@ -637,16 +704,16 @@
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-mbstring",
|
"name": "symfony/polyfill-mbstring",
|
||||||
"version": "v1.1.1",
|
"version": "v1.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||||
"reference": "1289d16209491b584839022f29257ad859b8532d"
|
"reference": "dff51f72b0706335131b00a7f49606168c582594"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d",
|
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594",
|
||||||
"reference": "1289d16209491b584839022f29257ad859b8532d",
|
"reference": "dff51f72b0706335131b00a7f49606168c582594",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -658,7 +725,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.1-dev"
|
"dev-master": "1.2-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -692,20 +759,20 @@
|
||||||
"portable",
|
"portable",
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"time": "2016-01-20 09:13:37"
|
"time": "2016-05-18 14:26:46"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/var-dumper",
|
"name": "symfony/var-dumper",
|
||||||
"version": "v3.0.4",
|
"version": "v3.0.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/var-dumper.git",
|
"url": "https://github.com/symfony/var-dumper.git",
|
||||||
"reference": "3841ed86527d18ee2c35fe4afb1b2fc60f8fae79"
|
"reference": "0e918c269093ba4c77fca14e9424fa74ed16f1a6"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/3841ed86527d18ee2c35fe4afb1b2fc60f8fae79",
|
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/0e918c269093ba4c77fca14e9424fa74ed16f1a6",
|
||||||
"reference": "3841ed86527d18ee2c35fe4afb1b2fc60f8fae79",
|
"reference": "0e918c269093ba4c77fca14e9424fa74ed16f1a6",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -755,12 +822,15 @@
|
||||||
"debug",
|
"debug",
|
||||||
"dump"
|
"dump"
|
||||||
],
|
],
|
||||||
"time": "2016-03-10 10:34:12"
|
"time": "2016-04-25 11:17:47"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"stability-flags": [],
|
"stability-flags": {
|
||||||
|
"slim/slim": 20,
|
||||||
|
"ffmpeg/ffmpeg": 20
|
||||||
|
},
|
||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": [],
|
"platform": [],
|
||||||
|
|
BIN
composer.phar
BIN
composer.phar
Binary file not shown.
|
@ -4,6 +4,9 @@ params:
|
||||||
- --no-playlist
|
- --no-playlist
|
||||||
- --no-warnings
|
- --no-warnings
|
||||||
- -f best[protocol^=http]
|
- -f best[protocol^=http]
|
||||||
|
- --playlist-end
|
||||||
|
- 1
|
||||||
curl_params:
|
curl_params:
|
||||||
convert: false
|
convert: false
|
||||||
avconv: vendor/bin/ffmpeg
|
avconv: vendor/bin/ffmpeg
|
||||||
|
rtmpdump: vendor/bin/rtmpdump
|
||||||
|
|
|
@ -14,6 +14,9 @@ namespace Alltube\Controller;
|
||||||
|
|
||||||
use Alltube\VideoDownload;
|
use Alltube\VideoDownload;
|
||||||
use Alltube\Config;
|
use Alltube\Config;
|
||||||
|
use Symfony\Component\Process\ProcessBuilder;
|
||||||
|
use Chain\Chain;
|
||||||
|
use Slim\Http\Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main controller
|
* Main controller
|
||||||
|
@ -49,7 +52,8 @@ class FrontController
|
||||||
$response,
|
$response,
|
||||||
'head.tpl',
|
'head.tpl',
|
||||||
array(
|
array(
|
||||||
'class'=>'index'
|
'class'=>'index',
|
||||||
|
'description'=>'Easily download videos from Youtube, Dailymotion, Vimeo and other websites.'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$container->view->render(
|
$container->view->render(
|
||||||
|
@ -81,7 +85,10 @@ class FrontController
|
||||||
$response,
|
$response,
|
||||||
'head.tpl',
|
'head.tpl',
|
||||||
array(
|
array(
|
||||||
'class'=>'extractors'
|
'class'=>'extractors',
|
||||||
|
'title'=>'Supported websites',
|
||||||
|
'description'
|
||||||
|
=>'List of all supported websites from which Alltube Download can extract video or audio files'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$container->view->render($response, 'header.tpl');
|
$container->view->render($response, 'header.tpl');
|
||||||
|
@ -112,72 +119,100 @@ class FrontController
|
||||||
if (isset($params["url"])) {
|
if (isset($params["url"])) {
|
||||||
if (isset($params['audio'])) {
|
if (isset($params['audio'])) {
|
||||||
try {
|
try {
|
||||||
try {
|
$url = $this->download->getURL($params["url"], 'mp3[protocol^=http]');
|
||||||
$url = $this->download->getURL($params["url"], 'bestaudio[protocol^=http]');
|
|
||||||
return $response->withRedirect($url);
|
return $response->withRedirect($url);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$video = $this->download->getJSON($params["url"]);
|
$video = $this->download->getJSON($params["url"], 'bestaudio/best');
|
||||||
|
|
||||||
|
$avconvProc = ProcessBuilder::create(
|
||||||
|
array(
|
||||||
|
$this->config->avconv,
|
||||||
|
'-v', 'quiet',
|
||||||
|
'-i', '-',
|
||||||
|
'-f', 'mp3',
|
||||||
|
'-vn',
|
||||||
|
'pipe:1'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
//Vimeo needs a correct user-agent
|
//Vimeo needs a correct user-agent
|
||||||
ini_set(
|
ini_set(
|
||||||
'user_agent',
|
'user_agent',
|
||||||
$video->http_headers->{'User-Agent'}
|
$video->http_headers->{'User-Agent'}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$response = $response->withHeader(
|
||||||
|
'Content-Disposition',
|
||||||
|
'attachment; filename="'.
|
||||||
|
html_entity_decode(
|
||||||
|
pathinfo(
|
||||||
|
$video->_filename,
|
||||||
|
PATHINFO_FILENAME
|
||||||
|
).'.mp3',
|
||||||
|
ENT_COMPAT,
|
||||||
|
'ISO-8859-1'
|
||||||
|
).'"'
|
||||||
|
);
|
||||||
|
$response = $response->withHeader('Content-Type', 'audio/mpeg');
|
||||||
|
|
||||||
if (parse_url($video->url, PHP_URL_SCHEME) == 'rtmp') {
|
if (parse_url($video->url, PHP_URL_SCHEME) == 'rtmp') {
|
||||||
ob_end_flush();
|
$builder = new ProcessBuilder(
|
||||||
header(
|
array(
|
||||||
'Content-Disposition: attachment; filename="'.
|
$this->config->rtmpdump,
|
||||||
html_entity_decode(
|
'-q',
|
||||||
pathinfo(
|
'-r',
|
||||||
$video->_filename,
|
$video->url,
|
||||||
PATHINFO_FILENAME
|
'--pageUrl', $video->webpage_url
|
||||||
).'.mp3',
|
)
|
||||||
ENT_COMPAT,
|
|
||||||
'ISO-8859-1'
|
|
||||||
).'"'
|
|
||||||
);
|
);
|
||||||
header("Content-Type: audio/mpeg");
|
if (isset($video->player_url)) {
|
||||||
passthru(
|
$builder->add('--swfVfy');
|
||||||
'/usr/bin/rtmpdump -q -r '.escapeshellarg($video->url).
|
$builder->add($video->player_url);
|
||||||
' | '.$this->config->avconv.
|
}
|
||||||
' -v quiet -i - -f mp3 -vn pipe:1'
|
if (isset($video->flash_version)) {
|
||||||
);
|
$builder->add('--flashVer');
|
||||||
exit;
|
$builder->add($video->flash_version);
|
||||||
|
}
|
||||||
|
if (isset($video->play_path)) {
|
||||||
|
$builder->add('--playpath');
|
||||||
|
$builder->add($video->play_path);
|
||||||
|
}
|
||||||
|
foreach ($video->rtmp_conn as $conn) {
|
||||||
|
$builder->add('--conn');
|
||||||
|
$builder->add($conn);
|
||||||
|
}
|
||||||
|
$chain = new Chain($builder->getProcess());
|
||||||
|
$chain->add('|', $avconvProc);
|
||||||
} else {
|
} else {
|
||||||
ob_end_flush();
|
$chain = new Chain(
|
||||||
header(
|
ProcessBuilder::create(
|
||||||
'Content-Disposition: attachment; filename="'.
|
array_merge(
|
||||||
html_entity_decode(
|
array(
|
||||||
pathinfo(
|
'curl',
|
||||||
$video->_filename,
|
'--silent',
|
||||||
PATHINFO_FILENAME
|
'--user-agent', $video->http_headers->{'User-Agent'},
|
||||||
).'.mp3',
|
$video->url
|
||||||
ENT_COMPAT,
|
),
|
||||||
'ISO-8859-1'
|
$this->config->curl_params
|
||||||
).'"'
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
header("Content-Type: audio/mpeg");
|
$chain->add('|', $avconvProc);
|
||||||
passthru(
|
|
||||||
'curl '.$this->config->curl_params.
|
|
||||||
' --user-agent '.escapeshellarg($video->http_headers->{'User-Agent'}).
|
|
||||||
' '.escapeshellarg($video->url).
|
|
||||||
' | '.$this->config->avconv.
|
|
||||||
' -v quiet -i - -f mp3 -vn pipe:1'
|
|
||||||
);
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
if ($request->isGet()) {
|
||||||
|
$response = $response->withBody(new Stream(popen($chain->getProcess()->getCommandLine(), 'r')));
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
return $response;
|
||||||
$error = $e->getMessage();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
|
||||||
$video = $this->download->getJSON($params["url"]);
|
$video = $this->download->getJSON($params["url"]);
|
||||||
$container->view->render(
|
$container->view->render(
|
||||||
$response,
|
$response,
|
||||||
'head.tpl',
|
'head.tpl',
|
||||||
array(
|
array(
|
||||||
'class'=>'video'
|
'class'=>'video',
|
||||||
|
'title'=>$video->title,
|
||||||
|
'description'=>'Download "'.$video->title.'" from '.$video->extractor_key
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$container->view->render(
|
$container->view->render(
|
||||||
|
@ -188,28 +223,30 @@ class FrontController
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$container->view->render($response, 'footer.tpl');
|
$container->view->render($response, 'footer.tpl');
|
||||||
} catch (\Exception $e) {
|
|
||||||
$error = $e->getMessage();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($error)) {
|
|
||||||
|
public function error($request, $response, $exception)
|
||||||
|
{
|
||||||
|
global $container;
|
||||||
$container->view->render(
|
$container->view->render(
|
||||||
$response,
|
$response,
|
||||||
'head.tpl',
|
'head.tpl',
|
||||||
array(
|
array(
|
||||||
'class'=>'video'
|
'class'=>'video',
|
||||||
|
'title'=>'Error'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$container->view->render(
|
$container->view->render(
|
||||||
$response,
|
$response,
|
||||||
'error.tpl',
|
'error.tpl',
|
||||||
array(
|
array(
|
||||||
'errors'=>$error
|
'errors'=>$exception->getMessage()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$container->view->render($response, 'footer.tpl');
|
$container->view->render($response, 'footer.tpl');
|
||||||
}
|
return $response->withStatus(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -570,6 +570,7 @@ h1 {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 640px) {
|
@media (max-width: 640px) {
|
||||||
|
.formats,
|
||||||
.thumb {
|
.thumb {
|
||||||
width:90%;
|
width:90%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<!Doctype HTML>
|
<!Doctype HTML>
|
||||||
<html lang="en" itemscope itemtype="http://schema.org/WebApplication">
|
<html 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" />
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<h1><img itemprop="image" class="logo" src="img/logo.png"
|
<h1><img class="logo" src="img/logo.png"
|
||||||
alt="AllTube Download" width="328" height="284"></h1>
|
alt="AllTube Download" width="328" height="284"></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 moments.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -30,6 +30,8 @@ $container['view'] = function ($c) {
|
||||||
|
|
||||||
$controller = new FrontController();
|
$controller = new FrontController();
|
||||||
|
|
||||||
|
$container['errorHandler'] = array($controller, 'error');
|
||||||
|
|
||||||
$app->get(
|
$app->get(
|
||||||
'/',
|
'/',
|
||||||
array($controller, 'index')
|
array($controller, 'index')
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<!Doctype HTML>
|
<!Doctype HTML>
|
||||||
<html lang="en" itemscope itemtype="http://schema.org/WebApplication">
|
<html 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" />
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<h1><img itemprop="image" class="logo" src="img/logo.png"
|
<h1><img class="logo" src="img/logo.png"
|
||||||
alt="AllTube Download" width="328" height="284"></h1>
|
alt="AllTube Download" width="328" height="284"></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>
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
"grunt-phpcs": "~0.4.0",
|
"grunt-phpcs": "~0.4.0",
|
||||||
"grunt-phpunit": "~0.3.6",
|
"grunt-phpunit": "~0.3.6",
|
||||||
"grunt-contrib-compress": "~1.2.0",
|
"grunt-contrib-compress": "~1.2.0",
|
||||||
"bower": "~1.7.1"
|
"bower": "~1.7.1",
|
||||||
|
"grunt-githash": "~0.1.3"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
<div class="footer_wrapper">
|
<div class="footer_wrapper">
|
||||||
Code by <a rel="author" target="blank" itemprop="author"
|
Code by <a rel="author" target="blank"
|
||||||
href="http://rudloff.pro/">Pierre Rudloff</a>
|
href="http://rudloff.pro/">Pierre Rudloff</a>
|
||||||
· Design by
|
· Design by
|
||||||
<a rel="author" itemprop="author" target="blank"
|
<a rel="author" target="blank"
|
||||||
href="http://olivierhaquette.fr">Olivier Haquette</a>
|
href="http://olivierhaquette.fr">Olivier Haquette</a>
|
||||||
·
|
·
|
||||||
<a target="_blank"
|
<a target="_blank"
|
||||||
|
|
|
@ -1,30 +1,24 @@
|
||||||
<!Doctype HTML>
|
<!Doctype HTML>
|
||||||
<html lang="en" itemscope itemtype="http://schema.org/WebApplication">
|
<html 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">
|
||||||
<meta name="description" content="Easily download videos from Youtube, Dailymotion, Vimeo and other websites." />
|
{if isset($description)}
|
||||||
|
<meta name="description" content="{$description|escape}" />
|
||||||
|
<meta name="twitter:description" content="{$description|escape}" />
|
||||||
|
<meta property="og:description" content="{$description|escape}" />
|
||||||
|
{/if}
|
||||||
<link rel="stylesheet" href="{base_url|noscheme}/dist/main.css" />
|
<link rel="stylesheet" href="{base_url|noscheme}/dist/main.css" />
|
||||||
<link rel="author" href="https://plus.google.com/110403274854419000481?rel=author" />
|
<title>AllTube Download{if isset($title)} - {$title|escape}{/if}</title>
|
||||||
<link rel="author" href="https://plus.google.com/103696815796116179392?rel=author" />
|
|
||||||
<link href="https://plus.google.com/108799967445657477255" rel="publisher" />
|
|
||||||
<title itemprop="name">AllTube Download</title>
|
|
||||||
<meta itemprop="url" content="{base_url|noscheme}" />
|
|
||||||
<link rel="canonical" href="//{$smarty.server.HTTP_HOST|cat:$smarty.server.REQUEST_URI|replace:{base_url|noscheme}:'http://www.alltubedownload.net'}" />
|
<link rel="canonical" href="//{$smarty.server.HTTP_HOST|cat:$smarty.server.REQUEST_URI|replace:{base_url|noscheme}:'http://www.alltubedownload.net'}" />
|
||||||
<link rel="icon" href="{base_url|noscheme}/img/favicon.png" />
|
<link rel="icon" href="{base_url|noscheme}/img/favicon.png" />
|
||||||
<meta property="og:url" content="{base_url|noscheme}" />
|
<meta property="og:title" content="AllTube Download{if isset($title)} - {$title|escape}{/if}" />
|
||||||
<meta property="og:title" content="AllTube Download" />
|
<meta property="og:image" content="{base_url}/img/logo.png" />
|
||||||
<meta property="og:description" content="Easily download videos from Youtube, Dailymotion, Vimeo and other websites." />
|
|
||||||
<meta property="og:image" content="{base_url|noscheme}/img/logo.png" />
|
|
||||||
<meta name="twitter:card" content="summary" />
|
<meta name="twitter:card" content="summary" />
|
||||||
<meta name="twitter:title" content="AllTube Download" />
|
<meta name="twitter:title" content="AllTube Download{if isset($title)} - {$title|escape}{/if}" />
|
||||||
<meta name="twitter:image" content="{base_url|noscheme}/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="twitter:description" content="Easily download videos from Youtube, Dailymotion, Vimeo and other websites." />
|
|
||||||
<script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>
|
<script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>
|
||||||
<meta itemprop="applicationCategory" content="Download" />
|
|
||||||
<meta itemprop="operatingSystem" content="Linux" />
|
|
||||||
<meta itemprop="operatingSystem" content="Mac OS X" />
|
|
||||||
<meta name="theme-color" content="#4F4F4F">
|
<meta name="theme-color" content="#4F4F4F">
|
||||||
<link rel="manifest" href="manifest.json" />
|
<link rel="manifest" href="manifest.json" />
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div><img itemprop="image" class="logo" src="{base_url|noscheme}/img/logo.png"
|
<div><img class="logo" src="{base_url|noscheme}/img/logo.png"
|
||||||
alt="AllTube Download" width="328" height="284"></div>
|
alt="AllTube Download" width="328" height="284"></div>
|
||||||
<form action="{path_for name="video"}">
|
<form action="{path_for name="video"}">
|
||||||
<label class="labelurl" for="url">
|
<label class="labelurl" for="url">
|
||||||
|
|
|
@ -19,14 +19,20 @@
|
||||||
alt="Casting to ChromeCast…" title="Stop casting"
|
alt="Casting to ChromeCast…" title="Stop casting"
|
||||||
id="cast_btn_stop" class="cast_btn cast_hidden cast_icon" /></p>
|
id="cast_btn_stop" class="cast_btn cast_hidden cast_icon" /></p>
|
||||||
{if isset($video->thumbnail)}
|
{if isset($video->thumbnail)}
|
||||||
<img itemprop="image" class="thumb" src="{$video->thumbnail}" alt="" />
|
<img itemprop="thumbnailUrl" class="thumb" src="{$video->thumbnail}" alt="" />
|
||||||
|
{/if}
|
||||||
|
{if isset($video->description)}
|
||||||
|
<meta itemprop="description" content="{$video->description|escape}" />
|
||||||
|
{/if}
|
||||||
|
{if isset($video->upload_date)}
|
||||||
|
<meta itemprop="uploadDate" content="{$video->upload_date}" />
|
||||||
{/if}
|
{/if}
|
||||||
<br/>
|
<br/>
|
||||||
{if isset($video->formats)}
|
{if isset($video->formats)}
|
||||||
<h3><label for="format">Available formats:</label></h3>
|
<h3><label for="format">Available formats:</label></h3>
|
||||||
<form action="{path_for name="redirect"}">
|
<form action="{path_for name="redirect"}">
|
||||||
<input type="hidden" name="url" value="{$video->webpage_url}" />
|
<input type="hidden" name="url" value="{$video->webpage_url}" />
|
||||||
<select name="format" id="format" class="monospace">
|
<select name="format" id="format" class="formats monospace">
|
||||||
<optgroup label="Generic formats">
|
<optgroup label="Generic formats">
|
||||||
<option value="best[protocol^=http]">
|
<option value="best[protocol^=http]">
|
||||||
{strip}
|
{strip}
|
||||||
|
@ -43,7 +49,6 @@
|
||||||
</optgroup>
|
</optgroup>
|
||||||
<optgroup label="Detailed formats" class="monospace">
|
<optgroup label="Detailed formats" class="monospace">
|
||||||
{foreach $video->formats as $format}
|
{foreach $video->formats as $format}
|
||||||
{$format->protocol}
|
|
||||||
{if $format->protocol|in_array:array('http', 'https')}
|
{if $format->protocol|in_array:array('http', 'https')}
|
||||||
{strip}
|
{strip}
|
||||||
<option value="{$format->format_id}">
|
<option value="{$format->format_id}">
|
||||||
|
|
Loading…
Reference in a new issue