Reset Progress

- Reset progress when "starting" an already completed task
- Reset START_TIME if override option was used
This commit is contained in:
Augustin 2022-11-14 22:36:56 +01:00 committed by GitHub
parent 1be75f1987
commit 0aa7fd3ec0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

2
V4.py
View File

@ -828,6 +828,7 @@ def CustomStart(Credentials):
actions = ["tout", "daily", "pc", "mobile", "LogPoint","Fidelite", "dev"] actions = ["tout", "daily", "pc", "mobile", "LogPoint","Fidelite", "dev"]
Actions = enquiries.choose("quels Actions ?", actions, multi=True) Actions = enquiries.choose("quels Actions ?", actions, multi=True)
liste = SelectAccount() liste = SelectAccount()
START_TIME = time() # Reset timer to the start of the actions
with Progress( with Progress(
TextColumn("[progress.description]{task.description}"), TextColumn("[progress.description]{task.description}"),
BarColumn(), BarColumn(),
@ -908,6 +909,7 @@ def unban2():
def StartTask(task): def StartTask(task):
p.start_task(task) p.start_task(task)
p.update(task, advance=0) # Reset the Task if it was already filled to 100%
def ShowTask(task): def ShowTask(task):
p.update(task, visible=True) p.update(task, visible=True)