X-Git-Url: http://git.pippins.net/embedvideo/.git/static/%24link?a=blobdiff_plain;f=organize_videos;h=05edab463cb246cba2357155bd67c6985c5ed1bc;hb=26e29c4b2a1ba5181b379a64c86f4d521d77dcf7;hp=34fd2e6b66cbcc67ac36b0744905bd375fd77a0c;hpb=bfa24cc8c0228028cae669b2fa0adddef10470ae;p=videoscripts%2F.git
diff --git a/organize_videos b/organize_videos
index 34fd2e6..05edab4 100755
--- a/organize_videos
+++ b/organize_videos
@@ -67,6 +67,7 @@ sub usage {
print " -d
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;
@@ -127,9 +128,10 @@ $video_files_found=`$find_cmd_with_mkv`;
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 => "$$"});
@@ -233,7 +235,6 @@ foreach $file (`$find_mkv`) {
}
$dstfile = "$newfile.$ext";
-
if(defined $opt_t) {
print "-> Moving \"$srcdir/$srcfile\" to \"$dstfile\"\n";
} else {