forked from len0rd/rockbox
--nocrc to disable CRC checksums
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7378 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7bf97cf91f
commit
9757dc1bea
1 changed files with 12 additions and 0 deletions
|
@ -17,6 +17,7 @@ my $verbose;
|
||||||
my $help;
|
my $help;
|
||||||
my $dirisalbum;
|
my $dirisalbum;
|
||||||
my $dirisalbumname;
|
my $dirisalbumname;
|
||||||
|
my $crc = 1;
|
||||||
|
|
||||||
while($ARGV[0]) {
|
while($ARGV[0]) {
|
||||||
if($ARGV[0] eq "--db") {
|
if($ARGV[0] eq "--db") {
|
||||||
|
@ -43,6 +44,10 @@ while($ARGV[0]) {
|
||||||
$verbose = 1;
|
$verbose = 1;
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
}
|
}
|
||||||
|
elsif($ARGV[0] eq "--nocrc") {
|
||||||
|
$crc = 0;
|
||||||
|
shift @ARGV;
|
||||||
|
}
|
||||||
elsif($ARGV[0] eq "--dirisalbum") {
|
elsif($ARGV[0] eq "--dirisalbum") {
|
||||||
$dirisalbum = 1;
|
$dirisalbum = 1;
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
|
@ -87,6 +92,9 @@ Options:
|
||||||
--db <file> What to call the output file. Defaults to rockbox.tagdb
|
--db <file> What to call the output file. Defaults to rockbox.tagdb
|
||||||
--strip <path> Removes this string from the left of all file names
|
--strip <path> Removes this string from the left of all file names
|
||||||
--add <path> Adds this string to the left of all file names
|
--add <path> Adds this string to the left of all file names
|
||||||
|
--nocrc Disables the CRC32 checksums. It makes the output database not
|
||||||
|
suitable for runtimedb but it makes this script run much
|
||||||
|
faster.
|
||||||
--verbose Shows more details while working
|
--verbose Shows more details while working
|
||||||
--help This text
|
--help This text
|
||||||
MOO
|
MOO
|
||||||
|
@ -182,6 +190,10 @@ sub crc32 {
|
||||||
|
|
||||||
my $len = 32*1024;
|
my $len = 32*1024;
|
||||||
|
|
||||||
|
if(!$crc) {
|
||||||
|
return 1; # fixed bad CRC when disabled!
|
||||||
|
}
|
||||||
|
|
||||||
if(!open(FILE, "<$filename")) {
|
if(!open(FILE, "<$filename")) {
|
||||||
print "failed to open \"$filename\" $!\n";
|
print "failed to open \"$filename\" $!\n";
|
||||||
return -2;
|
return -2;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue