CDPedia: Ignore Articles in 'Location' Field

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
lousydrummer
Contributor
Contributor
Posts: 6
Joined: Mon Apr 16, 2012 9:51 am

CDPedia: Ignore Articles in 'Location' Field

Post by lousydrummer »

Hi folks,

First off: Gosh, I love this suite of programs! Thanks.

Second: Right now, I use the 'Location' column to sort my collection. But when I do, it doesn't ignore articles at the front of the entry. So 'The Byrds' gets listed under 'T,' not 'B.' Is there a way I can ask CDpedia to adjust? Alternatively, are there any fields besides 'Artist' and 'Title' that ignore articles?

Thanks for your help.
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: CDPedia: Ignore Articles in 'Location' Field

Post by Conor »

Thank you for the feedback. It's a speed consideration as looking for the prefixing articles takes a little while longer. We never contemplated that the location field would be used for titles.

If you are using the location field for just sorting it might be worth a look at the "sort title" field instead that can be enabled in the Preferences->Fields. This field also does not ignore articles but it allows you to set a value to sort the albums by when sorting by title, for example setting "Byrds" for the sort title field.
lousydrummer
Contributor
Contributor
Posts: 6
Joined: Mon Apr 16, 2012 9:51 am

Re: CDPedia: Ignore Articles in 'Location' Field

Post by lousydrummer »

Thanks for the quick reply, Conor.

Gotcha. All that makes sense. The 'Sort Artist' solution won't work, unfortunately.

Here's the basic gist:

The CDs on my shelves are organized by artist. But, in the case of Various Artists/Compilations/etc, they're sorted by title. In CDPedia, I've organized them accordingly in the 'Location' field (by copying the artist column, then adjusting the 'various' entries accordingly, but that then gives me the problem with the articles.

Any suggestions on how to work through this?

Thanks!
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: CDPedia: Ignore Articles in 'Location' Field

Post by Conor »

If the only function of the location field is for sorting, then why not remove the article from that field? The full artist name will still appear in the regular artist field. It would take me about 20 minutes to make a version that ignores articles in the location field, but then you would be stuck on a version of CDpedia and not be able to upgrade. I can't change the behavior of the field for all as others would not expect that, this extends to the custom fields as well.

If you don't want to change the location field, yo could use a custom field and copy all the values from the location field and then remove all the articles. This can be done from SQLite if you wish to do so automatically. If that the route you want to take let me know and I can see about looking those commands up for you.
lousydrummer
Contributor
Contributor
Posts: 6
Joined: Mon Apr 16, 2012 9:51 am

Re: CDPedia: Ignore Articles in 'Location' Field

Post by lousydrummer »

Fair enough. Makes good sense. And,obvious enough that I feel totally dumb for not picking up on it myself.

Thanks for your time, Conor! Keep up the great work.
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: CDPedia: Ignore Articles in 'Location' Field

Post by Conor »

Glad I could help. If you have a large number of albums, the following SQL command will do it for you:

Code: Select all

sqlite3 ~/Library/Application\ Support/CDpedia/Database.cdpd
update zEntry set zLocation = replace(zLocation, 'The ', '') where zLocation like "The %";
update zEntry set zLocation = replace(zLocation, 'An ', '') where zLocation like "An %";
update zEntry set zLocation = replace(zLocation, 'A ', '') where zLocation like "A %";
.exit
Make sure to make copy of the "Database.cdpd" file for backup before trying to change the data in such a big way.
Post Reply