Semicolon support in the custom fields

Any ideas about how to improve MediaMonkey? Let us know!

Moderator: Gurus

Alkjeks
Posts: 20
Joined: Wed Nov 19, 2008 10:12 pm
Location: Norway

Semicolon support in the custom fields

Post by Alkjeks » Mon May 18, 2009 4:39 pm

I have one custom field named "Language" which describes the language of the lyrics. Some tracks have more than one language in its lyrics. I seperate them with semicolon, like I do with other fields like "genre", but it seems semicolon is not supported in the custom field?

onenonymous
Posts: 374
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Re: Semicolon support in the custom fields

Post by onenonymous » Mon May 18, 2009 5:08 pm

the custom field is a single free-form text field, so you can include a semicolon, but the Monkey doesn't see it as anything special. If you're trying to do some sorting, you could use MagicNodes to display nodes based on the value in custom field separated by the semicolon.

Alkjeks
Posts: 20
Joined: Wed Nov 19, 2008 10:12 pm
Location: Norway

Re: Semicolon support in the custom fields

Post by Alkjeks » Thu May 21, 2009 7:06 pm

I tried Magicnodes, and it was very nice!
But I still like the custom field to support semicolons, because I use the Track Browser.

Alkjeks
Posts: 20
Joined: Wed Nov 19, 2008 10:12 pm
Location: Norway

Re: Semicolon support in the custom fields

Post by Alkjeks » Sat May 23, 2009 6:22 am

In MagicNodes, how do I make semicolon as a seperator?

ZvezdanD
Posts: 3097
Joined: Thu Jun 08, 2006 7:40 pm

Re: Semicolon support in the custom fields

Post by ZvezdanD » Sat May 23, 2009 7:21 pm

There are two ways with Magic Nodes to use some character or string of characters as separator - the first one is Left of/Right of qualifiers, the second is with Split by/Split part qualifiers. For example, you could write something like My node\<Custom 1|Left of:;> and you would get nodes with the left part of the Custom 1 field until ";" character. However, none of those qualifiers could substitute true multi-item behavior of some MM built-in field. So, currently only way for such thing is to use some of existing multi-item fields which you don't use already, e.g. some of Classification fields - Tempo, Mood, Occasion or Quality.

I think that we had such request in this forum several times before, but anyway I give a vote for it. I also want Involved people to be multi-item, but this is another, more complex story since we need a way for defining musicians role with it.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

Alkjeks
Posts: 20
Joined: Wed Nov 19, 2008 10:12 pm
Location: Norway

Re: Semicolon support in the custom fields

Post by Alkjeks » Mon May 25, 2009 6:03 am

Thanks, but it didn't help. It seems like we cannot use "Left of" and "Right of" at the same time. That would be great :) "Split of" didn't worked either...

onenonymous
Posts: 374
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Re: Semicolon support in the custom fields

Post by onenonymous » Mon May 25, 2009 8:52 am

I thought it could do what you want when I suggested it originally. Until ZvezdanD adds support to enable the semicolon as a field separator and use each values as a sub-node (hint hint :-)) you'll have to try it some other way. Easiest is probably ZvezdanD's suggestion to use a Classification field - Tempo, Mood, Occasion or Quality. They support semicolon delimited list and will give you a node for each value. If you've got lot's of tracks already tagged with your languages, you could copy the list into one of the classification fields using RegExp script.

Another possibility, although more complicated is to create multiple MagicNodes using each language as it's own filtered group. Eg. create one MN with filter for your custom field includes "English", another filter for "German" etc. All these get grouped together under one main node. There are several MN nodes that implement groupings like this already for you to see how it works. The downside is you'd have to manually create all these nodes so you need to know which languages you want nodes for.

ZvezdanD
Posts: 3097
Joined: Thu Jun 08, 2006 7:40 pm

Re: Semicolon support in the custom fields

Post by ZvezdanD » Mon May 25, 2009 10:22 am

