Explorar o código

Allow disabling per-channel

Zachary Kotlarek %!s(int64=10) %!d(string=hai) anos
pai
achega
bc68440d2b
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      yt/subscribe.pl

+ 8 - 0
yt/subscribe.pl

@@ -253,6 +253,14 @@ if ($SUBSCRIPTIONS) {
 	exit(0);
 }
 
+# Disable all processing if the "skip" file exists
+if (-e 'skip') {
+	if ($DEBUG) {
+		warn("Exiting due to \"skip\" file\n");
+	}
+	exit 0;
+}
+
 # Disable channel fetching if the ID channel is "None"
 if ($ID =~ /^\s*None\s*$/i) {
 	if ($DEBUG) {