Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Display Format Tagging Syntax
18-05-2015, 13:52
Post: #1
Display Format Tagging Syntax
Hi

I've got very confused about the tagging syntax used for format strings. I have read and re-read both the guide and some of the posts on the forum, but it didn't really help.... Sad

In the guide it says:
tag-name.displayFormat={format-string}
where the format-string is a sequence of one or more format items, and a format item is:
$tag-list^prefix^suffix^separator
and each format item includes a tag list....

Later on as an example it gives: Title.displayFormat={$title^$date^ [^]}
This I assume is a format string with a single format item that has a tag list containing 2 tags...?

Is this the same as: Title.displayFormat={$title^^^$date^ [^]^}
Again a format string but containing two format items, each with a tag list containing only a single tag?

When a second tag is referenced is the next caret (^) found associated with the last tag? And then once three ^'s have been processed for a tag any subsequent ones are associated with the previous tag, i.e. the processing is recursive and is always trying to close off the last tag?

So in the above example is the [ a prefix for $date rather than a suffix for $title?

Hope this makes sense!!
Chris
Find all posts by this user
Quote this message in a reply
18-05-2015, 15:17
Post: #2
RE: Display Format Tagging Syntax
(18-05-2015 13:52)pzyvbv Wrote:  Hi

I've got very confused about the tagging syntax used for format strings. I have read and re-read both the guide and some of the posts on the forum, but it didn't really help.... Sad

In the guide it says:
tag-name.displayFormat={format-string}
where the format-string is a sequence of one or more format items, and a format item is:
$tag-list^prefix^suffix^separator
and each format item includes a tag list....

Later on as an example it gives: Title.displayFormat={$title^$date^ [^]}
This I assume is a format string with a single format item that has a tag list containing 2 tags...?

This string has two format items:
$title^
$date^ [^]

The $ in $date terminates the first format item and applies default values for the omitted suffix and separator. It is equivalent to:

$title^^^, $date^ [^]

Quote:Is this the same as: Title.displayFormat={$title^^^$date^ [^]^}
Again a format string but containing two format items, each with a tag list containing only a single tag?

This string explicitly specifies null strings for the separators, overriding the default value of comma+space.

Quote:When a second tag is referenced is the next caret (^) found associated with the last tag?

Carets are associated with format items, not with tags. Each format item can contain one or more tags. Each caret is associated with the format item that is currently being processed when the caret was encountered.

Quote:And then once three ^'s have been processed for a tag any subsequent ones are associated with the previous tag, i.e. the processing is recursive and is always trying to close off the last tag?

The processing is linear, not recursive. Any $ following a ^ ends the current format item and starts the next format item. If there are more than three ^ characters in a format item, the extra ones are treated as literal characters in the separator string.

Quote:So in the above example is the [ a prefix for $date rather than a suffix for $title?

Yes, it is.

Quote:Hope this makes sense!!
Chris

Thanks for asking! I have added some more explanation to the User guide section in an attempt to clarify this parsing for other users.
Find all posts by this user
Quote this message in a reply
18-05-2015, 16:04
Post: #3
RE: Display Format Tagging Syntax
Quote:The $ in $date terminates the first format item and applies default values for the omitted suffix and separator.

Quote:Carets are associated with format items, not with tags. Each format item can contain one or more tags. Each caret is associated with the format item that is currently being processed when the caret was encountered.

Thanks for the explanation. There is still one thing I don't quite understand. If the $ of a tag ends the current format item then I don't get how a format item can contain one or more tags since wouldn't the $ preceding the second tag terminate the first format item and effectively start a new one?

Also one thing I certainly hadn't realised was that I assume that the separator is used to separate multiple instances of that tag (format item) rather than being the separator used to separate different format items?

Otherwise it all becomes a lot clearer....linear is much easier to get your head around than recursive!

Thanks so much for the explanation
C

In case it helps anyone else (and as I may have made a mistake!) here are a couple of display format strings that seem to list albums and tracks along with audio quality information:

Title.displayFormat={$Title^^^$#AudioFormat^ - ^^$#AudioData^, ^^$#AudioChannels^, ^ch^$#AudioQuality^ [^]^}

Album.displayFormat={$Album^^^$DiscSubtitle^ - ^^, $#AudioFormat^ - ^^$#AudioData^, ^^$#AudioChannels^, ^ch^$#AudioQuality^ [^]^}

For a track (Title) there will only be one instance of each format item, but for Album there may be more than one if the album contains multiple MP3 rates, or mono, stereo and multichannel, say. I haven't used separators on the Album.displayFormat as I do not mix AudioFormats, AudioChannels or AudioQuality for my albums; nor AudioData if FLAC. So the only multiples I get are multiple rates for MP3 files, which appear as "~192k~224k", say, which I am happy with. I also added these 4 #Audio tags to indexTags on the server tab (or you can add them as itemTags if you don;t need the indexing I think?)
Find all posts by this user
Quote this message in a reply
18-05-2015, 16:15
Post: #4
RE: Display Format Tagging Syntax
(18-05-2015 16:04)pzyvbv Wrote:  Thanks for the explanation. There is still one thing I don't quite understand. If the $ of a tag ends the current format item then I don't get how a format item can contain one or more tags since wouldn't the $ preceding the second tag terminate the first format item and effectively start a new one?

See the new text in the Tag formatting section. You need at least one ^ character in a format item except to the final format item. Because the $ follows a ^, it starts a new format item.

Quote:Also one thing I certainly hadn't realised was that I assume that the separator is used to separate multiple instances of that tag (format item) rather than being the separator used to separate different format items?

Correct. The prefix and suffix enclose the complete format item (if the format item has a non-null value).
Find all posts by this user
Quote this message in a reply
18-05-2015, 16:54
Post: #5
RE: Display Format Tagging Syntax
Hi

Final question hopefully! And thanks for your patience.

I have now read the new tag formatting section and it is a lot clearer than the old one....thank you for that. Smile

The one "niggle" I still have is that it would appear that in your example:
Artist.displayFormat={$artist$orchestra$conductor^^^ / }

that the separator is not only used to separate different instances of the format item, e.g. using a cutdown version of my previous example say:
Album.displayFormat={$Album^^^$DiscSubtitle^ - ^^, }
where the output for an album might be:
albumname - discsubtitlea, discsubtitleb, discsubtitlec
i.e. it lists the box set title and all the albums within it in the album title
but the separator is also used between tags used in the format item, as per your example in the tag formatting section.

This would appear to be 2 different things to some extent (format item separator vs. tag list separator), but a moot point really. The main thing is that I want to be sure that I'm understand how it works.

Thanks.
Find all posts by this user
Quote this message in a reply
18-05-2015, 18:06
Post: #6
RE: Display Format Tagging Syntax
(18-05-2015 16:54)pzyvbv Wrote:  Hi

Final question hopefully! And thanks for your patience.

I have now read the new tag formatting section and it is a lot clearer than the old one....thank you for that. Smile

The one "niggle" I still have is that it would appear that in your example:
Artist.displayFormat={$artist$orchestra$conductor^^^ / }

that the separator is not only used to separate different instances of the format item, e.g. using a cutdown version of my previous example say:
Album.displayFormat={$Album^^^$DiscSubtitle^ - ^^, }
where the output for an album might be:
albumname - discsubtitlea, discsubtitleb, discsubtitlec
i.e. it lists the box set title and all the albums within it in the album title
but the separator is also used between tags used in the format item, as per your example in the tag formatting section.

This would appear to be 2 different things to some extent (format item separator vs. tag list separator), but a moot point really. The main thing is that I want to be sure that I'm understand how it works.

Thanks.

I don't think I understand what you mean by "instances of the format item" as being something different from "tags used in the format item". Each format item is replaced by the values of all the tag names in the format item, with duplicates removed and separated by the separator string. I am not sure what it would mean for a format item to have multiple instances, unless these instances are its tag values.
Find all posts by this user
Quote this message in a reply
18-05-2015, 21:47 (This post was last modified: 18-05-2015 21:48 by pzyvbv.)
Post: #7
RE: Display Format Tagging Syntax
Hi

I didn't explain it very well.

For a boxset I have used the $DiscSubtitle tag as part of the Album.displayFormat. So this display text is generated at the album level and will include all the values of $DiscSubtitle tag it finds for all tracks in that album, so all the album titles in the box set are listed as part of the album text delimited by the specified seperator. So at the album level there are multiple occurrences of the $DiscSubtitle.

This is different to effectively concatenating 2 tags within a single format item and using the seperator between the 2 tags. This concatenated tag (format item) could then be used at a level higher than the raw item (track) and may present multiple values similar to $DiscSubtitle. If this were to be the case then it is possible that a different delimiter is required.

An example might perhaps be that for a boxset as part of the Album.displayFormat you want the album name (boxset name) followed by each individual $DiscSubtitle and the date of that disc.

This would be something like:
Album.displayFormat={$Album^^^$DiscSubtitle$Date^ - ^^, }

My point (assuming what I have said so far is correct!) is that the seperator between $DiscSubtitle and $Date would be ", " and this would also have to be the seperator between the each occurence of $DiscSubtitle$Date at the album level.

So we would have:
boxsetname - discsubtitlea, 1980, discsubtitleb, 1981, discsubtitlec, 1982
whereas we might actually want:
boxsetname - discsubtitlea: 1980, discsubtitleb: 1981, discsubtitlec: 1982

Hopefully this is clearer....but it may also be wrong! Smile

C

On a side note I have mergeFolderAlbums set to false, but MinimServer is still merging boxsets so I end up with one boxset, and one set of albums in the boxset, and the track on every boxset album is repeated once from each boxset...? Normal albums (not boxsets) work fine and are not merged.

Should I raise this elsewhere?
Find all posts by this user
Quote this message in a reply
18-05-2015, 22:21
Post: #8
RE: Display Format Tagging Syntax
(18-05-2015 21:47)pzyvbv Wrote:  Hi

I didn't explain it very well.

For a boxset I have used the $DiscSubtitle tag as part of the Album.displayFormat. So this display text is generated at the album level and will include all the values of $DiscSubtitle tag it finds for all tracks in that album, so all the album titles in the box set are listed as part of the album text delimited by the specified seperator. So at the album level there are multiple occurrences of the $DiscSubtitle.

This is different to effectively concatenating 2 tags within a single format item and using the seperator between the 2 tags. This concatenated tag (format item) could then be used at a level higher than the raw item (track) and may present multiple values similar to $DiscSubtitle. If this were to be the case then it is possible that a different delimiter is required.

An example might perhaps be that for a boxset as part of the Album.displayFormat you want the album name (boxset name) followed by each individual $DiscSubtitle and the date of that disc.

This would be something like:
Album.displayFormat={$Album^^^$DiscSubtitle$Date^ - ^^, }

My point (assuming what I have said so far is correct!) is that the seperator between $DiscSubtitle and $Date would be ", " and this would also have to be the seperator between the each occurence of $DiscSubtitle$Date at the album level.

So we would have:
boxsetname - discsubtitlea, 1980, discsubtitleb, 1981, discsubtitlec, 1982
whereas we might actually want:
boxsetname - discsubtitlea: 1980, discsubtitleb: 1981, discsubtitlec: 1982

Hopefully this is clearer....but it may also be wrong! Smile

C

Thanks for the clarification. In this case, you are including $discsubtitle and $date in the same format item and this makes these tags equivalent for duplicate removal and separator purposes. This equivalence also applies when combining tags from different tracks in an album. I think it would add too much complexity to extend the format string to enable two different separators to be used in this unusual special case.

Quote:On a side note I have mergeFolderAlbums set to false, but MinimServer is still merging boxsets so I end up with one boxset, and one set of albums in the boxset, and the track on every boxset album is repeated once from each boxset...? Normal albums (not boxsets) work fine and are not merged.

Should I raise this elsewhere?

Are you saying that you have two differerent albums (box sets) with the same album name and albumartist name and these are getting merged together into a single album? if so, you can use a match filter (see my earlier post) to prevent this from happening.

If this is not what you are saying, please provide more detail with an example to illustrate the problem.
Find all posts by this user
Quote this message in a reply
18-05-2015, 23:44
Post: #9
RE: Display Format Tagging Syntax
Hi

Thanks for the reply. I didn't mean to imply anything should change - as you rightly say this is an unusual circumstance. I was mainly looking for confirmation that what I said made sense and I had correctly understood how it works...it would seem that I have which is great.

I am not sure how to use a match filter on the sub-folders for the box set as I already have a suffix [disc 1], [disc 2], etc? I did not really want to have to change the tags themselves - I could obviously alter the title of one box set to add a suffix to the tag so the album names no longer match. I need the sub-folders to be merged within the scope of each boxset... The catalog numbers of the boxsets are different, but I don't think that really helps...I guess I could add the catalog number to the album title? Can I have a match filter before the [disc 1] suffix, i.e. 2 suffixes?

The box sets have both been ripped the same so both have a box set folder (parent folder) suffix (or match filter) of [FLAC 44.1kHz 16bit 2ch] - if I were to change that would that stop the sub-folders being merged? I suspect not so I don't know what to do.

Thanks
C
Find all posts by this user
Quote this message in a reply
19-05-2015, 09:19
Post: #10
RE: Display Format Tagging Syntax
(18-05-2015 23:44)pzyvbv Wrote:  I am not sure how to use a match filter on the sub-folders for the box set as I already have a suffix [disc 1], [disc 2], etc? I did not really want to have to change the tags themselves - I could obviously alter the title of one box set to add a suffix to the tag so the album names no longer match. I need the sub-folders to be merged within the scope of each boxset... The catalog numbers of the boxsets are different, but I don't think that really helps...I guess I could add the catalog number to the album title? Can I have a match filter before the [disc 1] suffix, i.e. 2 suffixes?

You can add a match filter after the [disc 1] suffix. The match filter is enclosed by [' and '] rather than [ and ] to prevent any conflict with folder names that already have a suffix enclosed by [ and ]. For example, you can name the subfolder

My subfolder name [disc 1] ['12345678']

where 12345678 is the catalog number of the box set.

Quote:The box sets have both been ripped the same so both have a box set folder (parent folder) suffix (or match filter) of [FLAC 44.1kHz 16bit 2ch] - if I were to change that would that stop the sub-folders being merged? I suspect not so I don't know what to do.

Thanks
C

The name of this folder is not significant for the merging process because it doesn't contain any audio files.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)