Post Reply 
Confusing format string
19-01-2015, 22:59
Post: #1
Confusing format string
I'm really sorry but it's impossible for me to see the logic in the format string grammar used in the tagFormat property:
What is the difference between:
Artist.displayFormat={$artist$orchestra}
and:
Title.displayFormat={$title^$date} ?

This is taken from your examples in the user guide. Why has the second string an '^' character between $title and $date?
You write that each occuring '^' character denotes the prefix, postfix and separator - in this order. How does this match with the format string Title.displayFormat={$title^$date}?

And what format string would I need to just append let's say an 'x' to the tag? It should be {$tag^^x}

greets,
Wolfgang
Find all posts by this user
Quote this message in a reply
19-01-2015, 23:21
Post: #2
RE: Confusing format string
(19-01-2015 22:59)Wolfgang Wrote:  I'm really sorry but it's impossible for me to see the logic in the format string grammar used in the tagFormat property:
What is the difference between:
Artist.displayFormat={$artist$orchestra}
and:
Title.displayFormat={$title^$date} ?

This is taken from your examples in the user guide. Why has the second string an '^' character between $title and $date?

The first of these contains a single format item and the second contains two format items. Within each format item, duplicate values are eliminated automatically (for example, if there are Artist and Orchestra tags with the same value).

Quote:You write that each occuring '^' character denotes the prefix, postfix and separator - in this order. How does this match with the format string Title.displayFormat={$title^$date}?

Any prefix/suffix/separator that isn't specified has its default value. The default for prefix and suffix is the empty string and the default for separator is a comma followed by a space.

Quote:And what format string would I need to just append let's say an 'x' to the tag? It should be {$tag^^x}

This is correct as long as the tag has only a single value. You have specified an empty prefix, a suffix value of x and the default separator.
Find all posts by this user
Quote this message in a reply
20-01-2015, 18:08
Post: #3
RE: Confusing format string
Quote:
Quote:And what format string would I need to just append let's say an 'x' to the tag? It should be {$tag^^x}

This is correct as long as the tag has only a single value. You have specified an empty prefix, a suffix value of x and the default separator.

I did exactly that with the BpM tag: {$BPM^^ stars}
But this still only shows the BPM value only. As I put my rating in this tag I want it to appear as "3 stars" eg.

Greets!
Find all posts by this user
Quote this message in a reply
20-01-2015, 18:23
Post: #4
RE: Confusing format string
(20-01-2015 18:08)Wolfgang Wrote:  I did exactly that with the BpM tag: {$BPM^^ stars}
But this still only shows the BPM value only. As I put my rating in this tag I want it to appear as "3 stars" eg.

Greets!

If you used BPM.displayFormat={$BPM^^ stars}, this has no effect on the entries in the BPM index. See the first paragraph of this section for a description of the difference between displayFormat and indexFormat.
Find all posts by this user
Quote this message in a reply
20-01-2015, 18:59
Post: #5
RE: Confusing format string
(20-01-2015 18:23)simoncn Wrote:  If you used BPM.displayFormat={$BPM^^ stars}, this has no effect on the entries in the BPM index. See the first paragraph of this section for a description of the difference between displayFormat and indexFormat.

Oh my dog, got it. Thanks!
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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