Hey, good news!
I managed to recover my database. I used a Ruby script to parse the database-file and store the information in a newly generated custominfo.txt. It's a dirty hack, but it worked for me. Until now I just implemented the recovery of the two values "RATING" and "PLAY_COUNTER" but every other value would be just the same.
If you should use the script it might happen that you'll have to customize the first line in the text file after it's generation. Just refer to an original custominfo.txt what's the right value there.
Feel free to ask if you should have the same problem and you're not able to use the script sucessfuly.
P.S: Thanks to Slotos, who offered to help me (and had exactly the same idea that I had )
edit: There seems to be a little problem with songs that are divided into subsongs: The meta information for the first track is not restored. I'll look over this issue...
file = File.open('custominfo_sqlite.db',"r")
raw = file.readlines("file")
data = Array.new()
raw.each { |temp|
if temp.include? "RATING"
pos = temp.index("RATING")
if temp[pos-1,1].unpack('c')[0] > 50
url = "file"+temp[0..pos-1]
subsong = "0"
else
url = "file"+temp[0..pos-2]
subsong = temp[pos-1,1].unpack('c')[0]
end
name = "RATING"
value = temp[pos+6,3].to_i.to_s
data << [url,subsong,name,value]
elsif temp.include? "PLAY_COUNTER"
pos = temp.index("PLAY_COUNTER")
if temp[pos-1,1].unpack('c')[0] > 50
url = "file"+temp[0..pos-1]
subsong = "0"
else
url = "file"+temp[0..pos-2]
subsong = temp[pos-1,1].unpack('c')[0]
end
name = "PLAY_COUNTER"
value = temp[pos+12,3].to_i.to_s
data << [url,subsong,name,value]
end
}
file.close()
raw = nil
output = File.open('temp.dat','w')
count = 0
while true
temp = data.pop
break if temp == nil
count += 1
url = temp[0]
subsong = temp[1]
names = [temp[2]]
values = [temp[3]]
remi = Array.new()
data.size.times { |i|
if data[i][0] == url && subsong == data[i][1]
if names.include?(data[i][2])
remi << i
values[names.index(data[i][2])] = [values[names.index(data[i][2])],data[i][3]].max
else
remi << i
names << data[i][2]
values << data[i][3]
end
end
}
remi.reverse!
remi.each { |i|
data.delete_at(i)
}
output << "#{url}\x0D\x0A#{subsong}\x0D\x0A#{names.size}\x0D\x0A"
names.size.times { |i|
output << "#{names[i].size}\x0D\x0A#{names[i]}\x0D\x0A#{values[i].size}\x0D\x0A#{values[i]}\x0D\x0A"
}
end
output.close()
output = File.open('custominfo.txt','w')
output << "D08C788A-7F13-40C5-B3B2-E4B4ED99E6F7\x0D\x0A#{count}\x0D\x0A" << IO.read("temp.dat")
unlink("temp.dat")