Home User Forums SongKong Music Tagger Jaikoz Music Tagger Albunack Music Service

Monday 12 June 2017

MinimServer with SongKong: Part 9: Is Classical and other boolean fields

Part 10: Multi Disc Albums
Part 8 : Configuring the Date Index

Problem:Most of us have a mixed Classical/Non Classical music library and sometimes its nice to be able to simply browse one category or the other. The way this is usually done is by using the genre field, but then this means that all our Classical music has to be given the same genre when what we probably want to do is categorize by subgenres within Classical.

Solution:SongKong music identification album categorizes albums as non-classical/classical and helpfully writes an Is_Classical boolean field to the files themselves so we can use this to split our albums into two groups for easier browsing.

Boolean fields in MinimServer 

A boolean value is simply a field that has only two values. So if we just add IS_CLASSICAL to indexTags we can then browse by two values 

But MinimServer provides a nice shortcut to go straight to a value by using the fieldName:MapValue:NewName syntax



So now when you click on IsClassical it takes you to the classical only albums. The only trouble with the approach is that there is no no way to go to only the non-classical albums.

Browsing both values of a Boolean field

But there is a way to do this as well. It is slightly convoluted you need to add another mapping to the zero value from a pseudo field which is then populated from the original field



 Now we can browse by both IsClassical and IsNonClassical easily.


No comments:

Jthink blog Jthink Facebook page google_plus Jthink YouTube channel Email Paul at Jthink Subscribe to Weekly Newsletter