onenonymous wrote:Until ZvezdanD adds support to enable the semicolon as a field separator and use each values as a sub-node (hint hint :-)) you'll have to try it some other way. Easiest is probably ZvezdanD's suggestion to use a Classification field
...
Another possibility, although more complicated is to create multiple MagicNodes using each language as it's own filtered group.
Thanks for clarifying this, you are much better explaining it than me. However, I think you didn't understand my explanation why it is not possible with Magic Nodes to get multiple values from the Custom field. It is not a problem with a support for separators. You could already use a semicolon as a separator. For example, if I have a field organized like this: vocal:Bono; guitar:The Edge; bass:Adam Clayton; drums:Larry Mullen, Jr. I could use the following mask and get displayed nodes with guitarists: Guitarists\<Custom 1|Exclusive Right of:guitar:|Right until:;>

However, you cannot use such mask to display same track for two or more guitarists in two or more sub-nodes, because Custom field is not natively multi-item field. The point is - you could have several values of different type separated with some character(s), but you cannot have multiple values of same type. I cannot add a support for such thing. This is something which MM developers should do and because of that I wrote that I give a vote for this requirement. You know, every existing multi-item field is linked with corresponding tables: Artist, Composer, Conductor and Lyricist fields with ArtistsSongs and Artists tables, Album Artist field with ArtistsAlbums and Artists, Genre with GenresSongs and Genres, Tempo, Mood, Occasion and Quality with ListSongs and Lists. Custom fields are not linked with any additional table. If we want to have it multi-item, MM devs should define a new table(s) for individual items. But, since this is custom field and different people put different things into it, I suppose it could be very hard to use it as a multi-item field, so I hardly believe that MM will ever add support for such thing.

So, currently you have only two possibility with Magic Nodes to get multi-item values for some data that not belongs to some natively multi-item field: 1. you could use some existing multi-item field as a replacement, or 2. you could use the Group option and define one mask for each item using the Filter qualifier (if you have many languages, you would have many masks, as onenonymous explained).
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

Alkjeks
Posts: 20
Joined: Wed Nov 19, 2008 10:12 pm
Location: Norway

Re: Semicolon support in the custom fields

Post by Alkjeks » Thu May 28, 2009 9:11 am

I ended up putting the info (country and language) into the Quality and Tempo field. It was to much work to group them with MagicNode, because I also tag country, and I have music from many countries. But I kept the info in the custom fields if MediaMonkey would support semicolon in these fields one day. Looking forward to that beautiful day :)

gege
Posts: 862
Joined: Tue Sep 05, 2006 2:10 pm
Location: Brazil

Re: Semicolon support in the custom fields

Post by gege » Fri May 29, 2009 10:12 am

Alkjeks wrote:Thanks, but it didn't help. It seems like we cannot use "Left of" and "Right of" at the same time. That would be great :) "Split of" didn't worked either...
I use a custom field exactly like you do, so I have tracks with something like "English; Spanish" in Custom 3 (renamed do 'Language'). I'd expect this example track to appear in both "English" and "Spanish" nodes, but unfortunately "Split of" doesn't work as I expected. It shows only under "English", not under "Spanish".

Explaining in another way, under "English" node we have tracks with "English" (doh!), "English; Spanish", but not "Spanish; English".

Can't this be achieved only with MN, without further support of MM features, ZvezdanD?

ZvezdanD
Posts: 3097
Joined: Thu Jun 08, 2006 7:40 pm

Re: Semicolon support in the custom fields

Post by ZvezdanD » Fri May 29, 2009 12:12 pm

gege wrote:Explaining in another way, under "English" node we have tracks with "English" (doh!), "English; Spanish", but not "Spanish; English".

Can't this be achieved only with MN, without further support of MM features, ZvezdanD?
I understand exactly what you want, but as I said it is not possible without MM support. Here is one example with existing multi-item field - let say that I have a track which have artists "David Bowie; Queen" and let say it has ID = 1000. This is one record in the Songs table. This record is linked by its ID with the two records of Artists table: "David Bowie" and "Queen". So, my <Artist> queries display values "David Bowie" and "Queen", instead of "David Bowie; Queen", i.e. they display values from Artists table, not from Songs table. My <Artist> queries don't split any field, they don't care about separators. This is all possible because MM has built-in support for multi-item values for that field.

