Revision [650]

This is an old revision of IDfile made by AdminUser on 2015-04-11 13:28:58.

 

Configuration File sections


 

Purpose of configuration files

A configuration file contains the instructions to sync your foobar2000 stuff to ONE target. Therefore it is a good idea to store a configuration file in the root folder of the target it belongs to.

Using Comments in configuration files

Lines that begin with an Apostrophe are ignored. So you can put comments in your files. Also any line that does not start with a sectionname followed by equal-sign is ignored.
' This line is just a comment
Because this line does not begin with a sectionname it is ignored to.


Configuration File Sections


Below explanations each contain a table with following information:
Headermeaning
Nameis the section name in a configuration file. It is always followed by '=' (equal-sign) and it ends with the end of the line.
optionalmeans that you may omit the section. Best to do this is to place an Apostrophe right before it.
arraytells you if this section name can be used multible times. Best example is the section SyncRules, which defines the rules (plural!) for your synchronization.
itemstells the number of arguments, seperated by the seperator (below).
speratoris used to seperate the arguements. Most times it is an asterisk ('*') but space and comma are also used.
statusshould always be 'ok'. Maybe future functionallity or issues are signed here.

MediaName

Simply gives your target a name that is shown at some places.
Nameoptionalarrayitemssperatorstatus
MediaNameyesno1noneok
MediaName=Mom's 60 GB Ipod with Rockbox-Player

MaxTitles

If your target is limited to a maximum number of items it can manage you can use this to give a warning if the maximum is exceeded. If the anaylisis is finished and there would be more than MaxTitles on the target, you will be promptet to continue. If there is no maximum just enter 0 or comment that line.
Nameoptionalarrayitemssperatorstatus
MaxTitlesyesno1noneok
MaxTitles=1000

MinSpace

You may want to preserve a given amount of free space on the target for other stuff then audio. You can do so by useing MinSpace. When the anaylisis is finished and the estimation would cause less free space after sync, you will be prompted to continue.
Nameoptionalarrayitemssperatorstatus
MinSpaceyesno1nonenew, ok
'simply specify the amount of space in MB that should be preserved.
MinSpace=1000

MLsyncFlag

is used to identify the items in your Medialibrary, that will be synced to a target. As you can see MLsyncFlag is a foobar2000 query syntax, which is explained here.Normaly you will use one tag (e.g. SYNCTAG) in foobar2000 in combination with Tagger Panel Component, to select the Medialibrary-items, you like to have on a target easily.
Below example will sync all audio-files from your MediaLibrary which have 'Ipod_Mom' in the tag 'SYNCTAG' or which have a rating of 4 or above.
Nameoptionalarrayitemssperatorstatus
MLsyncFlagnono1noneok
MLsyncFlag=("%SYNCTAG%" HAS "Ipod_Mom") OR ("%RATING%" GREATER 3)

PLRegExExclude

By default any playlist in your foobar2000 will get sychronized to your target (if you specified option 'P' in parameter 'Tasks' - see command line parameters. This section gives you the chance to exclude playlists.
Each playlist in your foobar2000 will be checked against the comma-seperated list of RegExp search-patterns. Please note that the script will add an asterix in front of and at the end of every playlist name. Therefore the below example will exclude any playlist, that starts with '#' and any playlist which contains 'SQL'. It will exclude playlist 'Rock' but will not exclude 'Good Rock'.
Nameoptionalarrayitemssperatorstatus
PLRegExExcludeyesno1<comma>ok
PLRegExExclude=\*#,SQL,\*UPnP,\*Rock,\*tmp

PLRegExInclude

This section gives you the chance to include playlists. This is done after PLRegExExclude. Each playlist in your foobar2000 will be checked against this comma-seperated list of RegExp search-patterns. Please note that the script will add an asterix in front of and at the end of every playlist name; same as above with PLRegExExclude.
Useful scenario: Exclude all playlists with PLRegExExclude and choose only specific playlists to sync with PLRegExInclude.
Below example will include playlist 'Rock', even it it was excluded before by matching a RegExp search of section PLRegExExclude.
Nameoptionalarrayitemssperatorstatus
PLRegExIncludeyesno1<comma>ok
PLRegExInclude=\*Rock\*

MLSyncBaseDir

Is the base path, starting at the root-folder of your target, where the audio files from your Medialibrary will be synced to (defined by MLsyncFlag).
BE AWARE THAT NO OTHER FILES OR FOLDERS ARE IN HERE! THEY WILL GET DELETED!!
Below example means 'G:\_AudioML' if your target is a drive with letter 'G:'.
Nameoptionalarrayitemssperatorstatus
MLSyncBaseDirnono1noneok
MLSyncBaseDir=_AudioML

PLSyncBaseDir

Is the base path, starting at the root-folder of your target, where the audio files from your playlists will be synced to. Can be the same as MLSyncBaseDir but for technical reasons you then have to sync Medialibrary and playlists at once.
BE AWARE THAT NO OTHER FILES OR FOLDERS ARE IN HERE! THEY WILL GET DELETED!!
Below example means 'G:\_AudioPL' if your target is a drive with letter 'G:'.
Nameoptionalarrayitemssperatorstatus
PLSyncBaseDirnono1noneok
PLSyncBaseDir=_AudioPL

MLSyncTargetDir

Defines the structure for files and folders for files which are synced from your Medialibrary to your target.
Every array-item of MLSyncTargetDir creates a folder - except the last item, which defines the filename. Formatting is done by useing Foobars TitleFormat-Language. Don't forget to add .$ext(%path%) to the last item!
Below example may generate following path: ....\Mainstream\! Disco\ArtistXY - AlbumZ\02.01. Title1AtDisc2.MP3
Nameoptionalarrayitemssperatorstatus
MLSyncTargetDirnoyes1noneok
[! $meta(genre,1)]\Test funktioniert? Beim %Title% wird \ entfernt??


MLSyncTargetDir=$replace($meta(genre,0),'Pop','Mainstream')
MLSyncTargetDir=[! $meta(genre,0)]
MLSyncTargetDir=[! $meta(genre,1)]
MLSyncTargetDir=[! $meta(genre,2)]
MLSyncTargetDir=[! $meta(genre,3)]
MLSyncTargetDir=$if($strcmp($meta(Album Artist),'Various'),'_'%album%,%artist% - %album%)
MLSyncTargetDir=[$num(%discnumber%,2).][$num(%tracknumber%,2). ]$if($strcmp($meta(Album Artist),'Various'),[%track artist% - ]%title%,%title%).$ext(%path%)

PlaylistDir

Tells FoobarSync where your playlist-files (*.m3u) are stored on the target.
Take care! All m3u-files in this folder will get deleted and afterwards rebuilt, even if you specify 't' in the command line parameter 'task' !!
'\' means root folder.
Nameoptionalarrayitemssperatorstatus
PlaylistDirnono1noneok
PlaylistDir=Playlists

PlayListFormat

Defines the format of your playlist-files (m3u).
0 = simple format (default, paths only)
1 = extendet format (definition here)
Nameoptionalarrayitemssperatorstatus
PlayListFormatyesno1noneok}}
PlayListFormat=0

