[Empeg-general] Re: The word "the"

yn0t_@empegbbs-noreply.merlins.org yn0t_ at empegbbs-noreply.merlins.org
Tue, 12 Mar 2002 02:43:00 GMT


You beat me to my suggestion on the alternate artist field which would be used for sorting.  I used a CD catalog program called Catraxx which did this.  It was smart enough to auto suggest when you used definite articles "The" for english speakers, but it also supported the appropriate ones in other languages.

Brainstorm alert!!!

Actually I think it could be done even simpler and without the extra field.  Check this out....  When you enter your artists, you could enter them with a comma.  They could be stored with the comma in the ID3 field (and subsequently in the player's FID files and database) to indicate that the player should sort them as such, but when displayed on the player (in track listings, soup views, etc) they could be *displayed* with the "The" in front of them.  And for those who want to do their solo artists alphabetically by last name (something I hadn't even thought of until Bitt mentioned it) this would work also.  Obviously, Pink Floyd would just be stored as plain ol' Pink Floyd.

So, the player, when it's displaying them (but not when it's sorting them) could just be instructed to do what our brains do already with names listed as such...  Find the comma, read until the end of the string, and then read the rest of the string from the beginning to the comma.  Like so:


char * pszComma = strchr(pszArtist, ',' );

if ( pszComma != NULL ) {
   write_string_to_screen ( pszComma +1 );
   pszComma = NULL;
   write_string_to_screen ( pszArtist);
}



...

If the artist name info needs to be used later, substitute in your favorite pointer math or string/substring functions to leave the artist string intact.  I think this strategy (storing the artists comma separated and displaying them "unravelled" so to speak) would handle all of the cases mentioned so far...  Even Gabriel Garcia Marquez could be stored as Garcia Marquez, Gabriel.  Plus no extra storage is needed!  Just a tiny bit of CPU.

The only *possible* drawback I can think of is that any artists which already have commas in them (???) would get munged, but I can't think of any...  So this could be a config option...

Anyone think this is a good idea?  I can't believe I didn't think of this before, so there *must* be a flaw in my logic here....