Like I said, Custom fields are not multi-item, they are not linked to any additional table, MM doesn't split those fields by ";" separator to put them into another table. Well, I could do all of this with my script - I could create one new table, I could handle OnTrackProperties event and whenever some user change that data I could parse it by this separator and put those parts into my newly created table... However, this is all too much work for something which MM developers could do much better and probably will do in the near future.

Do you have some unused multi-item field? As I explained, this is currently the simplest solution. Did you try a solution with Group option? It is not too bad if you have small number of languages.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

gege
Posts: 862
Joined: Tue Sep 05, 2006 2:10 pm
Location: Brazil

Re: Semicolon support in the custom fields

Post by gege » Fri May 29, 2009 12:54 pm

ZvezdanD wrote:I understand exactly what you want, but as I said it is not possible without MM support. Here is one example with existing multi-item field - let say that I have a track which have artists "David Bowie; Queen" and let say it has ID = 1000. This is one record in the Songs table. This record is linked by its ID with the two records of Artists table: "David Bowie" and "Queen". So, my <Artist> queries display values "David Bowie" and "Queen", instead of "David Bowie; Queen", i.e. they display values from Artists table, not from Songs table. My <Artist> queries don't split any field, they don't care about separators. This is all possible because MM has built-in support for multi-item values for that field.
OK. Now I understood the implications of Custom fields not being multi-value. Thanks.
ZvezdanD wrote:Like I said, Custom fields are not multi-item, they are not linked to any additional table, MM doesn't split those fields by ";" separator to put them into another table. Well, I could do all of this with my script - I could create one new table, I could handle OnTrackProperties event and whenever some user change that data I could parse it by this separator and put those parts into my newly created table... However, this is all too much work for something which MM developers could do much better and probably will do in the near future.
Too much work, for sure...
ZvezdanD wrote:Do you have some unused multi-item field? As I explained, this is currently the simplest solution. Did you try a solution with Group option? It is not too bad if you have small number of languages.
Of course I can use one of the classification fields, with no problem. I was just wondering if that could be done with the data I ALREADY have in Custom, but I can manage to transfer them. Don't worry about that.
"Group" is not an option to me, because I use it as "Super-genre" and then it is used extensively in my Auto-Organize masks.

ZvezdanD
Posts: 3097
Joined: Thu Jun 08, 2006 7:40 pm

Re: Semicolon support in the custom fields

Post by ZvezdanD » Fri May 29, 2009 1:09 pm

gege wrote:"Group" is not an option to me, because I use it as "Super-genre" and then it is used extensively in my Auto-Organize masks.
I think you didn't understand. I didn't mean on the Grouping field, but the Group option of Magic Nodes. For example:

Code: Select all

<Group|Name:Language>\English|Filter:';' || <Custom 3> || ';' Like '%;English;%'\<Title>

Code: Select all

<Group|Name:Language>\Spanish|Filter:';' || <Custom 3> || ';' Like '%;Spanish;%'\<Title>
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

gege
Posts: 862
Joined: Tue Sep 05, 2006 2:10 pm
Location: Brazil

Re: Semicolon support in the custom fields

Post by gege » Fri May 29, 2009 9:12 pm

ZvezdanD wrote:I think you didn't understand. I didn't mean on the Grouping field, but the Group option of Magic Nodes.
:oops: Ooops! :oops:

ZvezdanD
Posts: 3097
Joined: Thu Jun 08, 2006 7:40 pm

Re: Semicolon support in the custom fields

Post by ZvezdanD » Tue Apr 06, 2010 4:36 am

If anybody is still interested, Magic Nodes v3.x and up could be used to display multiple values for non-multi-item fields like Involved People, Custom X fields... Maybe their usage is not straightforward like built-in MM multi-item nodes, but there is detail description with several examples.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

Post Reply