The libmd configuration file lists the preferential plugin order, the library files implementing the plugins, and other configuration settings.
The libmd library is shipped with a default configuration file. You can modify this included file or create your own. You can also override the default path that the library looks in for the configuration file, when calling mmmd_init(). If you pass in a configuration path of NULL, the library searches the path given in the MM_MD_CONFIG environment variable or if this variable isn't defined, the default path of /etc/mm/mm-md.conf.
[plugin]
[plugin] dll=mm-mdp-mmf.so lazyloadfilters=1
You can add comments in the file by starting lines with the number sign (#).
To support a good user experience, your configuration file should define at least all the MDPs needed to extract any metadata field used by your client applications. Most likely, you'll have to provide more than one plugin section in your configuration because most MDPs don't support every metadata field.
[typeratings]
file=mmf,exif,img
# libmd config file [plugin] dll=mm-mdp-mmf.so lazyloadfilters=1 [plugin] dll=mm-mdp-cdda.so #[plugin] #dll=mm-mdp-exif.so #[plugin] #dll=mm-mdp-img.so #[plugin] #dll=mm-mdp-ipod.so #[plugin] #dll=mm-mdp-extart.so #ignore_case=true #max_search=100 #max_cache_entries=0 # All regular expressions following the first instance must have # a unique suffix appended to them (e.g., regex, regex1, regex2). #regex=album\.jp[e]?g #regex1=folder\.jp[e]?g #[plugin] #dll=mm-mdp-mediafs.so [typeratings] file=mmf #file=mmf,exif,img http=mmf cdda=cdda rtsp=mmf #ipod=ipod #mtp=mediafs
MDP | Setting | Description |
---|---|---|
Extart | ignore_case | Use case-insensitive matching of filenames; this is usually desired |
max_cache_entries | Limit the number of folders cached after searching; this helps limit memory usage | |
max_search | Limit the number of files to check in a folder when looking for external artwork. Defining this setting lets you keep the search time within a reasonable limit. For example, if a folder contains 10 000 files but max_search is 100, only the first 100 files will be checked for artwork. | |
regex[#] | Define POSIX regular expression (regex) patterns for matching names of artwork files. You can define multiple fields; the first can be named regex but the remaining fields must contain unique suffixes (e.g., regex1, regex2). | |
MMF | lazyloadfilters | Don't initialize MMF until the first request for metadata; this saves on startup time |