Code cleanup

This commit is contained in:
simon987
2018-04-21 13:27:13 -04:00
parent 4eb9cf6b63
commit 87f35571fa
20 changed files with 811 additions and 856 deletions

10
run.py
View File

@@ -263,13 +263,6 @@ def get_current_task():
return ""
@app.route("/task/current/cancel")
def cancel_current_task():
tm.cancel_task()
return redirect("/task")
@app.route("/task/add")
def task_add():
type = request.args.get("type")
@@ -284,6 +277,9 @@ def task_add():
def task_del(task_id):
storage.del_task(task_id)
if tm.current_task is not None and task_id == tm.current_task.task.id:
tm.cancel_task()
return redirect("/task")