summaryrefslogtreecommitdiffstats
path: root/tools/songdb.pl
diff options
context:
space:
mode:
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