JayThomason / Tutti

Tutti is a shared music application for the car being made in conjunction with Audi.
3 stars 1 forks source link

Consider how to display artists/albums/songs which are in more than one user's library #198

Open JayThomason opened 10 years ago

hwray commented 10 years ago

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.

JayThomason commented 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.

hwray commented 10 years ago

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.

hwray commented 10 years ago

I think I already changed the Hash Code function but still didn't solve the problem because of the DB uniqueness constraint.

hwray commented 10 years ago

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.