Skip to content

MTP Sync : Preserve alphabetical order

Cédric Bellegarde requested to merge gillesgagniard:feature/mtimedb into master

Created by: gillesgagniard

Currently, the MTP sync feature will prepend all filenames at the destination with their mtime.

Unfortunately, cheap Mass Storage music players (such as car infotainment systems) will simply read tracks as they are ordered in the FAT. Utilities such as fatsort can rewrite FAT from filename alphabetical order, but prefixing all tracks with mtime breaks this.

The goal of this patch is to store last modification times for every source file in a dedicated db on-device (a simple JSON file really), and use it to determine if source has been modified and destination needs to be copied again. This patch also removes the mtime prefix for all files as it is now unnecessary.

Merge request reports