예제 #1
0
파일: home.py 프로젝트: qwerdy/MyFlexget
def sched(day):
    if not sess.mysched or not sess.myep:
        abort(403)

    if day not in ("today", "tomorrow"):
        flash("Day is not supported!", "error")
    else:
        if generateyml(day=day, notify=False):
            flash("Scheduled created for %s" % day)
        else:
            flash("Failed to create schedule for %s" % day, "error")

    return redirect("/config")
예제 #2
0
파일: home.py 프로젝트: qwerdy/MyFlexget
def new(day):
    if not sess.mysched or not sess.myep:
        abort(403)

    if day not in ("today", "tomorrow", "yesterday"):
        flash("Day is not supported!", "error")
    else:
        if generateyml(sched=False, day=day):
            flash("Generated yml file for %s" % day)
        else:
            flash("Failed to generated yml file for %s" % day, "error")

    return redirect("/config")