瀏覽代碼

Allow folders to disable themselves

Zachary Kotlarek 11 年之前
父節點
當前提交
98f470ec81
共有 1 個文件被更改,包括 8 次插入 和 0 次删除
  1. 8 0
      yt/subscribe.pl

+ 8 - 0
yt/subscribe.pl

@@ -154,6 +154,14 @@ if ($NAME =~ /^(.*)\s\(([\w\-]+)\)$/) {
 	die('Invalid folder: ' . $DIR . "\n");
 }
 
+# Allow folders to disable themselves
+if (-e "${DIR}/season_done") {
+	if ($DEBUG) {
+		print STDERR "Folder disabled. Exiting...\n";
+	}
+	exit(0);
+}
+
 # Move to the target directory so we can use relative paths later
 chdir($DIR) or die('Unable to chdir to: ' . $DIR . "\n");