1INSERT OR IGNORE INTO FileType(Name,ContentType) VALUES('MP3','mpeg');
2INSERT OR IGNORE INTO Plugin(Library) VALUES('libharpmp3.so');
3INSERT INTO PluginType(TypeID,PluginID)
4SELECT TypeID,(SELECT PluginID FROM Plugin WHERE Library='libharpmp3.so')
5FROM FileType WHERE Name='MP3';
6
7INSERT OR IGNORE INTO FileExtension(TypeID,Extension)
8SELECT TypeID,'mp3' FROM FileType WHERE Name='MP3' LIMIT 1;
9
10DELETE FROM PluginType WHERE PluginTypeID IN
11(SELECT DISTINCT a.PluginTypeID FROM PluginType a, PluginType b
12WHERE a.TypeID=b.TypeID AND a.PluginID=b.PluginID AND
13a.PluginTypeID>b.PluginTypeID);
14