summaryrefslogtreecommitdiffstats
path: root/tools/songdb.pl
diff options
context:
space:
mode:
authorMichiel Van Der Kolk <not.valid@email.address>2005-04-25 20:42:45 +0000
committerMichiel Van Der Kolk <not.valid@email.address>2005-04-25 20:42:45 +0000
commit7254b9cc1506e2906ba70653fca8ad60b59437c1 (patch)
treeb2205a8714fe92d4f090beab2dfd39de8fb747dd /tools/songdb.pl
parent143a8728bfbae04963edf5f7ef3d96f3484fd30f (diff)
downloadrockbox-7254b9cc1506e2906ba70653fca8ad60b59437c1.tar.gz
rockbox-7254b9cc1506e2906ba70653fca8ad60b59437c1.tar.bz2
rockbox-7254b9cc1506e2906ba70653fca8ad60b59437c1.zip
--add option, by request of amiconn.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6350 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/songdb.pl')
-rwxr-xr-xtools/songdb.pl12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/songdb.pl b/tools/songdb.pl
index a9fc78ee4a..8657e88b52 100755
--- a/tools/songdb.pl
+++ b/tools/songdb.pl
@@ -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