Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release-0.4.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudloff committed Mar 15, 2016
2 parents bb73035 + 56fbff1 commit f4fef05
Show file tree
Hide file tree
Showing 16 changed files with 183 additions and 119 deletions.
3 changes: 3 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ FileETag None
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]

Redirect permanent /api.php /video
Redirect permanent /extractors.php /extractors
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ You should also ensure that the *templates_c* folder has the right permissions:

chmod 777 templates_c/

If your web server is Apache, you need to set the `AllowOverride` setting to `All` or `FileInfo`.

##Config

If you want to use a custom config, you need to create a config file:
Expand All @@ -37,4 +39,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).
2 changes: 2 additions & 0 deletions classes/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
public $params = '--no-playlist --no-warnings -f best';
public $convert = false;
public $avconv = 'vendor/bin/ffmpeg';
public $curl_params = '';

/**
* Config constructor
Expand All @@ -56,6 +57,7 @@ private function __construct()

/**
* Get singleton instance
*
* @return Config
*/
public static function getInstance()
Expand Down
27 changes: 22 additions & 5 deletions classes/VideoDownload.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@
static function getUA()
{
$config = Config::getInstance();
$cmd = escapeshellcmd(
$config->python.' '.escapeshellarg($config->youtubedl).
' '.$config->params
);
exec(
$config->python.' '.$config->youtubedl.' --dump-user-agent',
$cmd.' --dump-user-agent',
$version
);
return $version[0];
Expand All @@ -47,8 +51,12 @@ static function getUA()
static function listExtractors()
{
$config = Config::getInstance();
$cmd = escapeshellcmd(
$config->python.' '.escapeshellarg($config->youtubedl).
' '.$config->params
);
exec(
$config->python.' '.$config->youtubedl.' --list-extractors',
$cmd.' --list-extractors',
$extractors
);
return $extractors;
Expand All @@ -65,7 +73,10 @@ static function listExtractors()
static function getFilename($url, $format=null)
{
$config = Config::getInstance();
$cmd=$config->python.' '.$config->youtubedl;
$cmd = escapeshellcmd(
$config->python.' '.escapeshellarg($config->youtubedl).
' '.$config->params
);
if (isset($format)) {
$cmd .= ' -f '.escapeshellarg($format);
}
Expand All @@ -88,7 +99,10 @@ static function getFilename($url, $format=null)
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);
}
Expand All @@ -114,7 +128,10 @@ static function getJSON($url, $format=null)
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);
}
Expand Down
135 changes: 69 additions & 66 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,71 @@
{
"name": "rudloff/alltube",
"description": "HTML GUI for youtube-dl",
"license": "GPL-3.0",
"homepage": "http://alltubedownload.net/",
"type": "project",
"require": {
"smarty/smarty": "~3.1",
"rg3/youtube-dl": "2015.12.29",
"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": "2015.12.29",
"source": {
"url": "https://github.com/rg3/youtube-dl.git",
"type": "git",
"reference": "2015.12.29"
}
}
},
{
"type": "package",
"package": {
"name": "ffmpeg/ffmpeg",
"version": "2.8.2",
"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.03.14",
"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.03.14",
"source": {
"url": "https://github.com/rg3/youtube-dl.git",
"type": "git",
"reference": "2016.03.14"
}
}
}, {
"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"
}, {
"name": "Olivier Haquette",
"email": "contact@olivierhaquette.fr",
"homepage": "http://olivierhaquette.fr/",
"role": "Designer"
}],
"autoload": {
"psr-4": {
"Alltube\\": "classes/",
"Alltube\\Controller\\": "controllers/"
}
},
"config": {
"secure-http": false
}
}
Loading

0 comments on commit f4fef05

Please sign in to comment.