--add option, by request of amiconn.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6350 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
143a8728bf
commit
7254b9cc15
1 changed files with 11 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
|||
my $db = "rockbox.id3db";
|
||||
my $dir;
|
||||
my $strip;
|
||||
my $add;
|
||||
my $verbose;
|
||||
my $help;
|
||||
my $dirisalbum;
|
||||
|
@ -31,6 +32,11 @@ while($ARGV[0]) {
|
|||
shift @ARGV;
|
||||
shift @ARGV;
|
||||
}
|
||||
elsif($ARGV[0] eq "--add") {
|
||||
$add = $ARGV[1];
|
||||
shift @ARGV;
|
||||
shift @ARGV;
|
||||
}
|
||||
elsif($ARGV[0] eq "--verbose") {
|
||||
$verbose = 1;
|
||||
shift @ARGV;
|
||||
|
@ -66,7 +72,7 @@ my $dbver = 2;
|
|||
|
||||
if(! -d $dir or $help) {
|
||||
print "'$dir' is not a directory\n" if ($dir ne "" and ! -d $dir);
|
||||
print "songdb --path <dir> [--dirisalbum] [--dirisalbumname] [--db <file>] [--strip <path>] [--verbose] [--help]\n";
|
||||
print "songdb --path <dir> [--dirisalbum] [--dirisalbumname] [--db <file>] [--strip <path>] [--add <path>] [--verbose] [--help]\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
@ -166,6 +172,10 @@ sub dodir {
|
|||
$path = $1;
|
||||
}
|
||||
|
||||
if ($add ne "") {
|
||||
$path = $add . $path;
|
||||
}
|
||||
|
||||
# Only use one case-variation of each album/artist
|
||||
if (exists($lcalbums{lc($$id3{'ALBUM'})})) {
|
||||
# if another album with different case exists
|
||||
|
|
Loading…
Reference in a new issue