diff options
author | Björn Stenberg <bjorn@haxx.se> | 2004-10-21 22:49:49 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2004-10-21 22:49:49 +0000 |
commit | 3a931c113f88009ba8b468f11bd6ebe3d02a4b70 (patch) | |
tree | 11ec64be56880ae0b83146e7a505d12f7dea8d5c | |
parent | d92ee70088a5cf0b3c5ac898376a3bceb4e63f88 (diff) |
Minor adjustments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5320 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-x | tools/songdb.pl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/songdb.pl b/tools/songdb.pl index f6f9e07e46..88089972d4 100755 --- a/tools/songdb.pl +++ b/tools/songdb.pl @@ -259,6 +259,8 @@ if($db) { $pathindex = 48; # paths always start at index 48 $songindex = $pathindex + $fc; # fc is size of all paths + $songindex++ while ($songindex & 3); # align to 32 bits + dumpint($songindex); # file position index of song table dumpint(scalar(keys %entries)); # number of songs dumpint($maxsonglen); # length of song name field @@ -291,6 +293,10 @@ if($db) { $filenamepos{$f}= $l; $l += length($f)+1; } + while ($l & 3) { + print DB "\x00"; + $l++; + } #### TABLE of songs ### # title of song1 @@ -314,7 +320,7 @@ if($db) { dumpint($a + $albumindex); # pointer to album of this song # pointer to filename of this song - dumpint($filenamepos{$id3->{'FILE'}} + $pathindex); + dumpint($filenamepos{$f} + $pathindex); $$id3{'songoffset'} = $offset; $offset += $songentrysize; @@ -356,7 +362,7 @@ if($db) { for (sort keys %{$artist2albums{$artist}}) { my $id3 = $artist2albums{$artist}{$_}; - my $a = $albumcount{"$$id3{'ALBUM'}___$$id3{'ARTIST'}"} * albumentrysize; + my $a = $albumcount{"$$id3{'ALBUM'}___$$id3{'ARTIST'}"} * $albumentrysize; dumpint($a + $albumindex); } |