From b34e7e490bf2f5ae09c17db1cd8e5952ac19e6ce Mon Sep 17 00:00:00 2001 From: alfredredbird Date: Sat, 30 Dec 2023 11:58:51 -0800 Subject: [PATCH] added a fallback for if there is no username available --- .gitignore | 1 + brib.py | 8 ++++++-- lang/ar.py | 1 + lang/de.py | 1 + lang/en.py | 1 + lang/es.py | 1 + lang/fr.py | 1 + lang/hi.py | 1 + lang/il.py | 1 + lang/it.py | 1 + lang/ru.py | 1 + modules/configcheck.py | 5 +++-- 12 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5890b09..8623277 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ test.py +crypto.py \ No newline at end of file diff --git a/brib.py b/brib.py index ddeb62e..a2a817a 100644 --- a/brib.py +++ b/brib.py @@ -185,8 +185,12 @@ print(language_module.idk1) # this is the function that starts Alfred. if "-s" in input1: - input2 = input("[Y/N]? ⤷ ") - if input2 != "": + if uname == "": + uname = input("Please enter a target before continuing: ") + uname_list = [item.strip() for item in uname.split(",")] + if uname != "": + input2 = input("[Y/N]? ⤷ ") + if input2 != "": if input2 == "Y" or input2 == "y": modes += input1 inputnum += input2 diff --git a/lang/ar.py b/lang/ar.py index 435d693..d2e8722 100644 --- a/lang/ar.py +++ b/lang/ar.py @@ -75,6 +75,7 @@ "هذا هو إطلاقك الأول: D قد تحتاج إلى إعادة تشغيل Alfred لاستخدام جميع الوحدات" ) warning4 = "أنت تستخدم إصدارًا مسبقًا من Alfred!" +warning5 = "الرجاء إدخال هدف قبل المتابعة:" confirm1 = "هل تريد تنزيل الصور / مقاطع الفيديو؟ [Y / n] ⤷ " confirm2 = "تشغيل مرة أخرى؟ [Y / n] ⤷ " diff --git a/lang/de.py b/lang/de.py index 9c49dc3..608a193 100644 --- a/lang/de.py +++ b/lang/de.py @@ -77,6 +77,7 @@ warning2 = "Die Verwendung des Webscrapers ist ziemlich langsam." warning3 = "Dies ist Ihr erster Start :D Möglicherweise müssen Sie Alfred neu starten, um alle Module nutzen zu können." warning4 = "Sie verwenden eine Vorabversion von Alfred!" +warning5 = "Bitte geben Sie ein Ziel ein, bevor Sie fortfahren: " confirm1 = "Möchten Sie Bilder/Videos herunterladen? [J/n] ⤷ " confirm2 = "Erneut ausführen?: [J/n] ⤷" diff --git a/lang/en.py b/lang/en.py index 7abb259..8a807f5 100644 --- a/lang/en.py +++ b/lang/en.py @@ -71,6 +71,7 @@ warning2 = " Be aware that the web scraper is a bit slow." warning3 = " This is your first launch! :D You may need to restart Alfred for all modules to be available." warning4 = " You are using a pre-release version of Alfred!" +warning5 = "Please enter a target before continuing: " confirm1 = "Want to download images/videos? [Y/n] ⤷ " confirm2 = "Run again? [Y/n] ⤷ " diff --git a/lang/es.py b/lang/es.py index 6e3c38f..e276801 100644 --- a/lang/es.py +++ b/lang/es.py @@ -73,6 +73,7 @@ warning2 = "El uso del web scraper es bastante lento" warning3 = "Este es tu primer lanzamiento :D Es posible que debas reiniciar Alfred para usar todos los módulos" warning4 = "¡Estás usando una versión preliminar de Alfred!" +warning5 = "Por favor, introduzca un objetivo antes de continuar: " confirm1 = "¿Desea descargar imágenes/videos? [Y/n] ⤷ " confirm2 = "¿Ejecutar de nuevo? [Y/n] ⤷ " diff --git a/lang/fr.py b/lang/fr.py index 4207b99..d006697 100644 --- a/lang/fr.py +++ b/lang/fr.py @@ -74,6 +74,7 @@ warning2 = "L'utilisation du Webscraper est assez lente." warning3 = "Ceci est votre premier lancement :D Vous devrez peut-être redémarrer Alfred pour utiliser tous les modules" warning4 = "Vous utilisez une préversion d'Alfred !" +warning5 = "Veuillez entrer une cible avant de continuer: " confirm1 = "Voulez-vous télécharger des images/vidéos ? [Y/n] : ⤷ " confirm2 = "Exécuter à nouveau ? : [Y/n] : ⤷ " diff --git a/lang/hi.py b/lang/hi.py index 5c03451..67054bb 100644 --- a/lang/hi.py +++ b/lang/hi.py @@ -70,6 +70,7 @@ warning2 = "वेबस्क्रैपर का उपयोग करना बहुत धीमा है।" warning3 = "यह आपका पहला लॉन्च है :D सभी मॉड्यूल का उपयोग करने के लिए आपको अल्फ्रेड को पुनरारंभ करने की आवश्यकता हो सकती है" warning4 = "आप अल्फ्रेड के एक प्रीरिलीज़ का उपयोग कर रहे हैं!" +warning5 = "कृपया जारी रखने से पहले एक लक्ष्य दर्ज करें: " confirm1 = "इमेज/वीडियो डाउनलोड करना चाहते हैं? [हां/नहीं] ⤷ " confirm2 = "फिर से चलाएं?: [हां/नहीं] ⤷ " diff --git a/lang/il.py b/lang/il.py index 368bee9..49365c0 100644 --- a/lang/il.py +++ b/lang/il.py @@ -73,6 +73,7 @@ "זו ההשקה הראשונה שלך :D אולי תצטרך להפעיל מחדש את אלפרד כדי להשתמש בכל המודולים" ) warning4 = " אתה משתמש במהדורה מוקדמת של אלפרד!" +warning5 = "הזן יעד לפני שתמשיך: " confirm1 = "רוצה להוריד תמונות/סרטונים? [Y/n] ⤷ " confirm2 = "רוץ שוב?: [Y/n] ⤷ " diff --git a/lang/it.py b/lang/it.py index 05dfc47..3b4d6c8 100644 --- a/lang/it.py +++ b/lang/it.py @@ -77,6 +77,7 @@ warning2 = " L'utilizzo del webscraper è piuttosto lento." warning3 = " Questo è il tuo primo lancio :D Potrebbe essere necessario riavviare Alfred per utilizzare tutti i moduli" warning4 = " Stai usando un Prerelease di Alfred!" +warning5 = "Inserisci un target prima di continuare: " confirm1 = "Vuoi scaricare immagini/video? [Y/n] ⤷ " confirm2 = "Eseguire di nuovo?: [Y/n] ⤷ " diff --git a/lang/ru.py b/lang/ru.py index 8290666..b7e9c36 100644 --- a/lang/ru.py +++ b/lang/ru.py @@ -73,6 +73,7 @@ warning2 = " Использование веб-скрапинга довольно медленное." warning3 = " Это ваш первый запуск :D Возможно, вам потребуется перезапустить Alfred, чтобы использовать все модули" warning4 = " Вы используете предварительную версию Alfred!" +warning5 = "Пожалуйста, введите цель, прежде чем продолжить: " confirm1 = "Хотите загрузить изображения/видео? [Y/n] ⤷ " confirm2 = "Запустить еще раз?: [Y/n] ⤷ " diff --git a/modules/configcheck.py b/modules/configcheck.py index 1620aaf..214e0a5 100644 --- a/modules/configcheck.py +++ b/modules/configcheck.py @@ -177,16 +177,17 @@ def create_folders(folder_list, language_module): def display_options(config, section,language_module): print("Options:") - print("=====================================") + print("=====================================================") print(f"{language_module.configOption1} {config.get('main', 'checkforupdates')}") print(f"{language_module.configOption2} {config.get('Personalizations', 'showtips')}") print(f"{language_module.configOption3} {config.get('main', 'defaultdlpath')}") print(f"{language_module.configOption4} {config.get('main', 'browser')}") print(f"{language_module.configOption5} {config.get('main', 'language')}") print(f"{language_module.configOption6} {config.get('Personalizations', 'colorscheme')}") + print("=====================================================") print(f"{language_module.configOptionA} ") print(f"{language_module.configOptionB} ") - print("=====================================") + print("=====================================================") def update_config(config, section, option_key, new_value): config.set(section, option_key, str(new_value))