if prompt("accept? ")[:1].lower() != "y":
sys.exit(1)
name = prompt("canonical name", get.name)
- sexpr = "\"" + r"L~%s[^0-9]*0*%%i([^0-9]*(\[^]]*\]|\([^\)]*\)|v2))*[^0-9]*\.(avi|ogm|mkv|mp4)$" + "\""
+ sexpr = "\"" + r"L~%s[^0-9]*0*%%i([^0-9]*(\[[^]]*\]|\([^\)]*\)|v2))*[^0-9]*\.(avi|ogm|mkv|mp4)$" + "\""
sexpr = sexpr % (name.lower().replace(" ", ".*"))
tty.write("sexpr: %s\n" % (sexpr))
if prompt("accept? ")[:1].lower() != "y":
melen = 2
else:
melen = len(str(get.eps))
- fp.write("rename:auto:%s:$i:move:../autodl/cur/%s\n" % (name, melen, name))
- with open(pj(dl, "sexpr")) as fp:
+ fp.write("rename:auto:%s:%i:move:../autodl/cur/%s\n" % (name, melen, name))
+ with open(pj(dl, "sexpr"), "w") as fp:
fp.write("%s\n" % sexpr)
- with open(pj(dl, "curep")) as fp:
+ with open(pj(dl, "curep"), "w") as fp:
fp.write("1\n")
if get.eps is not None:
- with open(pj(dl, "maxep")) as fp:
+ with open(pj(dl, "maxep"), "w") as fp:
fp.write("%i\n" % get.eps)
if prompt("begin? ")[:1].lower() == "y":
os.unlink(pj(dl, "disabled"))