feat: detect double-click launch on Windows and abort with info message (#570)

---------

Co-authored-by: Jens Bergmann <1742418+1cu@users.noreply.github.com>
This commit is contained in:
Sebastian Thomschke
2025-07-05 13:58:24 +02:00
committed by GitHub
parent 14a917a1c7
commit b7882065b7
4 changed files with 196 additions and 1 deletions

View File

@@ -6,8 +6,14 @@ from gettext import gettext as _
import kleinanzeigen_bot
from kleinanzeigen_bot.utils.exceptions import CaptchaEncountered
from kleinanzeigen_bot.utils.launch_mode_guard import ensure_not_launched_from_windows_explorer
from kleinanzeigen_bot.utils.misc import format_timedelta
# --------------------------------------------------------------------------- #
# Refuse GUI/double-click launch on Windows
# --------------------------------------------------------------------------- #
ensure_not_launched_from_windows_explorer()
# --------------------------------------------------------------------------- #
# Main loop: run bot → if captcha → sleep → restart
# --------------------------------------------------------------------------- #