Foobar2000:Properties/Automatically Fill Values: Difference between revisions

From Hydrogenaudio Knowledgebase
m (→‎Usage Tips: fixed a misnomer)
(Get some string enclosed by brackets from title field)
 
Line 18: Line 18:


If you want to ignore a part of the source pattern, you can insert a %% to prevent that section from being mapped to a field.
If you want to ignore a part of the source pattern, you can insert a %% to prevent that section from being mapped to a field.
== Example ==
==== Get some string enclosed by brackets from title field ====
Consider a title composed in this way : $title [$composer] (ie: Domine, quando veneris  [G.P. da Palestrina/R. Rognoni]) <br />
You wish to retrieve the composer from the title:
* select Source : "Other..."
<code>
$replace($right(%title%,$sub($len(%title%),$strstr(%title%,'['))),']',)
</code>
*  Pattern
<code>
%composer%
</code><br />
Next, you wish to clean the title:
* select Source : "Other..."
<code>
$left(%title%,$sub($strstr(%title%,'['),2))
</code>
*  Pattern
<code>
%title%
</code>
<br />
If you need some explanations, please consider the [[Foobar2000:Title_Formatting_Reference|manual]]

Latest revision as of 19:56, 11 April 2020

Screenshot

Tools menu: how to reach this dialog

Usage

To activate this dialog, choose "Automatically Fill Values" from the Tools menu of the Properties dialog.

The "Automatically Fill Values" dialog lets you transfer information about your tracks from file names, existing metadata fields or any other sources (through clipboard) to metadata fields. Its main purpose is to deal with files having empty or incorrect tags but correct artist/title/etc information in file names.

For an example, if you want to transfer metadata values from file names and your file naming scheme is "artist\album [date]\nn. title", you should set source to "File Names" and pattern to "%artist%\%album% [%date%]\%tracknumber%. %title%".

Usage Tips

Note that the syntax used by Automatically Fill Values patterns is not based on title formatting and does not support any of title formatting specific features such as $functions() or square brackets for optional parts.

Different "source" modes in the Automatically Fill Values dialog have additional implications. For an example, source set to "Other..." / %filename% works differently than the "File Names" mode - the latter looks at names of folders containing your tracks if the pattern contains backslash characters.

If you want to ignore a part of the source pattern, you can insert a %% to prevent that section from being mapped to a field.

Example

Get some string enclosed by brackets from title field

Consider a title composed in this way : $title [$composer] (ie: Domine, quando veneris [G.P. da Palestrina/R. Rognoni])
You wish to retrieve the composer from the title:

  • select Source : "Other..."

$replace($right(%title%,$sub($len(%title%),$strstr(%title%,'['))),']',)

  • Pattern

%composer%

Next, you wish to clean the title:

  • select Source : "Other..."

$left(%title%,$sub($strstr(%title%,'['),2))

  • Pattern

%title%
If you need some explanations, please consider the manual