PLSyncTargetDir

Defines the structure for files and folders for files which are synced from your Playlists to your target.
Every array-item of PLSyncTargetDir stands for a folder except for the last item, which defines the filename. Formatting is done by useing Foobars TitleFormat-Language. Don't forget to add and .$ext(%path%) to the last item!
Below example may generate following path: \PLSyncBaseDir\Mainstream\! Disco\ArtistXY - AlbumZ\02.01. Title1AtDisc2.MP3
Nameoptionalarrayitemssperatorstatus
PLSyncTargetDirnoyes1noneok
PLSyncTargetDir=[%Genre% - ][%if2(%track artist%,%artist%) - ][%title% - ][%album% - ][$num(%discnumber%,2).][$num(%tracknumber%,3)].$ext(%path%)

PLregExRepl

Gives you the power to modify the filepaths inside the m3u-files on your target with a RegExp search&replace pattern.
If your playing device is Android or Linux you will need it because direct sync to the target is not supported. Therefore you will first sync to a folder on your windows-PC and afterwards sync via samba to the playing device. As result the paths in your M3U-files need to be adjusted to the final paths on your playing device.
Below example replaces a part of the path and changes '\' to '/'
If you sync to Linux-targets this will be useful for you - be sure to read this first!
Nameoptionalarrayitemssperatorstatus
PLregExReplyesyes2*ok
PLregExRepl=tmpfolder\\external_sd*\storage\sdcard1\synced
PLregExRepl=\\*/

ReplaceChrs

Does a case insensitive search&replace for one or more sets of characters in the destination paths of your audio-files on the target. Useful if e.g. your car audio does not support special charcaters like german umlauts.
Replacement is done before WhiteListChrs-filtering happens. As you can see it is possible to replace single characters with words ('$' -> 'Dollar'). But because the seperator is the space character you can not replace space or use space in the replacement.
Below example replaces umlauts ä, Ä, ö, Ö, ü and Ü with '#' and '$ ' with 'Dollar'.
Nameoptionalarrayitemssperatorstatus
ReplaceChrsyesyes2<space>ok
ReplaceChrs=äöü #
ReplaceChrs=$ Dollar

WhiteListChrs

Contains all allowed characters for the paths on your target as RegExp expression. So any file/folder will get filtred and all characters which are not listed here will be omited.
Nameoptionalarrayitemssperatorstatus
WhiteListChrsnoyes1noneok
WhiteListChrs=[A-Z 0-9-+#@.=!_ÖÄÜßöaöäü(){}&§$\[\]]+

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.
See detailed documentation here: SyncRules
Nameoptionalarrayitemssperatorstatus
SyncRulesnoyes3noneok
'Tracker Formats
SyncRules=IT*0*ignore
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

MaxFFMPEGThreads

Defines how many parallel encoding tasks are allowed.
Nameoptionalarrayitemssperatorstatus
MaxFFMPEGThreadsyesno1noneok
MaxFFMPEGThreads=3

ConvertFormats

contain the instructions for the formats you wish to use on your target.
See extra documentation here: ConvertFormats
Nameoptionalarrayitemssperatorstatus
ConvertFormatsnoyes4-5*ok
' DEFAULT
ConvertFormats=###*OGG*-vn -c:a libvorbis -ac 2 -ab 96k*96*_q2
' MP3
ConvertFormats=MP3_256*MP3*-vn -ac 2 -ab 256k*256

preCMD

Invokes a command line before analysis is started.
Nameoptionalarrayitemssperatorstatus
preCMDyesyes1nonenot jet implemented!
preCMD="attrib "%1\%2\*.*" -h%*%&

Parametermeaning
%1will be replaced by the driveletter of your target, for example 'G:'
%2will be replaced by MLSyncBaseDir of your target, for example 'G:'
%3will be replaced by PLSyncBaseDir of your target, for example 'G:'
%4will be replaced by PlayListDir of your target, for example 'G:'
%*will make FoobarSync tell to hide the cmd-window
%&will tell FoobarSync tell to not wait for completion of the command

postCMD

Invokes a command line at the end of synchronization.
Parameters are the same as preCMD.
Nameoptionalarrayitemssperatorstatus
preCMDyesyes1nonenot jet implemented!


- 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