I've added a check in BaseSQLTableModel to ensure a track is present in BaseTrackCache (by querying for it) before BaseTrackCache::data() is called. This prevents the blank entry problem from becoming user-facing, but it is still not very efficient because it will generate 1 query per track missing from BTC.
Daniel -- as you mentioned, clearing the BaseTrackCache after re-scan is also not the best solution. I'm working on adding signals about exactly which tracks are added/removed so that we don't have to do that.
I've added a check in BaseSQLTableModel to ensure a track is present in BaseTrackCache (by querying for it) before BaseTrackCache: :data() is called. This prevents the blank entry problem from becoming user-facing, but it is still not very efficient because it will generate 1 query per track missing from BTC.
Daniel -- as you mentioned, clearing the BaseTrackCache after re-scan is also not the best solution. I'm working on adding signals about exactly which tracks are added/removed so that we don't have to do that.