To Import PLAY_STAMP timeline
export your lib via http://www.foobar2000.org/components/view/foo_texttools in a textfile
enter the following syntax into texttools and save it as file
$if(%FINGERPRINT_FOOID%,$crc32(%FINGERPRINT_FOOID%),$crc32($lower([%artist%][%album%][%title%])))|[%artist%]|[%album%]|[%title%]|$if(%FOO_ARTIST_ID%,%FOO_ARTIST_ID%,$crc32($lower([%artist%])))|$if(%FOO_ALBUM_ID%,%FOO_ALBUM_ID%,$crc32($lower([%album%])))|
%play_count%|%first_played%|%last_played%|[%PLAY_STAMP%]
(Scheme: Trackid|artist|album|title|artistid|albumid|playcount|first played|last played|play stamp )
now process the textfile with php or any other language
pseudo php code:
$csv = "1234|artist|album...";
// transform csv to array
/*
$csvArr[0]['trackid'] = "1234";
...
$csvArr[0]['play_stamp'] = "date1,date2,date3";
$csvArr[1]['trackid'] = "3456";
...
$csvArr[1]['play_stamp'] = "date1,date2,date3";
*/
// loop over array
foreach($csvArr as $key => $value)
{
$playstampArr = explode(",",$csvArr[$key][play_stamp]);
foreach($playstampArr as $k => $v){
// build correct SQL statement with (name/value pairs)
$sql[] = "INSERT OR REPLACE INTO playcount(trackid,artist,album...playtime) VALUES (".$csvArr[$key][trackid].",'".$csvArr[$key][artist]."','".$csvArr[$key][album]."','".$v."')"; // $v is the playdate value
}
}
echo implode("\n",$sql);
now import the text into sqlite db with firefox extension sqlite manager
you have to process the textvalues for the sqlstatement and mask ' in titlenames with double ' something like this
It's over => It''s over
That's the way I would do it.
cheers