Ver código fonte

Whine less when ignoring bad downloads

Zachary Kotlarek 12 anos atrás
pai
commit
92ed3164a5
1 arquivos alterados com 7 adições e 3 exclusões
  1. 7 3
      transmission.pl

+ 7 - 3
transmission.pl

@@ -534,15 +534,19 @@ sub processFile($$) {
 	my $ext = &guessExt($file);
 	my $filename = basename($file);
 
-	# Delete WMV files -- mostly viruses
+	# Delete WMV files -- mostly viruses/fake
 	if ($ext =~ /wmv/i) {
-		print STDERR 'Declining to save WMV file: ' . $filename . "\n";
+		if ($DEBUG) {
+			print STDERR 'Declining to save WMV file: ' . $filename . "\n";
+		}
 		return -1;
 	}
 
 	# Delete ZIP files -- mostly fake
 	if ($ext =~ /zip/i) {
-		print STDERR 'Declining to save ZIP file: ' . $filename . "\n";
+		if ($DEBUG) {
+			print STDERR 'Declining to save ZIP file: ' . $filename . "\n";
+		}
 		return -1;
 	}