From 59aeb753ed390d0604a28a1933e93d74050c51d0 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Fri, 7 Dec 2018 18:19:00 +0100 Subject: [PATCH 01/19] feat: Add support for Arabic locale --- classes/LocaleManager.php | 2 +- i18n/ar_001/LC_MESSAGES/Alltube.po | 246 +++++++++++++++++++++++++++++ 2 files changed, 247 insertions(+), 1 deletion(-) create mode 100644 i18n/ar_001/LC_MESSAGES/Alltube.po diff --git a/classes/LocaleManager.php b/classes/LocaleManager.php index 7db7cbc..cbc1ddd 100644 --- a/classes/LocaleManager.php +++ b/classes/LocaleManager.php @@ -19,7 +19,7 @@ class LocaleManager * * @var array */ - private $supportedLocales = ['en_US', 'fr_FR', 'zh_CN', 'es_ES', 'pt_BR', 'de_DE']; + private $supportedLocales = ['en_US', 'fr_FR', 'zh_CN', 'es_ES', 'pt_BR', 'de_DE', 'ar_001']; /** * Current locale. diff --git a/i18n/ar_001/LC_MESSAGES/Alltube.po b/i18n/ar_001/LC_MESSAGES/Alltube.po new file mode 100644 index 0000000..293ed5d --- /dev/null +++ b/i18n/ar_001/LC_MESSAGES/Alltube.po @@ -0,0 +1,246 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: Pierre Rudloff \n" +"Plural-Forms: nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n" +"Language: ar_001\n" + +#: templates/inc/footer.tpl:4 +msgid "Code by" +msgstr "" + +#: templates/inc/footer.tpl:6 +msgid "Design by" +msgstr "" + +#: templates/inc/footer.tpl:10 +msgid "Get the code" +msgstr "" + +#: templates/inc/footer.tpl:12 +msgid "Based on" +msgstr "" + +#: templates/inc/footer.tpl:14 +msgid "Donate using Liberapay" +msgstr "" + +#: templates/inc/footer.tpl:14 +msgid "Donate" +msgstr "" + +#: templates/inc/header.tpl:4 +msgid "Switch language" +msgstr "" + +#: templates/inc/header.tpl:21 +msgid "Share on Twitter" +msgstr "" + +#: templates/inc/header.tpl:23 +msgid "Share on Facebook" +msgstr "" + +#: templates/playlist.tpl:5 +msgid "Videos extracted from" +msgstr "" + +#: templates/playlist.tpl:7 +msgid ":" +msgstr "" + +#: templates/playlist.tpl:26 templates/video.tpl:96 templates/video.tpl:99 +#: templates/password.tpl:10 templates/index.tpl:19 +#: controllers/FrontController.php:315 +msgid "Download" +msgstr "" + +#: templates/playlist.tpl:27 +msgid "More options" +msgstr "" + +#: templates/extractors.tpl:4 controllers/FrontController.php:167 +msgid "Supported websites" +msgstr "" + +#: templates/video.tpl:6 +msgid "You are going to download" +msgstr "" + +#: templates/video.tpl:24 +msgid "Available formats:" +msgstr "" + +#: templates/video.tpl:29 +msgid "Generic formats" +msgstr "" + +#: templates/video.tpl:32 +msgid "Best" +msgstr "" + +#: templates/video.tpl:37 +msgid "Remux best video with best audio" +msgstr "" + +#: templates/video.tpl:41 +msgid "Worst" +msgstr "" + +#: templates/video.tpl:44 +msgid "Detailed formats" +msgstr "" + +#: templates/video.tpl:85 +msgid "Convert into a custom format:" +msgstr "" + +#: templates/video.tpl:91 +msgid "with" +msgstr "" + +#: templates/video.tpl:93 +msgid "kbit/s audio" +msgstr "" + +#: templates/error.tpl:5 +msgid "An error occurred" +msgstr "" + +#: templates/error.tpl:6 +msgid "Please check the URL of your video." +msgstr "" + +#: templates/password.tpl:5 +msgid "This video is protected" +msgstr "" + +#: templates/password.tpl:6 +msgid "You need a password in order to download this video." +msgstr "" + +#: templates/password.tpl:8 +msgid "Video password" +msgstr "" + +#: templates/index.tpl:8 +msgid "Copy here the URL of your video (Youtube, Dailymotion, etc.)" +msgstr "" + +#: templates/index.tpl:25 +msgid "Audio only (MP3)" +msgstr "" + +#: templates/index.tpl:28 +msgid "From" +msgstr "" + +#: templates/index.tpl:29 +msgid "to" +msgstr "" + +#: templates/index.tpl:36 +msgid "See all supported websites" +msgstr "" + +#: templates/index.tpl:38 +msgid "Drag this to your bookmarks bar:" +msgstr "" + +#: templates/index.tpl:39 +msgid "Bookmarklet" +msgstr "" + +#: classes/VideoDownload.php:117 +msgid "Wrong password" +msgstr "" + +#: classes/VideoDownload.php:158 +msgid "youtube-dl returned an empty URL." +msgstr "" + +#: classes/VideoDownload.php:289 classes/VideoDownload.php:394 +msgid "Can't find avconv or ffmpeg at " +msgstr "" + +#: classes/VideoDownload.php:302 +msgid "Invalid start time: " +msgstr "" + +#: classes/VideoDownload.php:309 +msgid "Invalid end time: " +msgstr "" + +#: classes/VideoDownload.php:359 +msgid "Conversion of playlists is not supported." +msgstr "" + +#: classes/VideoDownload.php:364 classes/VideoDownload.php:526 +msgid "Conversion of M3U8 files is not supported." +msgstr "" + +#: classes/VideoDownload.php:366 +msgid "Conversion of DASH segments is not supported." +msgstr "" + +#: classes/VideoDownload.php:375 classes/VideoDownload.php:412 +#: classes/VideoDownload.php:445 classes/VideoDownload.php:478 +#: classes/VideoDownload.php:534 +msgid "Could not open popen stream." +msgstr "" + +#: classes/VideoDownload.php:502 +msgid "Could not open fopen stream." +msgstr "" + +#: controllers/FrontController.php:124 +msgid "" +"Easily download videos from Youtube, Dailymotion, Vimeo and other websites." +msgstr "" + +#: controllers/FrontController.php:168 +msgid "" +"List of all supported websites from which Alltube Download can extract video " +"or audio files" +msgstr "" + +#: controllers/FrontController.php:193 +msgid "Password prompt" +msgstr "" + +#: controllers/FrontController.php:194 +msgid "" +"You need a password in order to download this video with Alltube Download" +msgstr "" + +#: controllers/FrontController.php:311 +msgid "Video download" +msgstr "" + +#: controllers/FrontController.php:312 +msgid "Download video from " +msgstr "" + +#: controllers/FrontController.php:315 +msgid "from" +msgstr "" + +#: controllers/FrontController.php:378 +msgid "Error" +msgstr "" + +#: controllers/FrontController.php:450 +msgid "You need to enable remux mode to merge two formats." +msgstr "" + +#: controllers/FrontController.php:525 +msgid "Can't find URL of video." +msgstr "" From d9bc681b17b4a2b453b9a61615690b2eaed0c222 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Fri, 7 Dec 2018 18:20:03 +0100 Subject: [PATCH 02/19] Update Alltube.po (POEditor.com) --- i18n/ar_001/LC_MESSAGES/Alltube.po | 315 ++++++++++++++--------------- 1 file changed, 153 insertions(+), 162 deletions(-) diff --git a/i18n/ar_001/LC_MESSAGES/Alltube.po b/i18n/ar_001/LC_MESSAGES/Alltube.po index 293ed5d..c8d3e52 100644 --- a/i18n/ar_001/LC_MESSAGES/Alltube.po +++ b/i18n/ar_001/LC_MESSAGES/Alltube.po @@ -1,246 +1,237 @@ msgid "" msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" -"Project-Id-Version: \n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Language-Team: \n" "MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.11\n" -"Last-Translator: Pierre Rudloff \n" -"Plural-Forms: nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " -"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n" -"Language: ar_001\n" +"X-Generator: POEditor.com\n" +"Project-Id-Version: AllTube Download\n" +"Language: ar\n" -#: templates/inc/footer.tpl:4 -msgid "Code by" -msgstr "" - -#: templates/inc/footer.tpl:6 -msgid "Design by" -msgstr "" - -#: templates/inc/footer.tpl:10 -msgid "Get the code" -msgstr "" - -#: templates/inc/footer.tpl:12 -msgid "Based on" -msgstr "" - -#: templates/inc/footer.tpl:14 -msgid "Donate using Liberapay" -msgstr "" - -#: templates/inc/footer.tpl:14 -msgid "Donate" -msgstr "" - -#: templates/inc/header.tpl:4 -msgid "Switch language" -msgstr "" - -#: templates/inc/header.tpl:21 -msgid "Share on Twitter" -msgstr "" - -#: templates/inc/header.tpl:23 -msgid "Share on Facebook" -msgstr "" +#: templates/error.tpl:6 +msgid "Please check the URL of your video." +msgstr "رجاء راجع الرابط المكتوب" #: templates/playlist.tpl:5 msgid "Videos extracted from" -msgstr "" +msgstr "الفيديوات مستخلصة من" #: templates/playlist.tpl:7 msgid ":" -msgstr "" +msgstr ":" #: templates/playlist.tpl:26 templates/video.tpl:96 templates/video.tpl:99 #: templates/password.tpl:10 templates/index.tpl:19 #: controllers/FrontController.php:315 msgid "Download" -msgstr "" +msgstr "حمل" #: templates/playlist.tpl:27 msgid "More options" -msgstr "" - -#: templates/extractors.tpl:4 controllers/FrontController.php:167 -msgid "Supported websites" -msgstr "" - -#: templates/video.tpl:6 -msgid "You are going to download" -msgstr "" - -#: templates/video.tpl:24 -msgid "Available formats:" -msgstr "" - -#: templates/video.tpl:29 -msgid "Generic formats" -msgstr "" - -#: templates/video.tpl:32 -msgid "Best" -msgstr "" - -#: templates/video.tpl:37 -msgid "Remux best video with best audio" -msgstr "" - -#: templates/video.tpl:41 -msgid "Worst" -msgstr "" - -#: templates/video.tpl:44 -msgid "Detailed formats" -msgstr "" - -#: templates/video.tpl:85 -msgid "Convert into a custom format:" -msgstr "" - -#: templates/video.tpl:91 -msgid "with" -msgstr "" - -#: templates/video.tpl:93 -msgid "kbit/s audio" -msgstr "" - -#: templates/error.tpl:5 -msgid "An error occurred" -msgstr "" - -#: templates/error.tpl:6 -msgid "Please check the URL of your video." -msgstr "" +msgstr "خيارات أكثر" #: templates/password.tpl:5 msgid "This video is protected" -msgstr "" +msgstr "الفيديو محمي عن التحميل" #: templates/password.tpl:6 msgid "You need a password in order to download this video." -msgstr "" +msgstr "تحتاج لكلمة سر كي تستطع تحميل هذا الفيديو" #: templates/password.tpl:8 msgid "Video password" -msgstr "" +msgstr "كلمة سر الفيديو" + +#: templates/extractors.tpl:4 controllers/FrontController.php:167 +msgid "Supported websites" +msgstr "المواقع المدعومة" + +#: templates/video.tpl:6 +msgid "You are going to download" +msgstr "تريد تحميل" + +#: templates/video.tpl:24 +msgid "Available formats:" +msgstr "الصيغ المدعومة" + +#: templates/video.tpl:29 +msgid "Generic formats" +msgstr "الصيغ العامة" + +#: templates/video.tpl:32 +msgid "Best" +msgstr "الأفضل" + +#: templates/video.tpl:37 +msgid "Remux best video with best audio" +msgstr "اجمع الصوت الأفضل مع الفيديو الأفضل جودة" + +#: templates/video.tpl:41 +msgid "Worst" +msgstr "الاسوأ" + +#: templates/video.tpl:44 +msgid "Detailed formats" +msgstr "الصيغ بتعمق أكثر" + +#: templates/inc/footer.tpl:4 +msgid "Code by" +msgstr "برمجه" + +#: templates/inc/footer.tpl:6 +msgid "Design by" +msgstr "صممه" + +#: templates/inc/footer.tpl:10 +msgid "Get the code" +msgstr "للحصول على أصل البرنامج" + +#: templates/inc/footer.tpl:12 +msgid "Based on" +msgstr "مبني على" + +#: templates/inc/header.tpl:21 +msgid "Share on Twitter" +msgstr "شاركها على تويتر" + +#: templates/inc/header.tpl:23 +msgid "Share on Facebook" +msgstr "شاركها على فيسبوك" #: templates/index.tpl:8 msgid "Copy here the URL of your video (Youtube, Dailymotion, etc.)" -msgstr "" +msgstr "انسخ هنا رابط الفيديو (يوتيوب، انستقرام، وغيرها)" #: templates/index.tpl:25 msgid "Audio only (MP3)" -msgstr "" - -#: templates/index.tpl:28 -msgid "From" -msgstr "" - -#: templates/index.tpl:29 -msgid "to" -msgstr "" +msgstr "صوت فقط (MP3)" #: templates/index.tpl:36 msgid "See all supported websites" -msgstr "" +msgstr "لمراجعة جميع المواقع المدعومة" #: templates/index.tpl:38 msgid "Drag this to your bookmarks bar:" -msgstr "" +msgstr "اسحب هذا الموقع لقائمة المفضلة في متصفحك" #: templates/index.tpl:39 msgid "Bookmarklet" -msgstr "" +msgstr "موشر الصفحة" + +#: templates/inc/header.tpl:4 +msgid "Switch language" +msgstr "غير اللغة" + +#: templates/error.tpl:5 +msgid "An error occurred" +msgstr "حصل خطأ ما" + +#: templates/video.tpl:85 +msgid "Convert into a custom format:" +msgstr "حول لصيغة خاصة" + +#: templates/video.tpl:93 +msgid "kbit/s audio" +msgstr "كيلوبايتات صوت" + +#: templates/video.tpl:91 +msgid "with" +msgstr "مع" #: classes/VideoDownload.php:117 msgid "Wrong password" -msgstr "" - -#: classes/VideoDownload.php:158 -msgid "youtube-dl returned an empty URL." -msgstr "" - -#: classes/VideoDownload.php:289 classes/VideoDownload.php:394 -msgid "Can't find avconv or ffmpeg at " -msgstr "" - -#: classes/VideoDownload.php:302 -msgid "Invalid start time: " -msgstr "" - -#: classes/VideoDownload.php:309 -msgid "Invalid end time: " -msgstr "" - -#: classes/VideoDownload.php:359 -msgid "Conversion of playlists is not supported." -msgstr "" +msgstr "كلمة السر خاطئة" #: classes/VideoDownload.php:364 classes/VideoDownload.php:526 msgid "Conversion of M3U8 files is not supported." -msgstr "" - -#: classes/VideoDownload.php:366 -msgid "Conversion of DASH segments is not supported." -msgstr "" +msgstr "تحويل ملفات M3U8 غير مدعوم حاليًا." #: classes/VideoDownload.php:375 classes/VideoDownload.php:412 #: classes/VideoDownload.php:445 classes/VideoDownload.php:478 #: classes/VideoDownload.php:534 msgid "Could not open popen stream." -msgstr "" +msgstr "لم يمكن بدأ Popen" #: classes/VideoDownload.php:502 msgid "Could not open fopen stream." -msgstr "" +msgstr "لم يمكن بدأ fopen" #: controllers/FrontController.php:124 -msgid "" -"Easily download videos from Youtube, Dailymotion, Vimeo and other websites." -msgstr "" +msgid "Easily download videos from Youtube, Dailymotion, Vimeo and other websites." +msgstr "حمل مقاطع الفيديو بكل سهولة من يوتيوب، انستقرام، فيميو وغيره." #: controllers/FrontController.php:168 -msgid "" -"List of all supported websites from which Alltube Download can extract video " -"or audio files" -msgstr "" +msgid "List of all supported websites from which Alltube Download can extract video or audio files" +msgstr "قائمة كل المواقع التي يدعم Alltube Download تحميل الفيديوات أو مقاطع الصوت منها" #: controllers/FrontController.php:193 msgid "Password prompt" -msgstr "" +msgstr "ادخل كلمة السر" #: controllers/FrontController.php:194 -msgid "" -"You need a password in order to download this video with Alltube Download" -msgstr "" +msgid "You need a password in order to download this video with Alltube Download" +msgstr "تحتاج لكلمة السر لكي تستطع تحميل هذا الفيديو باستخدام Alltube Donwload" #: controllers/FrontController.php:311 msgid "Video download" -msgstr "" +msgstr "تحميل الفيديو" #: controllers/FrontController.php:312 msgid "Download video from " -msgstr "" +msgstr "تحميل الفيديو من" #: controllers/FrontController.php:315 msgid "from" -msgstr "" +msgstr "من" #: controllers/FrontController.php:378 msgid "Error" -msgstr "" +msgstr "مشكلة" #: controllers/FrontController.php:450 msgid "You need to enable remux mode to merge two formats." -msgstr "" +msgstr "لابد من اختيار نمط الريمكس ليمكن دمج صيغتين مختلفتين." #: controllers/FrontController.php:525 msgid "Can't find URL of video." -msgstr "" +msgstr "لم أستطع الوجود على رابط الفيديو." + +#: classes/VideoDownload.php:289 classes/VideoDownload.php:394 +msgid "Can't find avconv or ffmpeg at " +msgstr "لم يمكن الوجود على avconv أو ffmpeg في" + +#: templates/inc/footer.tpl:14 +msgid "Donate" +msgstr "تبرع" + +#: classes/VideoDownload.php:158 +msgid "youtube-dl returned an empty URL." +msgstr "Youtube-DL عاد برابط فارغ" + +#: classes/VideoDownload.php:359 +msgid "Conversion of playlists is not supported." +msgstr "تحويل القائمات غير مدعوم حاليًا." + +#: classes/VideoDownload.php:366 +msgid "Conversion of DASH segments is not supported." +msgstr "تحويل مقاطع DASH غير مدعوم حاليًا." + +#: templates/inc/footer.tpl:14 +msgid "Donate using Liberapay" +msgstr "تبرع عن طريق Liberapay" + +#: classes/VideoDownload.php:302 +msgid "Invalid start time: " +msgstr "وقت بداية خاطئ:" + +#: classes/VideoDownload.php:309 +msgid "Invalid end time: " +msgstr "وقت نهاية خاطئ:" + +#: templates/index.tpl:28 +msgid "From" +msgstr "من" + +#: templates/index.tpl:29 +msgid "to" +msgstr "إلى" + From 77c7748d7688ae9ae898cf83bb2bb734ee693019 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Fri, 7 Dec 2018 18:21:46 +0100 Subject: [PATCH 03/19] fixup! feat: Add support for Arabic locale --- Gruntfile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index d5f5825..6850a24 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -90,7 +90,8 @@ module.exports = function (grunt) { 'i18n/zh_CN/LC_MESSAGES/Alltube.mo': 'i18n/zh_CN/LC_MESSAGES/Alltube.po', 'i18n/es_ES/LC_MESSAGES/Alltube.mo': 'i18n/es_ES/LC_MESSAGES/Alltube.po', 'i18n/de_DE/LC_MESSAGES/Alltube.mo': 'i18n/de_DE/LC_MESSAGES/Alltube.po', - 'i18n/pt_BR/LC_MESSAGES/Alltube.mo': 'i18n/pt_BR/LC_MESSAGES/Alltube.po' + 'i18n/pt_BR/LC_MESSAGES/Alltube.mo': 'i18n/pt_BR/LC_MESSAGES/Alltube.po', + 'i18n/ar_001/LC_MESSAGES/Alltube.mo': 'i18n/ar_001/LC_MESSAGES/Alltube.po' } } }, From 22a99e44855a4418a48293c36af5546fe31ab3df Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Wed, 26 Dec 2018 12:01:50 +0100 Subject: [PATCH 04/19] docs(FAQ): Add more info on how to enable remux mode --- resources/FAQ.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/FAQ.md b/resources/FAQ.md index b42f103..db29166 100644 --- a/resources/FAQ.md +++ b/resources/FAQ.md @@ -152,7 +152,11 @@ So AllTube will offer you video-only and audio-only formats in the format list. You then need to merge them together with a tool like ffmpeg. You can also enable the experimental remux mode -that will merge the best video and the best audio format on the fly. +that will merge the best video and the best audio format on the fly: + +```yaml +remux: true +``` ## Convert videos to something other than MP3 From 5463aea2ae0b869446ebfb187057b79dc0397924 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Fri, 28 Dec 2018 19:36:01 +0100 Subject: [PATCH 05/19] docs: Add remux to example config file --- config/config.example.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/config.example.yml b/config/config.example.yml index 529fdba..743a0af 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -37,5 +37,8 @@ uglyUrls: false # True to stream videos through server stream: false +# True to enable remux mode (merge best audio and best video) +remux: false + # MP3 bitrate when converting (in kbit/s) audioBitrate: 128 From 5b7b101a8ad743879cfa10a8f286bd38f3a6df71 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Fri, 28 Dec 2018 20:01:46 +0100 Subject: [PATCH 06/19] refactor(FrontController): We don't need to set the filename twice --- controllers/FrontController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/controllers/FrontController.php b/controllers/FrontController.php index 370d4d8..e0b2633 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -473,15 +473,15 @@ class FrontController } $webpageUrl = $request->getQueryParam('url'); - return $response->withHeader('Content-Disposition', 'attachment; filename="'.pathinfo( - $this->download->getFileNameWithExtension( + return $response->withHeader( + 'Content-Disposition', + 'attachment; filename="'.$this->download->getFileNameWithExtension( 'mkv', $webpageUrl, $format, $this->sessionSegment->getFlash($webpageUrl) - ), - PATHINFO_FILENAME - ).'.mkv"'); + ) + ); } /** From c6cf05f8ec7658767a6d8fcdb35141c64c490426 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sun, 6 Jan 2019 16:59:16 +0100 Subject: [PATCH 07/19] refactor: Move app name to a config variable See #205 --- classes/Config.php | 7 +++++++ config/config.example.yml | 3 +++ controllers/FrontController.php | 1 + templates/inc/head.tpl | 6 +++--- templates/inc/logo.tpl | 2 +- templates/index.tpl | 2 +- 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/classes/Config.php b/classes/Config.php index 40c0de5..2f337ea 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -112,6 +112,13 @@ class Config */ public $avconvVerbosity = 'error'; + /** + * App name + * + * @var string + */ + public $appName = 'AllTube Download'; + /** * YAML config file path. * diff --git a/config/config.example.yml b/config/config.example.yml index 743a0af..9d1c4f4 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -42,3 +42,6 @@ remux: false # MP3 bitrate when converting (in kbit/s) audioBitrate: 128 + +# App name +appName: AllTube Download diff --git a/controllers/FrontController.php b/controllers/FrontController.php index e0b2633..41e8020 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -162,6 +162,7 @@ class FrontController $response, 'extractors.tpl', [ + 'config' => $this->config, 'extractors' => $this->download->listExtractors(), 'class' => 'extractors', 'title' => _('Supported websites'), diff --git a/templates/inc/head.tpl b/templates/inc/head.tpl index 3524870..b4a5cf1 100644 --- a/templates/inc/head.tpl +++ b/templates/inc/head.tpl @@ -10,13 +10,13 @@ {/if} -AllTube Download{if isset($title)} - {$title|escape}{/if} +{$config->appName}{if isset($title)} - {$title|escape}{/if} - + - + diff --git a/templates/inc/logo.tpl b/templates/inc/logo.tpl index 311f294..0b3dade 100644 --- a/templates/inc/logo.tpl +++ b/templates/inc/logo.tpl @@ -1,4 +1,4 @@

-AllTube Download +{$config->appName}

diff --git a/templates/index.tpl b/templates/index.tpl index 99a0c44..d151acb 100644 --- a/templates/index.tpl +++ b/templates/index.tpl @@ -2,7 +2,7 @@ {include file='inc/header.tpl'}
+ alt="{$config->appName}" width="328" height="284">