diff --git a/.gitignore b/.gitignore index 4cf0582..b58fe13 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ icon.ico Multi-Installer.exe +dist/ Browsers/ Social Media/ \ No newline at end of file diff --git a/data/main_functions.py b/data/main_functions.py index 22e8786..fb59b0e 100644 --- a/data/main_functions.py +++ b/data/main_functions.py @@ -37,7 +37,7 @@ def table_gen() -> Table: return table - async def check_link_statuses(self) -> None: + def check_link_statuses(self) -> None: def check_link_status(choice: Choice, table: Table) -> None: try: r = requests.head( diff --git a/dist/config.json b/dist/config.json deleted file mode 100644 index 4ec7a80..0000000 --- a/dist/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "cleanup": false -} \ No newline at end of file diff --git a/main.py b/main.py index 90ef900..0fadc6c 100644 --- a/main.py +++ b/main.py @@ -16,16 +16,14 @@ def exit_program() -> None: print(Align.center("[bold red]Exiting...")) - exit() + exit(1) def main() -> None: commands: Dict[str, Callable[[], None]] = { "settings": main_functions.display_settings, "status": main_functions.check_link_statuses, - "exit": exit_program, "quit": exit_program, - "stop": exit_program, } while True: @@ -54,6 +52,9 @@ def main() -> None: if user_choice.lower() in commands: commands[user_choice.lower()]() + elif user_choice not in choices.keys(): + print(Align.center(f"[bold red]Invalid choice")) + return main() elif user_choice in choices.keys(): main_functions.download_and_run(user_choice) main_functions.clean_up_files(user_choice, Path(__file__).resolve().parent) @@ -62,4 +63,5 @@ def main() -> None: if __name__ == "__main__": os.system("cls" if os.name == "nt" else "clear") side_functions.clean_up_cache() + main()