Disable when faulty.
[utils.git] / autodlctl
index 1b52a58..b3c914c 100755 (executable)
--- a/autodlctl
+++ b/autodlctl
@@ -18,6 +18,7 @@ function getnext
     else
        echo "no available episode of $tag" >&2
        echo "$tag" >>"$HOME/dc/autodl/faulty"
+       touch "$d/.autodl/disabled"
        return 1
     fi
     unset badsizesl
@@ -38,7 +39,7 @@ function getnext
     fi
     infofile="$d/.autodl/rtinfo"
     estatfile="$d/.autodl/estat"
-    args=(-e "$fsexpr" -t "$tag $curep" -I "$infofile" -E "$estat" -x "curep=$curep")
+    args=(-e "$fsexpr" -t "$tag $curep" -I "$infofile" -E "$estatfile" -x "curep=$curep")
     if [ -e "$d/.autodl/wait" ]; then
        args=("${args[@]}" -w)
     fi