summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-08-21 22:20:57 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-08-21 22:20:57 +0000
commit9757dc1bea98f8a931f2e774c71c1c4db2bf8dcd (patch)
tree31d829988f8562b6a0dbc2a0377a0a26f9fe6d05
parent7bf97cf91ff3758d2ae5bd689701fd3ede858bea (diff)
downloadrockbox-9757dc1bea98f8a931f2e774c71c1c4db2bf8dcd.tar.gz
rockbox-9757dc1bea98f8a931f2e774c71c1c4db2bf8dcd.zip
--nocrc to disable CRC checksums
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7378 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-xtools/songdb.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/songdb.pl b/tools/songdb.pl
index b2ab78082a..5a3f0e985c 100755
--- a/tools/songdb.pl
+++ b/tools/songdb.pl
@@ -17,6 +17,7 @@ my $verbose;
17my $help; 17my $help;
18my $dirisalbum; 18my $dirisalbum;
19my $dirisalbumname; 19my $dirisalbumname;
20my $crc = 1;
20 21
21while($ARGV[0]) { 22while($ARGV[0]) {
22 if($ARGV[0] eq "--db") { 23 if($ARGV[0] eq "--db") {
@@ -43,6 +44,10 @@ while($ARGV[0]) {
43 $verbose = 1; 44 $verbose = 1;
44 shift @ARGV; 45 shift @ARGV;
45 } 46 }
47 elsif($ARGV[0] eq "--nocrc") {
48 $crc = 0;
49 shift @ARGV;
50 }
46 elsif($ARGV[0] eq "--dirisalbum") { 51 elsif($ARGV[0] eq "--dirisalbum") {
47 $dirisalbum = 1; 52 $dirisalbum = 1;
48 shift @ARGV; 53 shift @ARGV;
@@ -87,6 +92,9 @@ Options:
87 --db <file> What to call the output file. Defaults to rockbox.tagdb 92 --db <file> What to call the output file. Defaults to rockbox.tagdb
88 --strip <path> Removes this string from the left of all file names 93 --strip <path> Removes this string from the left of all file names
89 --add <path> Adds this string to the left of all file names 94 --add <path> Adds this string to the left of all file names
95 --nocrc Disables the CRC32 checksums. It makes the output database not
96 suitable for runtimedb but it makes this script run much
97 faster.
90 --verbose Shows more details while working 98 --verbose Shows more details while working
91 --help This text 99 --help This text
92MOO 100MOO
@@ -182,6 +190,10 @@ sub crc32 {
182 190
183 my $len = 32*1024; 191 my $len = 32*1024;
184 192
193 if(!$crc) {
194 return 1; # fixed bad CRC when disabled!
195 }
196
185 if(!open(FILE, "<$filename")) { 197 if(!open(FILE, "<$filename")) {
186 print "failed to open \"$filename\" $!\n"; 198 print "failed to open \"$filename\" $!\n";
187 return -2; 199 return -2;