SyncRules


 

Any source item (Medialibrary or playlist item) is matched against the rules to decide if it should be copied or converted (and which format). Rules cover items format, codec details and bitrate but also any TitleFormat-Expression can be used.

SyncRules are processed from top to button. The first matching rule wins and will cause the action (parameter 3, see below).

Configuration file syntax

Nameoptionalarrayitemssperatorstatus
SyncRulesnoyes3noneok
'Tracker Formats
SyncRules=IT*0*copy
SyncRules=MOD*0*copy
SyncRules=669*0*copy
SyncRules=XM*0*copy
SyncRules=S3M*0*copy
' anything else
SyncRules=*<115*copy
SyncRules=*>115*VORBIS_96

Parameter description

Parameter 1Parameter 2Parameter 3
sourceBRruleaction
MP3>250VORBIS_96

Parameterdescribtion
1source:
  • Simple: Decide by codec and codec profile of the source-item:
First, the source item's codec and codec profile is pulled from foobar2000 with the following TitleFormat-Expression: %codec%-[%codec_profile%]. Parameter source if compared with this. If it matches, BRrule is checked (see bleow).
Please note, that source may be a subset of %codec%-[%codec_profile%]. So if you define SyncRules=MP3*0*copy and a source items' %codec%-[%codec_profile%] is MP3-CBR, this will be true. Take a look at examplex below for a better understanding.
To match ANY source codec just leave source empty (e. g. SyncRules=*0*copy).
You may use a TitleFormatting Expression as source. If - and only if - it returns the string 'T' it is true and next paramater BRrule is checked.
Take a look at examples below for a better understanding.
2BRrule:
  1. '0' - will apply to any source bitrate
  2. '>xxx' - will be true if source items bitrate is >=xxx where xxx is the bitrate of source item im kbit/s.
  3. '<xxx' - will be true if source items bitrate is <=xxx where xxx is the bitrate of source item im kbit/s.
3action:
Defines the action that will take place if source AND BRrule is true.
  1. 'copy' - will copy the source item to the target
  2. 'ignore' - will ignore / exclude the item from sync
  3. Place the identifier of a ConvertFormats here and the source item will be converted with theese instructions to target.

Examples

Here are some examples for better understanding.

Source itemSyncRulesresult sourceresult BRruleexplaination
%Title% is 'Secrets'$if($strcmp(%title%,'Secrets'),'T')*0*copyTrueTrue'Secrets' is found the %title%, BRrule is '0' and therefore always true.
%codec%-[%codec_profile%]=MP3-VBR V4MP3-CBR*0*copyFalseTrueSource is MP3 but not CBR.
%codec%-[%codec_profile%]=MP3-VBR V4MP3*0*copyTrueTrueWith this source any 'MP3' will match this rule.


Tip

If you use a TitleFormat-Expressions as source, create a custom column in your playlist view and insert your expression. So you can check the result immediately in Foobar!


- This page belongs to category ConfigurationFiles
- Check out the other Pages, that belong to the wiki-category Documentation !
- Ask and discuss at the FoobarSync discussion thread on Hydrogenaudio Forums
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki