prabhjas / chirpradio

Automatically exported from code.google.com/p/chirpradio
0 stars 0 forks source link

Can't browse categories by Artist, Track #188

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If I go to the browse a particular category (the Local Current section, for 
example) it's set by default to browse by album (ideally it would be by artist, 
but that's not the main issue here). If I click the link to browse by Artist or 
Track instead, it displays entries from the entire library, not just the 
category I want to browse. Clicking back to Album also displays entries from 
the entire library rather than the desired category.

Original issue reported on code.google.com by billyk...@gmail.com on 3 Jan 2011 at 10:54

GoogleCodeExporter commented 9 years ago
This is deliberate, and I can understand the confusion. The problem has to do 
with the way GAE queries work. The category field is associated with albums, 
not tracks or artists. With GAE, if you wanted to search for tracks whose album 
is a certain category, you could not do it with one simple query (as with some 
other forms of databases). Instead you would have to query for all the tracks 
and then manually filter out the ones with an album of a specific category. 
This causes a problem when you want to page through results in an efficient and 
scalable way. One way to solve this is to introduce redundancies into the 
database. For example, we can add a category field to tracks, which will must 
be set to the category of the tracks' album. For artists, it's a bit more 
tricky, since artists can have albums in different categories. So artists would 
have to have a list of categories, I guess. Anyway, the drawback is that adding 
redundancy means introducing vulnerabilities to data integrity, since you need 
to add more code that must make sure the redundant information is always 
present. But it may be the only way to go.

A similar issue and an alternative solution is described in Issue #144.

Anyone have ideas on this?

Original comment by jawax...@gmail.com on 9 Jan 2011 at 5:48

GoogleCodeExporter commented 9 years ago
Added categories to artists and albums. Done.

Original comment by jawax...@gmail.com on 20 Apr 2011 at 3:27