This commit is contained in:
Pierre Rudloff 2015-05-16 03:23:55 +02:00
parent 8d39c646ec
commit f4495794fe
4 changed files with 11 additions and 4 deletions

2
.gitignore vendored
View file

@ -4,3 +4,5 @@ node_modules/
config.php config.php
vendor/ vendor/
templates_c/ templates_c/
ffmpeg.tar.xz
ffmpeg-2.6.2-64bit-static/

View file

@ -39,7 +39,7 @@ if (isset($_GET["url"])) {
header("Content-Type: audio/mpeg"); header("Content-Type: audio/mpeg");
passthru( passthru(
'/usr/bin/rtmpdump -q -r '.escapeshellarg($video->url). '/usr/bin/rtmpdump -q -r '.escapeshellarg($video->url).
' | /usr/bin/avconv -v quiet -i - -f mp3 -vn pipe:1' ' | '.AVCONV.' -v quiet -i - -f mp3 -vn pipe:1'
); );
exit; exit;
} else { } else {
@ -57,7 +57,7 @@ if (isset($_GET["url"])) {
passthru( passthru(
'/usr/bin/wget -q --user-agent='.escapeshellarg($UA). '/usr/bin/wget -q --user-agent='.escapeshellarg($UA).
' -O - '.escapeshellarg($video->url). ' -O - '.escapeshellarg($video->url).
' | /usr/bin/avconv -v quiet -i - -f mp3 -vn pipe:1' ' | '.AVCONV.' -v quiet -i - -f mp3 -vn pipe:1'
); );
exit; exit;
} }

View file

@ -14,7 +14,12 @@
define('YOUTUBE_DL', './youtube-dl'); define('YOUTUBE_DL', './youtube-dl');
define('PYTHON', '/usr/bin/python'); define('PYTHON', '/usr/bin/python');
define('PARAMS', '--no-playlist --no-warnings'); define('PARAMS', '--no-playlist --no-warnings');
define('CONVERT', false); if (getenv('CONVERT')) {
define('CONVERT', getenv('CONVERT'));
} else {
define('CONVERT', false);
}
define('AVCONV', __DIR__.'/ffmpeg-2.6.2-64bit-static/ffmpeg');
define('MAINTENANCE', false); define('MAINTENANCE', false);
define('DISABLED', false); define('DISABLED', false);
define('BASE_URL', 'http://alltubedownload.net/'); define('BASE_URL', 'http://alltubedownload.net/');

View file

@ -17,6 +17,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 https://yt-dl.org/downloads/2015.04.09/youtube-dl -o youtube-dl" "postinstall": "./node_modules/grunt-cli/bin/grunt; curl https://yt-dl.org/downloads/2015.04.09/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"
} }
} }