You can also turn that into a plugin and have it automatically fired
whenever a scan finishes.

A while back Bill Jackson created a plugin to alter the namesort for
all contributors.  Since SlimServer only recognizes an ARTISTSORT tag,
but no COMPOSERSORT, BANDSORT, ALBUMARTISTSORT, etc., it could be used
to effectively apply sorting to any of the names found within the
contributors table.  It could even be used to eliminate the need for
SORT tags within the library altogether.  The plugin is a bit more
ambitious than just applying a post-scan SQL query in that it includes
a user interface to edit the data and stores it in a text file.

http://forums.slimdevices.com/showthread.php?t=20226

If I were to do what you're doing with genres I'd keep another SQL
table in the database.  Call it 'genresort', with two fields

name varchar(255)
namesort varchar(255)

and populate it with something like:

Renaissance,1000
Early Baroque,1100
English Baroque,1200
French Baroque,1300
etc.

Then your query would be:

UPDATE genres g INNER JOIN genresort s ON s.name = g.name
SET g.namesort = s.namesort;

A few things this would make easier for you:  You wouldn't have to
embed sorting information into the genre tags - you could just use the
plain genre name.  It'll give you a lot of room to slip in new genres
within the sorting hierarchy, and it will let you easily change the
sort order just by altering the data in the table.  And if you also
have non-classical genres in your library, the numeric values would
have the effect of putting classical before all the rest.


-- 
JJZolx

Jim
------------------------------------------------------------------------
JJZolx's Profile: http://forums.slimdevices.com/member.php?userid=10
View this thread: http://forums.slimdevices.com/showthread.php?t=35876

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

Reply via email to