From f7bd9b51138dbccb7cc2fd27f07ef66d5d2d79cf Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 22 Dec 2019 04:26:22 +0100 Subject: [PATCH] anndl: Fixed a couple of bugs. --- anndl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/anndl b/anndl index 1290a0b..8957d6e 100755 --- a/anndl +++ b/anndl @@ -85,7 +85,7 @@ def main(argv): 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": @@ -109,13 +109,13 @@ def main(argv): 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")) -- 2.11.0