![]() |
|
processing order issue between tagValue and tagFormat - Printable Version +- MinimServer Forum (https://forum.minimserver.com) +-- Forum: MinimServer (/forumdisplay.php?fid=1) +--- Forum: Support (/forumdisplay.php?fid=4) +--- Thread: processing order issue between tagValue and tagFormat (/showthread.php?tid=7504) |
processing order issue between tagValue and tagFormat - eseb63 - 28-03-2025 11:51 Hello, I don't understand the result i got for the test below. I initially used 2 tags for works :
WORK and OVERALL_WORK are mutually exclusive. I prefix works with their composer. I configured minimServer like this :
I then thought it would be handy to add another way of browsing, for works often recorded as part of cycles : by example, i would like to find albums containing the first Chopin ballade (so i need to tag the ballades individually) but i also would like to find albums containing the 4 ballades. for this, i use a WORK_SET tag. Test with Perlemuter release of the 4 ballades + 2 polonaises:
According to the documentation, tagValue processing is done before tagFormat, so i thought WORK_SET would be added to WORK, and then indexFormat would use all WORK tags to create Composer-Work tags. but it doesn' work: I expected when works browsing :
I get :
How to explain this? RE: processing order issue between tagValue and tagFormat - simoncn - 28-03-2025 13:15 Work.Merge={Work_Set} adds the Work_Set tag as an additional Work tag, so the file now has two WORK tags: WORK=Ballade no 1 WORK=4 Ballades When you specify a multivalued tag in tagFormat, the values are combined with a default separator ", ". This is what you are seeing. The separator can be changed or removed. If you browse by Work instead of Composer-Work (so that tagFormat is not applied), you should see the two WORK tag values shown separately. RE: processing order issue between tagValue and tagFormat - eseb63 - 28-03-2025 16:31 (28-03-2025 13:15)simoncn Wrote: When you specify a multivalued tag in tagFormat, the values are combined with a default separator ", ". This is what you are seeing. The separator can be changed or removed. I thought they would be treated sequentially rather than combined : which kind of use case for this combination feature ? If i create a GROUP tag for the 4 ballades tracks, i get when browsing by Composer-Work a single entry with the concatenation of the 4 ballades, i suppose it's the same mechanism. (28-03-2025 13:15)simoncn Wrote: If you browse by Work instead of Composer-Work (so that tagFormat is not applied), you should see the two WORK tag values shown separately.Indeed, but the composer prefix is usefull when browsing from other entities than composer. I made another test, and again, i don't understand the result : I tried tagValue : Composer-Work.Merge={Work_Set} this time, when browsing Composer-Work i get only the "4 ballades" entry and not the individual ballades ? RE: processing order issue between tagValue and tagFormat - simoncn - 29-03-2025 13:23 (28-03-2025 16:31)eseb63 Wrote: I thought they would be treated sequentially rather than combined : which kind of use case for this combination feature ? The original purpose of tag formatting was to pass a displayFormat tag value to the control point for display when viewing or playing a track or album. For this, a single value is needed. The indexFormat option was added later and uses the same formatting implementation as displayFormat. Because it uses the same implementation, it produces a single value. Quote:If i create a GROUP tag for the 4 ballades tracks, i get when browsing by Composer-Work a single entry with the concatenation of the 4 ballades, i suppose it's the same mechanism. If you are using indexFormat, you will always get a single contatenated value. Quote:I tried tagValue : Composer-Work.Merge={Work_Set} This is because you are merging Work_Set, which contains the single value "4 ballades". If you want to add the individual ballades, you need this: Composer-Work.merge={Work_Set, Work} or this: Work.merge={Work_Set}, Composer-Work.merge={Work} RE: processing order issue between tagValue and tagFormat - eseb63 - 29-03-2025 18:49 (29-03-2025 13:23)simoncn Wrote:Quote:I tried tagValue : Composer-Work.Merge={Work_Set}This is because you are merging Work_Set, which contains the single value "4 ballades". I read again the documentation and maybe found my misunderstanding about indexFormat processing : When specifying nothing in tagValue, indexFormat creates entries for each WORK and OVERALL_WORK, so in this case for each individual Ballade. Specifying in tagValue "Composer-Work.Merge = {Work_Set} creates a single value "4 ballades" for Composer-Work. I thought indexFormat would after that create individual ballades entries. BUT according to the documentation, this tag won't be added if the item already has a tag occurrence. I was wrongly reasoning in terms of tag value, when I should have been reasoning in terms of tag existence : am i right ? If i use Composer-Work.Merge {Work_Set, Work} i get all but without prefix (for the same reason, indexFormat finds a tag and doesn't change it). So, Composer-Work loses its usefullness and i will finally simply use Work.Merge={Work_Set, Overall_Work}, giving the same result. I come from LMS, which shows all works grouped by composer. But after thought, directly browsing all works won't be very usefull and lisible : i endly will need to choose the composer. RE: processing order issue between tagValue and tagFormat - simoncn - 29-03-2025 22:46 (29-03-2025 18:49)eseb63 Wrote: Specifying in tagValue "Composer-Work.Merge = {Work_Set} creates a single value "4 ballades" for Composer-Work. This is because you are merging Work_Set, which has the single value "4 ballades." Quote:I thought indexFormat would after that create individual ballades entries. These individual ballades entries are tagged as Work. My impression (perhaps incorrect) is that you are not including Work in either tagValue/merge or indexFormat, which would explain why these values are not merged into Composer-Work. The merge option of tagValue merges all source tags specified, whether or not the item already has a value from a previously merged source tag. Some of the other tagValue options check for an already existing target or source tag but the merge option doesn't do this. Quote:I was wrongly reasoning in terms of tag value, when I should have been reasoning in terms of tag existence : am i right ? I don't think so - see above. Quote:If i use Composer-Work.Merge {Work_Set, Work} i get all but without prefix (for the same reason, indexFormat finds a tag and doesn't change it). MinimServer has a different approach for browsing ("intelligent browsing"). After making any tag selection, the next index shown is tailored using the results of previous selections. If you start by selecting a composer followed by a work, you will see only works for that composer. If you start by selecting a work followed by a composer (less likely but possible; you might only remember the work name), you will see only composers for the selected work. When you get used to this, you will find it very powerful and convenient because it progressively reduces the size of index lists you need to scroll though. RE: processing order issue between tagValue and tagFormat - eseb63 - 30-03-2025 11:55 (29-03-2025 22:46)simoncn Wrote: These individual ballades entries are tagged as Work. My impression (perhaps incorrect) is that you are not including Work in either tagValue/merge or indexFormat, which would explain why these values are not merged into Composer-Work. No, your impression is incorrect : i wouldn't expect to get individual works (ballades) if work wasn't specified in tagValue neither indexFormat. My settings for this test are :
(29-03-2025 22:46)simoncn Wrote: The merge option of tagValue merges all source tags specified, whether or not the item already has a value for the source tag. Some of the other tagValue options check for an already existing source tag but the merge option doesn't do this.So Composer-Work.Merge={Work_Set} merges "4 ballades" in Composer-Work, as expected and indexFormat processing occurs after that ; The problem was for me to explain why indexFormat didn't add individual Ballades in Composer-Work. The indexFormat documentation says : The indexFormat option doesn't replace any existing tags in the item. For example, the setting WorkByTitle.indexFormat={$title$tonality$opusnumber$subtitle} would add a WorkByTitle tag if it doesn't exist in this item. No tag would be added if the item already has a WorkByTitle tag. Transposed to my test : 1) For example, the setting Composer-Work.indexFormat={$composer^^ : $Overall_Work$Work} would add a Composer-Work tag if it doesn't exist in this item. 2) No tag would be added if the item already has a Composer-Work tag. Point 1 is verified when specifying nothing in tagValue as there are no Composer-Work when indexFomat processing occurs for each Ballade item, so it adds the individual Ballades. Point 2 is verified when specifying tagValue : Composer-Work.Merge={Work_Set}, as a "4 ballades" Composer-Work tag already exists when indexFormat processing occurs for each Ballade item, so it doesn't add individual Ballades. When specifying Composer-Work.Merge={Work_Set, Work}, all Ballades are created by tagValue, indexFormat does nothing again for the same reason, so the Ballades aren't prefixed by composer. I think I have strictly interpreted the documentation and don't see how to interpret it otherwise? RE: processing order issue between tagValue and tagFormat - simoncn - 01-04-2025 22:05 Thanks for posting your complete settings and this detailed description. I had misunderstood your previous post as referring to tagValue/merge rather than tagFormat/indexFormat. The reason for this result is clear now. To get what you were expecting (as I understand it) using tagFormat/indexFormat, you could use the following settings: itemTags : Work_Set, Work, Overall_Work indexTags : Composer-Work tagFormat: Composer-Work.indexFormat={$composer^^ : $Overall_Work$Work_Set$Work} RE: processing order issue between tagValue and tagFormat - eseb63 - 02-04-2025 10:25 (01-04-2025 22:05)simoncn Wrote: tagFormat: Composer-Work.indexFormat={$composer^^ : $Overall_Work$Work_Set$Work} It would work if overall_work, work and work_set would all be mutually exclusive, but since ballades tracks have both work and work_set tags, indexFormat creates concatenated values, which i don't want. I will finally simply use Work.Merge={Work_Set, Overall_Work} and browse composers when needed. |