There shouldn't be any duplicates, so I should probably remove duplicates that look exactly the same in the refresh operation that is executed at startup and after rescans.
The reason the url column can't be primary key is that it might not be unique in all situations. The problem is mainly when you have renamed and moved stuff or added/deleted musicbrainz tags. The problem is that the refresh operation is executed in several steps, and it is possible that two entries will get the same url value during this process. My guess is that the most common situation when this happens is when it creates a duplicate such as the ones you have seen. It is probably possible to rewrite this refresh logic so it will work with url as primary key, the problem is just that this will probably result in that the refresh operation gets slower in a large library. It's not currently a priority for me to fix this, but patches are always welcome. I'll add to the todo list to see if it is possible to remove duplicates without loosing too much performance in the refresh operation. The reason you are seeing more entries in the backup file might be that it also contains data from the track_history table. The track_history table contains historical values and will very often contain several entries for the same url, but with different values of course. -- erland Erland Isaksson 'My homepage' (http://erland.homeip.net) 'My download page' (http://erland.homeip.net/download) (Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse, Custom Scan, Custom Skip, Multi Library and Database Query plugins' (http://wiki.erland.homeip.net/index.php/Category:SlimServer)) ------------------------------------------------------------------------ erland's Profile: http://forums.slimdevices.com/member.php?userid=3124 View this thread: http://forums.slimdevices.com/showthread.php?t=39947 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/lists/listinfo/plugins
