Reset Progress
- Reset progress when "starting" an already completed task - Reset START_TIME if override option was used
This commit is contained in:
parent
1be75f1987
commit
0aa7fd3ec0
2
V4.py
2
V4.py
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue