![]() |
![]() |
![]() |
![]() |
This chapter explains how to configure the MME's media copy and ripping behavior.It includes:
The table below list media copy and ripping configuration elements. All media copy and ripping configuration elements are under the <Configuration>/<Copying> element.
Element | Attributes | Default | Description |
---|---|---|---|
<DeleteOnError> | type | none | Delete the current entry from the copyqueue table, based on the value of the type attribute. See “Error management” below for more detailed information. |
<Encoding> | empty | ||
<Encoding>/<ENCODEFORMATID> | 2 | Default encode format for ripped media. The value for this element corresponds to a row in the encodeformats table. The default setting (2) is for the .wav format. | |
<Mode> | background | Set media copy and ripping mode. If set to background, playback has priority. If set to priority, media copy and ripping operations have priority. | |
<UpdateMetadata> | enabled | true | If the accurate field in the library table for the file is set to 0 (zero) indicating that the metadata is not accurate, before copying or ripping the file, the MME synchronizes the source file so its metadata is accurate. |
The <DeleteOnError> configuration element controls copying and ripping operations when they encounter errors.
The following flags determine when the MME automatically deletes entries from the copyqueue table, and their equivalent setting for the <DeleteOnError> type attribute:
Constant | Value | type | Description |
---|---|---|---|
CONFIG_DELETE_ON_TYPE_NONE | 0 | none | Do not automatically delete copyqueue table entries |
CONFIG_DELETE_ON_TYPE_ANY | 1 | any | Delete the copyqueue table entry on any error. |
CONFIG_DELETE_ON_TYPE_NR | 2 | nonrecoverable | Delete the copyqueue table entry on a nonrecoverable error. |
CONFIG_DEF_COPYING_DELETE_ON_TYPE | – | none | Do not automatically delete copyqueue table entries |
The mediacopier considers a nonrecovereable error to be an attempt to copy or rip a file that meets one or more of the following criteria:
If the nonrecoverable option is set (<DeleteOnError type="nonrecoverable"/> files that meet any of the above criteria are automatically removed from the copy queue.
The nonrecoverable setting does not cause the mediacopier to remove from the copy queue files that generate read errors . To remove files (scratched or bad media) that cause read errors, and files that are DRM or copy protected, corrupt, use unsupported codecs, set the type attribute to "any".
This section describes the media copying and ripping destination configuration elements:
The elements in the table below configure destination parameters for media copying and ripping operations. They are under the <Copying>/<Destination> element.
Element | Attributes | Default | Description |
---|---|---|---|
<Filename> | Default name to assign to ripped files: $0TRACK-$TITLE(date=$DATESTAMP, time=$TIMESTAMP, srcfid=$SRCFID). | ||
<FileOverwrite> | false | If set to true, overwrite destination files during ripping operations. | |
<Folder> | Default destination folder for ripped files: /ripped/$ARTIST/$ALBUM/. | ||
<IgnoreNonAccurate> | enabled | false | If set to true, when file metadata is not accurate, use the default file name defined by the <Filename> element. |
<MediastoreMountpath> | /media/drive | The path to the default destination mediastore for copied and ripped media. | |
<PreservePath> | enabled | false | If set to true, preserve folder paths from source mediastore on the destination mediastore. For information about how to override this setting for individual copy operations, see Using the $*PRESERVE_PATH* template strings in the MME Developer's Guide. |
The default destination mediastore is identified by its mountpath. This mountpath:
The MME evaluates the values for the destination mediastore when it adds items to the copy queue. It checks the value of mme_mediacopier_info_t.dstmsid, and if this value is set to 0 (use the configured default), it writes the copied or ripped files to whatever mediastore is at the configured destination path. Thus, for example, if you set the value of <MediastoreMountpath> to /fs/usb0, the MME will write copied and ripped files to whatever mediastore is at this path.
The element <Copying>/<Destination>/<FileOverwrite> allows the overwriting of destination file during ripping operations. If the attribute of this element is set to true, when the MME encounters in the destination directory a copy of a file it is ripping, it will overwrite the file, but still deliver the event MME_COPY_ERROR_FILEEXISTS.
If metadata is not available for the template, the MME will insert a default value, such as “Unknown Artist” for $ARTIST from the languages table.
The <IgnoreNonAccurate> element allows you to choose a different filename if the metadata is not marked as accurate. If you have valid metadata, you may want to use the destination filename you have provided, but if the metadata is not valid, you may wish to choose a different filename to guarantee its uniqueness.
For example, if you choose the destination filename $0TRACK-$TITLE and the metadata is not available, the MME will assign the track name “01-Unknown Title.wma”. If you have another CD with no metadata, you will get the same track name for tracks on that CD. Setting the <IgnoreNonAccurate> flag tells the MME to ignore the filename template you requested and fall back to the default template specified in the config.h and mme.conf configuration files. A template such as “$0TRACK-$TITLE_$SRCFID” will guarantee that all filenames are unique by appending the source tracks' file IDs (fids) to the filenames.
The table below lists default media copy and ripping management constants.
Constant | Value | Description |
---|---|---|
CONFIG_DEF_COPYING_MODE | 0 | Perform media copy and ripping in the background. Playback has priority. |
MME_MEDIACOPIER_MODE_BKG | 1 | Perform media copy and ripping in the foreground. Copy and ripping have priority. |
CONFIG_DEF_COPYING_DEST_MEDIA_STORE | "/media/drive" | The default destination folder for copy and ripping. See “Configuring the destination” above. |
CONFIG_DEF_COPYING_ENCODEFORMATID | 2 | The default ripping is to WAV format. |
CONFIG_DEF_COPYING_DEST_FOLDER | * | The default destination folder for ripping. Name must be unique. See “Configuring the destination” above.
* Default value is “/ripped/$ARTIST/$ALBUM/”. |
CONFIG_DEF_COPYING_DEST_FILENAME | ** | The default filename template for copied and ripped files. See “Files with insufficient metadata” above.
** Default value is “$0TRACK-$TITLE(date=$DATESTAMP,time=$TIMESTAMP,srcfid=$SRCFID)”. |
CONFIG_DEF_COPYING_PRESERVEPATH_ENABLED | false | Enable creation of folder paths to the copied file. If set to false the copy operation will copy all files to the same folder. |
CONFIG_DEF_COPYING_IGNORE_NONACCURATE_ENABLED | false | Enable use of default copying template if metadata is not accurate. If set to false, files with inaccurate or incomplete metadata may produce copied files with metadata that is not unique. |
![]() |
![]() |
![]() |
![]() |