HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: Tropoje on 2024-04-22 18:14:23

Title: Multivalue tag - help needed
Post by: Tropoje on 2024-04-22 18:14:23
I have a tag that has multiple values stored: DE, W. Germany, AT, FR, UK, US
Release country=RELEASECOUNTRY

X

According to the documentation $meta(name,n) (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference#.24meta.28name.2Cn.29), I would like to display the indicated value but it does not work. My goal is to display the W. Germany value but nothing is displayed. I don't know why it doesn't work  :(

Code: [Select]
$meta(RELEASECOUNTRY,1)
Title: Re: Multivalue tag - help needed
Post by: Major_Tom on 2024-04-22 19:21:40
Try separating the values with a semicolon and not a comma, i.e. DE; W. Germany; etc.
Title: Re: Multivalue tag - help needed
Post by: Terence on 2024-04-22 19:33:09
Your code looks fine to me, so if it doesn't work :
Are the values separated by semicolons, when you look in the properties?
Is the tag really a multi-value tag? In my experience, this doesn't show up well in foobar: foobar can show semicolons and it can still be a single value. This is better seen in Mp3tag, for example: Mp3tag displays \\ as a separator when there are multiple values. You can also make a column in foobar with this pattern: $meta_sep(name,sep) (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference#.24meta_sep.28name.2Csep.29) , for example $meta_sep(releasecountry, \\ ). If the values are not separated by a ' \\ ', it's not a multi-value tag.

In foobar, in the properties, you can right-click on the tag > Split values... Check that your separator is in the list, and it will then be a multi-value tag.
In Mp3tag, there's a 'Split field by separator' action.

There's also a "Multivalue fields" setting in foobar's advanced preferences. If you modify the values in another way (and want this to be a multi-value tag), you should add this tag to that setting. In this case, the values will be separated by semicolons on saving.

If that doesn't help... I don't know if this is allowed on the forum, but it would be easier to say if you shared a file.
Title: Re: Multivalue tag - help needed
Post by: Tropoje on 2024-04-22 20:06:07
@Major_Tom, @Terence  Thanks for yours suggestions. I thought that if I enter the ";" separator manually it would be enough but unfortunately not. Splitting via Properties -> right-click on the tag -> Split values, helped :)
Title: Re: Multivalue tag - help needed
Post by: ojdo on 2024-04-23 12:15:06
It should work (entering ; as a separator), but only if you add RELEASECOUNTRY to the list of "Multivalue fields", found in
Preferences > Advanced: Display / Properties dialog / Multivalue fields.
Title: Re: Multivalue tag - help needed
Post by: Tropoje on 2024-04-23 18:18:39
@ojdo Of course, works, the order of operations matters. I also found an explanation written by @Case here (https://hydrogenaud.io/index.php/topic,117463.msg969827.html#msg969827)  :)
Title: Re: Multivalue tag - help needed
Post by: KthugS on 2024-05-03 14:59:52
In foobar, in the properties, you can right-click on the tag > Split values... Check that your separator is in the list, and it will then be a multi-value tag.
This was the solution I needed, thank you!