diff --git a/composer.json b/composer.json index 9d4480d..86c5e22 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,8 @@ "mathmarques/smarty-view": "~1.1.0", "symfony/yaml": "~3.0.0", "symfony/process": "~3.0.0", - "ffmpeg/ffmpeg": "~2.8.2" + "ffmpeg/ffmpeg": "~2.8.2", + "rudloff/smarty-plugin-noscheme": "~0.1.0" }, "require-dev": { "symfony/var-dumper": "~3.0.0" diff --git a/composer.lock b/composer.lock index 638aad7..e589dc2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "3449f3fdfee819b9ebe34c0efa7fc732", - "content-hash": "e89b6deb5098d948d4e03ce635400cdf", + "hash": "829ac07cae5bc43ef0ad3f5e5be618c5", + "content-hash": "a7131399bb03f78ba0dcfd8ab7e98d59", "packages": [ { "name": "container-interop/container-interop", @@ -48,6 +48,132 @@ ], "type": "library" }, + { + "name": "jeremykendall/php-domain-parser", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/jeremykendall/php-domain-parser.git", + "reference": "896e7e70f02bd4fd77190052799bc61e4d779672" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jeremykendall/php-domain-parser/zipball/896e7e70f02bd4fd77190052799bc61e4d779672", + "reference": "896e7e70f02bd4fd77190052799bc61e4d779672", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-intl": "*", + "ext-mbstring": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "jeremykendall/debug-die": "0.0.1.*", + "mikey179/vfsstream": "~1.4", + "phpunit/phpunit": "~4.4" + }, + "bin": [ + "bin/parse", + "bin/update-psl" + ], + "type": "library", + "autoload": { + "psr-0": { + "Pdp\\": "src/" + }, + "files": [ + "src/pdp-parse-url.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Kendall", + "homepage": "http://about.me/jeremykendall", + "role": "Developer" + }, + { + "name": "Contributors", + "homepage": "https://github.com/jeremykendall/php-domain-parser/graphs/contributors" + } + ], + "description": "Public Suffix List based URL parsing implemented in PHP.", + "homepage": "https://github.com/jeremykendall/php-domain-parser", + "keywords": [ + "Public Suffix List", + "domain parsing", + "url parsing" + ], + "time": "2015-03-30 12:49:45" + }, + { + "name": "league/uri", + "version": "4.1.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "0cbce9fe7d9808690ebda67b110ad96bcae9daee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/0cbce9fe7d9808690ebda67b110ad96bcae9daee", + "reference": "0cbce9fe7d9808690ebda67b110ad96bcae9daee", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "ext-intl": "*", + "ext-mbstring": "*", + "jeremykendall/php-domain-parser": "^3.0", + "php": ">=5.5.9", + "psr/http-message": "^1.0" + }, + "require-dev": { + "fabpot/php-cs-fixer": "^1.9", + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "http://url.thephpleague.com", + "keywords": [ + "data", + "data-uri", + "ftp", + "http", + "parse_url", + "psr-7", + "rfc3986", + "uri", + "url", + "ws" + ], + "time": "2016-03-24 08:38:29" + }, { "name": "mathmarques/smarty-view", "version": "1.1.0", @@ -246,6 +372,42 @@ }, "type": "library" }, + { + "name": "rudloff/smarty-plugin-noscheme", + "version": "0.1.0", + "source": { + "type": "git", + "url": "https://github.com/Rudloff/smarty-plugin-noscheme.git", + "reference": "537bcb2f7576252af70d8f9f817bfe050d873072" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Rudloff/smarty-plugin-noscheme/zipball/537bcb2f7576252af70d8f9f817bfe050d873072", + "reference": "537bcb2f7576252af70d8f9f817bfe050d873072", + "shasum": "" + }, + "require": { + "league/uri": "~4.0" + }, + "require-dev": { + "symfony/var-dumper": "~2.7.6" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0" + ], + "authors": [ + { + "name": "Pierre Rudloff", + "email": "contact@rudloff.pro", + "homepage": "https://rudloff.pro/", + "role": "Developer" + } + ], + "description": "Smarty modifier that removes the scheme in URLs", + "time": "2015-10-31 10:25:47" + }, { "name": "slim/slim", "version": "3.3.0", diff --git a/index.php b/index.php index c136e46..468a685 100644 --- a/index.php +++ b/index.php @@ -13,6 +13,7 @@ * @link http://rudloff.pro * */ require_once __DIR__.'/vendor/autoload.php'; +require_once __DIR__.'/vendor/rudloff/smarty-plugin-noscheme/modifier.noscheme.php'; use Alltube\VideoDownload; $app = new \Slim\App(); @@ -21,6 +22,8 @@ $container['view'] = function ($c) { $view = new \Slim\Views\Smarty(__DIR__.'/templates/'); $view->addSlimPlugins($c['router'], $c['request']->getUri()); + $view->registerPlugin('modifier', 'noscheme', 'Smarty_Modifier_noscheme'); + return $view; }; diff --git a/templates/footer.tpl b/templates/footer.tpl index 17dae57..8dcf4dd 100644 --- a/templates/footer.tpl +++ b/templates/footer.tpl @@ -17,6 +17,6 @@ · - + diff --git a/templates/head.tpl b/templates/head.tpl index 5c30192..061e0ad 100644 --- a/templates/head.tpl +++ b/templates/head.tpl @@ -4,26 +4,21 @@ - + AllTube Download - -{if isset($smarty.server.HTTPS)} - {$scheme = "https://"} -{else} - {$scheme = "http://"} -{/if} - - - + + + + - + - + diff --git a/templates/index.tpl b/templates/index.tpl index 7f4fff3..f91a55e 100644 --- a/templates/index.tpl +++ b/templates/index.tpl @@ -1,5 +1,5 @@
-
diff --git a/templates/logo.tpl b/templates/logo.tpl index 311f294..c008425 100644 --- a/templates/logo.tpl +++ b/templates/logo.tpl @@ -1,4 +1,4 @@

- -AllTube Download + +AllTube Download

diff --git a/templates/video.tpl b/templates/video.tpl index b24024c..b6a1231 100644 --- a/templates/video.tpl +++ b/templates/video.tpl @@ -9,13 +9,13 @@ href="{$video->webpage_url}"> {$video->title}. Google Cast™ is disabled Google Cast™ -Casting to ChromeCast…

{if isset($video->thumbnail)}