From 03c0ff74137f5f3f25398f74cc9fda7828bddda3 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sat, 18 Feb 2012 22:04:00 +0100 Subject: sort -> move --- videoadd.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/videoadd.pl b/videoadd.pl index c26f227..f7c784b 100755 --- a/videoadd.pl +++ b/videoadd.pl @@ -55,7 +55,7 @@ videoadd.pl - add movies to your collection =head1 SYNOPSIS -B [B<-s>] [B<-u>] [B<--ignore-db>] [B<--dont-sort>] [B<-i> I] +B [B<-s>] [B<-u>] [B<--ignore-db>] [B<--dont-move>] [B<-i> I] [B<-o> I...] [B<--only=>I...] [B<--exclude=>I...] [B<-q>] (I|I|I<id>|I<IMDBID>) @@ -91,7 +91,7 @@ from IMDB (option B<-i>). If there is a clash (e.g., language) the metadata take precedence. The database is then updated with the new movie (unless B<--ignore-db> is set), which in turn is put in the right place of the above hierarchy -(unless B<--dont-sort> is set). +(unless B<--dont-move> is set). The argument is matched against the file names, titles, IDs and IMDBIDs of your database. If an entry is found, then the database is merely updated @@ -114,7 +114,7 @@ Mark the movie as unseen for the I<userid> of the configuration file. Do not connect to the database, hence do not update it with the new movie. Note that it may break the sanity of your collection. -=item B<--dont-sort> +=item B<--dont-move> Do not put the new movie in I<DIRECTORS/director/movie>, with a symlink I<MOVIES/movie> -> I<DIRECTORS/director/movie>. @@ -205,14 +205,14 @@ Copyright 2012 Guilhem Moulin. See the source for copying conditions. my $ignoredb_flag; my $seen_flag; my $unseen_flag; -my $sort_flag = 1; +my $move_flag = 1; my %options; my @only; my @exclude; GetOptions( "s|seen" => \$seen_flag , "u|unseen" => \$unseen_flag , "ignore-db" => \$ignoredb_flag - , "dont-sort" => sub { undef $sort_flag } + , "dont-move" => sub { undef $move_flag } , "i|imdb=s" => sub { $imdb{crit} = $_[1] } , "o=s" => sub { my ($k,$v) = split /=/, $_[1], 2; $options{lc $k} = $v; } @@ -502,9 +502,9 @@ unless ( defined $ignoredb_flag ) { ################################################################################ -# Sort the file +# Move the file in the collection -if ( defined ($file) and defined ($sort_flag) ) { +if ( defined ($file) and defined ($move_flag) ) { if (defined $new{director}) { my $dir = catdir ( $directors, $new{director} ); unless (-d $dir) { @@ -640,7 +640,7 @@ sub getfile { unless defined $imdbid; $imdb{crit} = $imdbid; } - undef $sort_flag; + undef $move_flag; return catfile($config{videodir}, 'MOVIES', $res->[0]->[2]); } -- cgit v1.2.3