No wonder playlists and crates tends to break with time

i ran into similar problems when i wrote some custom tools like this: Serato date importer

i would guess that the duplication of the crates in the home folder database happens because that way you can have tracks from different drives in the same crate.

the “Track” table in the home folder database is used for playlists and can be truncated if you don’t have any. i do it like this:

$db_usb = new SQLite3('/Users/me/Music/Engine Library/m.db');
$db_usb->query("DELETE FROM List WHERE type = 1");
$db_usb->query("DELETE FROM ListParentList WHERE listOriginType = 1");
$db_usb->query("DELETE FROM ListTrackList WHERE listType = 1");
$db_usb->query("DELETE FROM Track");