Open JayThomason opened 10 years ago
This is actually a really interesting issue. The Artists tab adapter simply runs a DB query with a GROUP BY on artists. So, the view row for each artist is based on a single song row from the DB. If this song entry happens to have album art set, then the album art will appear; if not, no album art will appear.
I'm not sure exactly why different phones seem to retrieve different rows in response to the GROUP BY clause. It may do something arbitrary, like returning the row with the greatest unique ID that meets the group requirement. I'll look into further parameterizing the GROUP BY clause to make things consistent across phones. It may be as simple as adding another SORT BY clause to prioritize displaying song rows that don't have an empty album art field.
It looks like we could also try adding another WHERE clause, specifying that the album art shown on the Artists tab should not be default. However, we'd have to watch out for the case when we're grouping by an artist who has no associated album art whatsoever.
Sorry to blow up the issues page - but the HAVING clause looks like exactly what we need. However, I'm still not sure what to do in the case of retrieving artists who have no non-default album art.
http://www.tutorialspoint.com/sqlite/sqlite_having_clause.htm
I have two comments here which are not technical, but something to keep in mind when we fix this.
The album art that is displayed one both phones is not consistent in the artist view, although it is consistent in the album view. This indicates that the wrong album art is being set at some point in the album art exchange process.