print " -d <dir> directory to recreate the playlists in. Only needed if -p option is given\n";
return 1;
}
+$SIG{'INT'} = sub {die "-E- Killed by CTRL-C\n"};
sub is_folder_empty {
my $dirname = shift;
if(!$video_files_found) { exit 0; }
# Only proceed if no files have changed in the past $cmin minutes
-if($opt_f) { $find_changed_cmd =~ s/cmin \S+ /cmin +0 /; }
-$changed_files_found=`$find_changed_cmd`;
-if($changed_files_found) { exit 0; }
+if(! $opt_f) {
+ $changed_files_found=`$find_changed_cmd`;
+ if($changed_files_found) { exit 0; }
+}
# Only one instance of this script running at a time
my $pidfile = File::Pid->new({file => "$pid_file", pid => "$$"});
}
$dstfile = "$newfile.$ext";
-
if(defined $opt_t) {
print "-> Moving \"$srcdir/$srcfile\" to \"$dstfile\"\n";
} else {