'Ignore' words for mAirListDB Artists and Titles

It would be REALLY nice (not essential) if we could configure a list of ‘ignore’ words for Artist and Title in mAirListDB, in a similar way to the feature in MediaMonkey (Tools > Options > Library > Appearance > Ignore prefixes) which ignores user-defined semi-colon delimited text strings when sorting the list of Artists.

This would require (probably?) some configuration settings: two new checkboxes for:
Ignore at start of Artist
Ignore at start of Title

in a GroupBox or tab named something like Sort Options.

To the right of each checkbox would be a TextBox which by default (for English) would each contain a;the. When Artists and Titles are imported (Synchronised) to mAirListDB, the Artist/Title is placed into the tables/tree as if the first occurrence of any of the ‘ignore’ words did not exist (The Beatles would be sorted as ‘Beatles’ under B, A Flock Of Seagulls would be sorted as ‘Flock Of Seagulls’ under F, and The The would be sorted as ‘The’ and would still appear under T). Note that the SQL to do this would be appending a space to the end of each parsed ‘ignore word’ to form the ‘ignore this if it appears at the start of the Artist/Title field’ string. :wink:

Oh: and the ignore words could be stored within the database (with the trailing spaces ;)); and Config. could display/update those fields when changing/displaying the settings I suggested above. 8)

All this would apply only to the DISPLAY of Artist and Title in the Library tab, and would NOT change the values of any Artist or Title fields in the database.

What does everyone else think? Or has this alreeady been suggested?

BFN
CAD

A good idea, actually. I just wonder if I can continue to use ORDER BY in the same way as I do to day. For example, when adding the nodes to the Artists subtree in mAirListDB, the sorting is currently performed by the database. If the strings need to be adjusted (in a configurable way!) before sorting, I’m afraid I will have to do the sorting programatically, which might affect the performance. What do you think?

When ignore words change, quickly parse the existing Artists/Titles and write the ‘without ignored words’ strings to temp Artist and Title tables, both with the correct IDs from the main tables.

Don’t know if MySQL and PostgreSQL both support SQL TRIGGERs (like MS SQL does)? If so, there’s your answer. On any INSERT or UPDATE of a Title or Artist field, run a TRIGGER to create/update the corresponding ‘without ignore words’ rows in the temp. tables. :wink:

Eihter way, join those temp tables to the main tables and you can still use ORDER BY.

BFN
CAD