diff --git a/GramAddict/core/bot_flow.py b/GramAddict/core/bot_flow.py index 7ddde32e..a558faf8 100644 --- a/GramAddict/core/bot_flow.py +++ b/GramAddict/core/bot_flow.py @@ -41,6 +41,7 @@ open_instagram, pre_post_script, print_telegram_reports, + restart_atx_agent, save_crash, set_time_delta, show_ending_conditions, @@ -119,6 +120,8 @@ def start_bot(**kwargs): if not inside_working_hours: wait_for_next_session(time_left, session_state, sessions, device) pre_post_script(path=configs.args.pre_script) + if configs.args.restart_atx_agent: + restart_atx_agent(device) get_device_info(device) session_state = SessionState(configs) session_state.set_limits_session() diff --git a/GramAddict/plugins/core_arguments.py b/GramAddict/plugins/core_arguments.py index 836ecc6c..044d6861 100644 --- a/GramAddict/plugins/core_arguments.py +++ b/GramAddict/plugins/core_arguments.py @@ -210,6 +210,11 @@ def __init__(self): "help": "kill atx-agent when the script ends", "action": "store_true", }, + { + "arg": "--restart-atx-agent", + "help": "restart atx-agent before the script starts", + "action": "store_true", + }, { "arg": "--interact", "nargs": "+", diff --git a/config-examples/config.yml b/config-examples/config.yml index a517fa4f..39169a23 100644 --- a/config-examples/config.yml +++ b/config-examples/config.yml @@ -19,6 +19,7 @@ speed-multiplier: 1 debug: false close-apps: false kill-atx-agent: false +restart-atx-agent: false disable-block-detection: false disable-filters: false dont-type: false