diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/songdb.pl | 12 |
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 @@ | |||
10 | my $db = "rockbox.id3db"; | 10 | my $db = "rockbox.id3db"; |
11 | my $dir; | 11 | my $dir; |
12 | my $strip; | 12 | my $strip; |
13 | my $add; | ||
13 | my $verbose; | 14 | my $verbose; |
14 | my $help; | 15 | my $help; |
15 | my $dirisalbum; | 16 | my $dirisalbum; |
@@ -31,6 +32,11 @@ while($ARGV[0]) { | |||
31 | shift @ARGV; | 32 | shift @ARGV; |
32 | shift @ARGV; | 33 | shift @ARGV; |
33 | } | 34 | } |
35 | elsif($ARGV[0] eq "--add") { | ||
36 | $add = $ARGV[1]; | ||
37 | shift @ARGV; | ||
38 | shift @ARGV; | ||
39 | } | ||
34 | elsif($ARGV[0] eq "--verbose") { | 40 | elsif($ARGV[0] eq "--verbose") { |
35 | $verbose = 1; | 41 | $verbose = 1; |
36 | shift @ARGV; | 42 | shift @ARGV; |
@@ -66,7 +72,7 @@ my $dbver = 2; | |||
66 | 72 | ||
67 | if(! -d $dir or $help) { | 73 | if(! -d $dir or $help) { |
68 | print "'$dir' is not a directory\n" if ($dir ne "" and ! -d $dir); | 74 | print "'$dir' is not a directory\n" if ($dir ne "" and ! -d $dir); |
69 | print "songdb --path <dir> [--dirisalbum] [--dirisalbumname] [--db <file>] [--strip <path>] [--verbose] [--help]\n"; | 75 | print "songdb --path <dir> [--dirisalbum] [--dirisalbumname] [--db <file>] [--strip <path>] [--add <path>] [--verbose] [--help]\n"; |
70 | exit; | 76 | exit; |
71 | } | 77 | } |
72 | 78 | ||
@@ -166,6 +172,10 @@ sub dodir { | |||
166 | $path = $1; | 172 | $path = $1; |
167 | } | 173 | } |
168 | 174 | ||
175 | if ($add ne "") { | ||
176 | $path = $add . $path; | ||
177 | } | ||
178 | |||
169 | # Only use one case-variation of each album/artist | 179 | # Only use one case-variation of each album/artist |
170 | if (exists($lcalbums{lc($$id3{'ALBUM'})})) { | 180 | if (exists($lcalbums{lc($$id3{'ALBUM'})})) { |
171 | # if another album with different case exists | 181 | # if another album with different case exists |