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
vendor/
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");
passthru(
'/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;
} else {
@ -57,7 +57,7 @@ if (isset($_GET["url"])) {
passthru(
'/usr/bin/wget -q --user-agent='.escapeshellarg($UA).
' -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;
}

View file

@ -14,7 +14,12 @@
define('YOUTUBE_DL', './youtube-dl');
define('PYTHON', '/usr/bin/python');
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('DISABLED', false);
define('BASE_URL', 'http://alltubedownload.net/');

View file

@ -17,6 +17,6 @@
"url": "https://github.com/Rudloff/alltube.git"
},
"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"
}
}