Wiki source for SyncRules


Show raw source

======""SyncRules""======

<<{{{toc title="Table of Contents" levels="h2,h3,h4,h5"}}}<<::c::
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 [[http://wiki.hydrogenaud.io/index.php?title=foobar2000:Title_Formatting_Reference|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=====
|=|Name|=|optional|=|array|=|items|=|sperator|=|status||
||""SyncRules""||no||yes||3||none||ok||
||(x:6)%%'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 1|=|Parameter 2|=|Parameter 3||
||source||BRrule||action||
||MP3||>250||VORBIS_96||

|=|Parameter|=|describtion||
||1||__source:__
- __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 [[http://wiki.hydrogenaud.io/index.php?title=foobar2000:Title_Formatting_Reference|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'').
- __Advanced: Use a [[http://wiki.hydrogenaud.io/index.php?title=foobar2000:Title_Formatting_Reference|TitleFormat-Expression]]__
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.
||
||2||__BRrule:__
1) '0' - will apply to any source bitrate
1) '>xxx' - will be true if source items bitrate is >=xxx where xxx is the bitrate of source item im kbit/s.
1) '<xxx' - will be true if source items bitrate is <=xxx where xxx is the bitrate of source item im kbit/s.
||
||3||__action:__
Defines the action that will take place if //source// AND //BRrule// is true.
1) 'copy' - will copy the source item to the target
1) 'ignore' - will ignore / exclude the item from sync
1) 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 item|=|""SyncRules""|=|result //source//|=|result //BRrule//|=|explaination||
||""%Title% is 'Secrets'""||$if($strcmp(%title%,'Secrets'),'T')*0*copy||True||True||'Secrets' is found the %title%, //BRrule// is '0' and therefore always true.||
||''%codec%-[%codec_profile%]''=MP3-VBR V4||MP3-CBR*0*copy||False||True||Source is MP3 but not CBR.||
||''%codec%-[%codec_profile%]''=MP3-VBR V4||MP3*0*copy||True||True||With this source any 'MP3' will match this rule.
||


=====Tip=====
If you use a [[http://wiki.hydrogenaud.io/index.php?title=foobar2000:Title_Formatting_Reference|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 [[http://www.hydrogenaud.io/forums/index.php?showtopic=108834|FoobarSync discussion thread on Hydrogenaudio Forums]]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki