From 7254b9cc1506e2906ba70653fca8ad60b59437c1 Mon Sep 17 00:00:00 2001 From: Michiel Van Der Kolk Date: Mon, 25 Apr 2005 20:42:45 +0000 Subject: --add option, by request of amiconn. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6350 a1c6a512-1295-4272-9138-f99709370657 --- tools/songdb.pl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tools') 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 [--dirisalbum] [--dirisalbumname] [--db ] [--strip ] [--verbose] [--help]\n"; + print "songdb --path [--dirisalbum] [--dirisalbumname] [--db ] [--strip ] [--add ] [--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 -- cgit v1.2.3