Zachary Kotlarek 14 tahun lalu
induk
melakukan
b5c84068b4
2 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 2 2
      torrentMonitored.pl
  2. 1 1
      transmission.pl

+ 2 - 2
torrentMonitored.pl

@@ -96,11 +96,11 @@ for my $BASE_DIR (@BASE_DIRS) {
 }
 
 # Print results
-if ($prg =~ /NULL/i) {
+if ($prg && $prg =~ /NULL/i) {
 	foreach my $show (@monitored) {
 		print $show . "\0";
 	}
-} elsif ($prg =~ /STORE/i) {
+} elsif ($prg && $prg =~ /STORE/i) {
 	my %shows = ();
 	foreach my $show (@monitored) {
 		$shows{ basename(dirname($show)) } = 1;

+ 1 - 1
transmission.pl

@@ -297,7 +297,7 @@ sub getDest($$$$) {
 			$course_match = 1;
 		} else {
 			my $search_name = '';
-			my $file = $tvDir . '/' . $showsCan{$show} . '/search_name';
+			my $file        = $tvDir . '/' . $showsCan{$show} . '/search_name';
 			if (-e $file) {
 				open(FH, $file)
 				  or die('Unable to read search_name file: ' . $file . "\n");