Open JayThomason opened 10 years ago
This sounds like a good idea so long as some band doesn't have different songs with the same name but different capitalization! It's probably not an issue. I'll go ahead and implement this for now.
Another thing I realized: our DB has a unique constraint on the Artist + Album + Song columns, not on the Hash Code column. We'll have to change that if we want to detect overlap as we're adding songs.
I think I already changed the Hash Code function but still didn't solve the problem because of the DB uniqueness constraint.
Idea: Modify the DB.addSong() function to check if a song in the database has the same hash code. If so, add another IP address to the _ip column for that song, separated by a delimiter. Now, when retrieving songs from the DB, we can highlight songs that have more than one IP address associated with them.
Right now we're failing to notice a lot of music overlap, because our song hashCode() function is so specific. For example, we're showing all the songs from "Causers of This" twice, because one phone has the artist as "Toro y Moi" and the other is "Toro Y Moi" (capitalized Y).
We should update our hashCode() function to do some standardization: send all text to lowercase, remove spaces and punctuation, etc.