I can't help myself from repeating here a related complaint I've had for
years now:

The original design of the GENRES table included the three fields:

name
namesort
namesearch

To me, that implied, for instance, uc (name) did not necessarily have to
equal namesort and that 'name' values ought to be treated just as labels
-- any searching, sorting or selecting would be performed on on
'namesearch', 'namesort', or 'id'.  

And for years and years, that was indeed the case.  

Then, in 2011, with svn revision 32352 committed by Andy, this no-longer
held true.  Suddenly, code started to creep in to select genre records
by name rather than id.  All the work I had done with my library keep my
sanity as a musicologist by having both sensible genre names AND a
sensible historico-chronological sorting of the genres suddenly was for
naught.  

Before Andy's change, I had used the following update queries with my
'PostScan' plugin to massage values in genres after any scan:


Code:
--------------------
    
  #No Genre to Last Place
  UPDATE genres
  set namesort = 'ZZZZZZZZ NO GENRE'
  where name = 'No Genre';
  
  # Ghettoize genres with no chronology prefix to last place
  UPDATE genres
  SET namesort = psreplace(namesort, 's/^(.*)$/"ZZZZZ $1"/')
  WHERE namesort != psmatch(namesort, 'm/^([[:alpha:]])\1* .*$/') and name != 
'No Genre';
  
  #Remove Prefix
  UPDATE genres
  set name = psreplace(name, 's/^(?i)([[:alpha:]])\1*?[_|\s](.*)$/"$2"/')
  WHERE namesort = psmatch(namesort, 'm/^([[:alpha:]])\1* .*$/');
  
  # Remove Underscores
  UPDATE genres
  set name = psreplace(name, 's/_/ /g');
  
  # Replace Modern with Modernism
  UPDATE genres
  set name = psreplace(name, 's/^Modern (.*)$/"$1 Modernism"/');
  
  
  # Fix Ampersands
  UPDATE genres
  set name = psreplace(name, 's/^(.*)&(.*)$/"$1and$2"/g');
  
  # Special genre name fixes
  
  UPDATE genres
  set name = CASE 
  when name = 'English Italian Baroque' then 'Italian & English Baroque'
  when name = 'Italian and English Baroque' then 'Italian & English Baroque'
  when name = 'Spanish Latin American Baroque' then 'Spanish & Latin-American 
Baroque'
  when name = 'Spanish and Latin-American Baroque' then 'Spanish & 
Latin-American Baroque'
  when name = 'Post-Romantic-Nationalist' then 'Post-Romantic Nationalist'
  when name = 'Central European Modernism' then 'Central-European Modernism'
  when name = 'Italian-Spanish Modernism' then 'Italian & Spanish Modernism'
  when name = 'American-English Modernism' then 'English & American Modernism'
  when name = 'English and American Modernism' then 'English & American 
Modernism'
  when name = 'Post Modern Contemporary' then 'Contemporary Post-Modernism'
  when name = 'Post Modern Aleatoric' then 'Aleatoric Post-Modernism'
  when name = 'Post Modern Minimalist' then 'Minimalist Post-Modernism'
  when name = 'Jazz and Blues' then 'Jazz & Blues'
  Else name
  End ;
  
  
--------------------


That allowed me to have chronologically sorted genres like:
26726

Since 2011, I've been slowly loosing my sanity since this no longer
works.


+-------------------------------------------------------------------+
|Filename: my_genres.jpg                                            |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=26726|
+-------------------------------------------------------------------+

------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=110138

_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta

Reply via email to