-
Notifications
You must be signed in to change notification settings - Fork 0
Tag Mapping
You can use CTI's Tag mapping parameter to combine information from tags and store it in a new virtual tag.
Since I haven't modified tag mapping, the CustomScan rules still apply:
There are three ways to create a virtual tag:
-
oneof
- Selects information from one of several specified tags. The information will be taken from the first tag that exists. -
combine
- Concatenates information from several tags into a single tag. -
as
- Takes information from one tag. This can be used to rename tags or extract parts of a tag into a virtual tag.
For each tag in the above described ways, you can also specify how the information from a tag should be used:
-
exp
- Extract information from the tag using a regular expression with a catch group. -
text
- Use the specified text instead of the tag value if the tag exists.
If you have an example file with these tags (and values):
ARTIST = Lisa Stansfield
ALBUMARTIST = Whitney Houston
DATE = 1992-01-01
COMMENT = Songs-DB_Custom1: Soundtrack
GENRE = Pop
ALLARTISTS=combine ALBUMARTIST|ARTIST(text= and )|ARTIST|TRACKARTIST(text= and )|TRACKARTIST
The result for our example file will be: ALLARTISTS="Whitney Houston and Lisa Stansfield"
DECADE=combine DATE(exp=^(\d\d\d))|DATE(text=0)
The result for our example file will be: DECADE="1990"
CUSTOM1=as COMMENT(exp=^Songs-DB_Custom1:\s*(.+)$)
The result for our example file will be: CUSTOM1="Soundtrack"
YEAR=as DATE(exp=^(\d\d\d\d))
The result for our example file will be: YEAR="1992"
COMPOSER=oneof COMPOSER|ARTIST
The result for our example file will be: COMPOSER="Lisa Stansfield".