Maintaining constant IDs for updated files and playlists

The <ChangedFilesHaveConstantId> element in the configuration file and the dynamic_folder option in the command for starting a synchronization both force mm-sync to keep the same IDs in the database for media and playlist files that have been modified.

By default, during the files pass of synchronization, mm-sync treats any media or playlist file whose size or date has changed as new and synchronizes it accordingly, adding a table entry with a new file ID. For new media files, it's a files table entry with a unique fid value. For new playlist files, it's a playlists table entry with a unique plid value. When either the <ChangedFilesHaveConstantId> configuration setting or the dynamic_folder option for a particular synchronization is enabled, the files pass does not consider media files and playlists with changes in size or modification date as new, but maintains their file IDs and sets their accurate fields to 0 to indicate that the file metadata might have changed.

Thus, if you configure mm-sync to maintain constant file IDs for changed media or playlist files, you must check a file's accurate field before you can use its metadata. If the accurate field is 0, then the file requires a metadata or playlist synchronization pass.

This setting slows down the files pass of synchronization when the filesystem has changed, but is necessary for legacy media applications that aren't designed to accommodate the file ID changing when a file is modified.

Note: For media files not successfully synchronized during the metadata pass or for playlist files not successfully synchronized during the playlist pass, their accurate field will be set to 0, regardless of the <ChangedFilesHaveConstantId> or dynamic_folder setting.

Playlist synchronization behavior

Playlist synchronization differs from media file synchronization in the following ways: