importadded plugin is useful when an existing collection is imported
and the time when albums and items were added should be preserved.
To use the
importadded plugin, enable it in your configuration (see
The mtime of files that are imported into the library are assumed to represent the time when the items were originally added.
item.added field is populated as follows:
For singleton items with no album,
item.addedis set to the item’s file mtime before it was imported.
For items that are part of an album,
item.addedare set to the oldest mtime of the files in the album before they were imported. The mtime of album directories is ignored.
This plugin can optionally be configured to also preserve mtimes at
import using the
preserve_write_mtimes option is set, this plugin preserves
mtimes after each write to files using the
File modification times are preserved as follows:
For all items:
item.mtimeis set to the mtime of the file from which the item is imported from.
The mtime of the file
item.pathis set to
Note that there is no
album.mtime field in the database and that the mtime
of album directories on disk aren’t preserved.
To configure the plugin, make an
importadded: section in your
configuration file. There are two options available:
preserve_mtimes: After importing files, re-set their mtimes to their original value. Default:
preserve_write_mtimes: After writing files, re-set their mtimes to their original value. Default:
This plugin will skip reimported singleton items and reimported albums and all of their items.