tag with multiple possible values & grouping by it |
This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.
See also: Hydrogenaudio Terms of Service.
![]() ![]() |
tag with multiple possible values & grouping by it |
Jan 23 2013, 09:03
Post
#1
|
|
|
Group: Members Posts: 4 Joined: 25-December 10 Member No.: 86781 |
i'd like to have a tag that defines a multiple-value,
e.g. song1:MYTAG ="classic;fast;high-pitch;funny" song2:MYTAG ="folk;sad;fast" song3:MYTAG ="pyschadelic;folk" and then to be able to group by these tags (in the library, or as a dynamic playlist, or anything that works) e.g. (by the above example) : | +- fast (2) +- folk (2) +- classic (1) +- funny (1) +- sad (1) ... so that each song can have multiple ways to be grouped by. The groups can overlap. How do I achieve that? EDIT1: I can partially achieve it now with the following steps: for each song: add a tag (e.g. MYTAG) to a song, set that tag multiple-values with a separator (e.g. "folk;sad;fast") right-click that tag, choose "split values..." save changes. I noticed that even though the comment in the edit window says "use ; character to separate multiple values", the media library still treats it as a single value, unless i choose "split values..." like i wrote above. (Is this a bug? how can it split values automatically?) In foobar settings: preferences -> media library > album list > (add new/edit) add a view with that tag (e.g. "%<mytag>%") save preferences. i learned that %<mytag>% treats the field contents as a multivalue field and %mytag% treats the field as a single-value field. in the bottom of the media library tree, select the new view. Now library shows me groups by tags. I can combine songs from several groups with CTRL key - OR() operator. but how can I select groups that contain only selected tags? i.e. AND() operator by "OR" operator i mean: foobar selects each song that belongs to EITHER of the groups. e.g. songs that are defined as "rock" or songs that are defined as "pop". by "AND" i mean foobar selects each song only if it belongs to ALL of the selected groups. e.g. songs that are defined as BOTH "rock" AND "pop" simultaneously. This post has been edited by zaffi: Jan 23 2013, 09:56 |
|
|
|
Jan 23 2013, 10:08
Post
#2
|
|
|
Group: Members Posts: 4 Joined: 25-December 10 Member No.: 86781 |
Complete re-Edit My Question
a) how to group multivalue tags in the library by AND() operator (see below) b) how to edit multivalue faster and easier? c) is there a bug in editing multibalues? (see end of this post) To group the library by multivalue tags, I edit foobar settings: 1) preferences -> media library > album list > (add new/edit) 2) add a view with that tag (e.g. "%<mytag>%") 3) save preferences. i learned that %<mytag>% treats the field contents as a multivalue field and %mytag% treats the field as a single-value field. in the bottom of the media library tree, select the new view. Now library shows me groups by tags. I can combine songs from several groups with CTRL key - OR() operator. but how can I select groups that contain only selected tags? i.e. AND() operator by "OR" operator i mean: foobar selects each song that belongs to EITHER of the groups. e.g. songs that are defined as "rock" or songs that are defined as "pop". by "AND" i mean foobar selects each song only if it belongs to ALL of the selected groups. e.g. songs that are defined as BOTH "rock" AND "pop" simultaneously. background information: how to group the media library by multivalue tag fields i'd like to have a tag that defines a multiple-value, e.g. song1: MYTAG ="classic;fast;high-pitch;funny" song2: MYTAG ="folk;sad;fast" song3: MYTAG ="pyschadelic;folk" and then to be able to group by these tags (in the library, or as a dynamic playlist, or anything that works) e.g. (by the above example) : | +- fast (2) +- folk (2) +- classic (1) +- funny (1) +- sad (1) ... so that each song can have multiple ways to be grouped by. The groups can overlap. I use the following steps: For each song: 1) add a tag (e.g. MYTAG) to a song, 2) set that tag multiple-values with a separator (e.g. "folk;sad;fast") 3) right-click that tag, 4) choose "split values..." 5) confirm using ";" as a separator, 6) save changes. I noticed that even though the comment in the edit window says "use ; character to separate multiple values", the media library still treats it as a single value, unless i choose "split values..." like i wrote above. (Is this a bug? how can it split values automatically?) |
|
|
|
Jan 23 2013, 18:28
Post
#3
|
|
|
Group: Members Posts: 328 Joined: 17-April 12 Member No.: 98921 |
AND
QUOTE $if($and($strstr(%mytag%,rock),$strstr(%mytag%,pop)),display this) $if($and($strstr(%mytag%,rock),$strstr(%mytag%,pop)),display this,otherwise display this) OR QUOTE $if($or($strstr(%mytag%,rock),$strstr(%mytag%,pop)),display this) $if($or($strstr(%mytag%,rock),$strstr(%mytag%,pop)),display this,otherwise display this) Be aware that what you stipulate $strstr() to look for is case-sensitive. Consult the Title Formatting Reference for other options. I noticed that even though the comment in the edit window says "use ; character to separate multiple values", the media library still treats it as a single value, unless i choose "split values..." like i wrote above. (Is this a bug? how can it split values automatically?) Add MYTAG to the list at Preferences > Advanced > Display > Properties dialog > Multivalue fields. This post has been edited by BenB: Jan 23 2013, 18:30 -------------------- This signature apparently isn't too long.
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 24th May 2013 - 22:55 |