This release contains all the changes of the unreleased versions below. I wanted to wait with the release to catch bugs and make sure it is really stable!
5.0.6
✨ New Features
- Added Auto-Resume support to avoid repeat successful steps when tool is interrupted and executed again on the same output folder. (#87).
🚀 Improvements
- Untitled Albums now are detected and moved to
Untitled Albumsforder. (only if albums strategy isshortcut,reversed-shortcutorduplicate-copy, the rest of albums strategies don't creates albums folders). (#86). - Upgraded exif_reader package to the newest version.
🐛 Bug Fixes
- Minor Bug Fixing.
- Fixed #90 (duplicated output in interactive mode)
- Fixed major error which led to native exif write methods not being used when exiftool was not installed.
- Fixed issue with App1 marker in image library when jpg has no exif block. Using own fork of image library until pull request to the source repo is accepted. Fixes issue #95
5.0.5
✨ New Features
- Added support for Special Folders management such as
Archive,Trash,Locked folder. Now those folders are excluded from all album strategies and are moved directly to the output folder.
🚀 Improvements
- Moved logic of each Step to step's service module. Now each step has a service associated to it which includes all the logic and interation with other services used by this step.
- Added percentages to all progress bars.
- Added Total time to Telemetry Summary in Step 3.
- Fixed _extractBadPathsFromExifError method to detect from exiftool output bad files with relative paths.
- Performance Improvements in
step_03_merge_media_entities_service.dart.- Now grouping method can be easily changed. Internal
_fullHashGroupis now used instead of 'groupIdenticalFast' to avoid calculate buckets again.
- Now grouping method can be easily changed. Internal
🐛 Bug Fixes
- Fixed duplicated files/symlinks in Albums when a file belong to more than 1 album (affected strategies: shortcut, reverse-shortcut & duplicate-copy).
- Fixed error decoding Exiftool output with UTF-8/latin chars.
- Fix exiftool reader fails on path with mojibake.
5.0.4
✨ New Features
- New album moving strategy
ignoreto completely ignore all Albums content. The difference withnothingstrategy is thatnothingdon't create Albums folders but process and move all Albums content intoALL_PHOTOSfolder.
🚀 Improvements
- Moving Strategies re-defined.
- Included Timeouts on ExifTool operations.
- Log saving enabled by default. Use flag
--no-save-logto disable it. - Changed log name from
gpth-{version}_{timestamp}.logtogpth_{version}_{timestamp}.log - Added progress bar to Step 3 (Merge Media Entities).
- Changed default value for flag `--update-creation-time. Now is enabled by default.
- Smart split in writeBatchSafe: we parse stderr, separate only the conflicting files, retry the rest in a single batch, and write the conflicting ones per-file (without blocking progress). If paths can’t be extracted, we fall back to your original recursive split.
- Added Progress bar on Step 1 & Step 2.
🐛 Bug Fixes
- Added
reverse-shortcutstrategy to interactive mode. - Fixed some moving strategies that was missing some files in the input folder.
- Fixed exiftool_service.dart to avoid IFD0 pointer references.
- Fixed exiftool_service.dart to avoid use of -common_args when -@ ARGFILE is used.
- Fixed PNG management writting XMP instead of EXIF for those files.
- (ExifToolService): I added -F to the common arguments (_commonWriteArgs). It’s an immediate patch that often turns “Truncated InteropIFD” into a success.
- (Step 7): If we detect a “problematic” JPEG, we force XMP (CreateDate/DateTimeOriginal/ModifyDate + signed GPS), both when initially building the tags (via _forceJpegXmp) and again on retry when a batch fails and stderr contains Truncated InteropIFD (in-place conversion of those entries with _retagEntryToXmpIfJpeg).
5.0.3
🚀 Improvements
- Replace all
print()functions bylogPrint()method from LoggerMixin class. In this way all messages are registered both on screen and also on the logger (and saved to disk if flag--save-logis enabled). - All console messages have now a Step prefix to identify from which step or service they come from.
5.0.2
✨ New Features
- New flag
--save-logto enable/disable messages log saving into output folder. - Step 8 (Update creation time) is now multi-platform. Also update creation date for physical files and symlinks on linux/macos.
🚀 Improvements
- New code re-design to include a new
MediaEntitymodel with the following attributes:albumsMap: List of AlbumsInfo obects, where each object represent the album where each file of the media entity have been found. This List which can contain many usefull info related to the Album.dateTaken: a single dataTaken for all the files within the entitydateAccuracy: a single dateAccuracy for all the files within the entity (based on which extraction method have been used to extract the date)dateTimeExtractionMethod: a single dateTimeExtractionMethod for all the files within the entity (method used to extract the dataTaken assigned to the entity)partnerShared: true if the entity is partnerSharedprimaryFile: contains the best ranked file within all the entity files (canonical first, then secondaries ranked by lenght of basename, then lenght of pathname)secondaryFiles: contains all the secondary files in the entityduplicatesFiles: contains files which has at least one more file within the entity in the same folder (duplicates within folder)
- Created internal/external methods for Class
MediaEntityfor an easy utilization. - All modules have been adapted to the new
MediaEntitystructure. - All Tests have been adapted to the new
MediaEntitystructure. - Removed
filesattribute fromMediaEntityClass. - Merged
media_entity_moving_strategy.dartmodule withmedia_entity_moving_service.dartmodule and now it is stored underlib/steps/step_06_moving_files/servicesfolder. - New behaviour during
Find Duplicatesstep:- Now, all identical content files are collected within the same MediaEntity.
- In a typical Takeout, you might have the same file within
Photos from yyyyfolder and within one or more Album folder - So, both of them are collected within the same entity and will not be considered as duplicated because one of them could have associated json and the others not
- So, we should extract dates for all the files within the same media entity.
- In a typical Takeout, you might have the same file within
- If one media entity contains two or more files within the same folder, then this is a duplicated file (based on content), even if they have different names, and the tool will remove the worst ranked duplicated file.
- Now, all identical content files are collected within the same MediaEntity.
- Moved
Write EXIFstep to Step 7 (after Move Files step) in order to write EXIF data only to those physical files in output folder (skipping shortcuts).- This changed was needed because until Step 6 (based on the selected album strategy), don't create the output physical files, we don't know which files need EXIF write.
- With this change we reduce a lot the number of EXIF files to write because we can skip writing EXIF for shortcut files created by shorcut or reverse-shortcut strategy, but also we can skip all secondaryFiles if selected strategy is None or Json.
- The only strategy that has no benefit from this change is duplicate-copy, because in this strategy all files in output folder are physical files and all of them need to have EXIF written.
- Renamed
Step 3: Remove DuplicatestoStep 3: Merge Media Entitiesbecause this represents much better the main purpose of this step. - Performance Optimization in
Step 3: Merge Media Entities. Step 3: Merge Media Entitiesnow only consider within-folder duplicates. And take care of the primaryFile/secondaryFiles based on a ranking for the rest of the pipeline.Step 7: Write EXIFnow take into account all the files in the MediaEntity file except duplicatesFiles and files withisShortcut=trueattribute.Step 6: Move Filesnow manage hardlinks/juntions as fallback of native shorcuts using API toWindowsSymlinkServicewhen no admin rights are granted.Step 8: Update Creation Timenow take into account all the files in the MediaEntity file except duplicatesFiles.Step 8: Update Creation Timenow update creation time also for shortcuts.- Improvements on Statistics results.
- Added more statistics to
Step 3: Remove Duplicate - Added more statistics to
Step 6: Move Files - Added more statistics to
Step 8: Update Creation Time. - Total execution time is now shown as hh:mm:ss instead of only minutes.
- Added more statistics to
- Added new flag
enableTelemetryInMergeMediaEntitiesStepinGlobalConfigServiceClass to enable/disable Telemetry in Step 3: Merge Media Entities.
🐛 Bug Fixes
- Fixed #65: Now all supported media files are moved from input folder to output folder. So after running GPTH input folder should only contain .json files and unsupported media types.
- Fixed #76: Now interactive mode ask for album strategy.
- Changed zip_extraction_service.dart to support extract UTF-8/latin1 chars on folder/files names.
5.0.1
🚀 Improvements
- Performance Optimization in Step 3 (Remove Duplicates)
5.0.0
✨ New Features
- Support for 7zip and unzip extractors (if found in your system). This is because the native extractor does not extract properly filenames or dirnames with UTF-8/latin1 chars.
- Support new
Extrafiles from Google Takeout with following suffixes:-motion,-animation,-collage. - New flag
--keep-inputto Work on a temporary sibling copy of --input (suffix _tmp), keeping the original untouched. - New flag
--keep-duplicatesto keep duplicates files in_Duplicatessubfolder within output folder. - Created GitHub Action
build-and-create-release.ymlto Automatically build all binaries, create new release (stable or pre-release), update it wiht the release-notes and upload the binaries to the new release.
🚀 Improvements
- Created a single package gpth-lib with all the exported modules for an easier way to manage imports and refactoring.
- Added new flag
fallbackToExifToolOnNativeMissinGlobalConfigServiceClass to specify if we want to fallback to ExifTool on Native EXIF reader fail. (Normally if Native fails is because EXIF is corrupt, so fallback to ExifTool does not help). - Added new flag
enableExifToolBatchinGlobalConfigServiceClass to specify if we want to enable/disable call ExifTool with batches of files instead of one call per file (this speed-up a lot the EXIF writting time with ExifTool). - Added new flag
maxExifImageBatchSizeinGlobalConfigServiceClass to specify the maximum number of Images for each batch passed in any call to ExifTool. - Added new flag
maxExifVideoBatchSizeinGlobalConfigServiceClass to specify the maximum number of Videos for each batch passed in any call to ExifTool. - Added new flag
forceProcessUnsupportedFormatsinGlobalConfigServiceClass to specify if we want to forze process unsupported format such as.AVI,.MPGor.BMPfiles with ExifTool. - Added new flag
silenceUnsupportedWarningsinGlobalConfigServiceClass to specify if we want to recive or silence warnings due to unsupported format on ExifTool calls. MediaEntityClass changed- Removed
filesattribute - Added
primaryFileandsecondaryFilesattributes for a better logic. - Added
albumsMapattribute to store All Albums where the media entity was found as aAlbumInfoList which can contain many usefull info related to the Album. - Adapted all methods to work with this new structure
- Removed
- All modules have been adapted to the new
MediaEntitystructure. - All Tests have been adapted to the new
MediaEntitystructure. - Code Structure refactored for a better understanding and easier way to find each module.
- Code Refactored to isolate the execution logic of each step into the .execute() function of the step's class. In this way the media_entity_collection module is much clearer and easy to understand and maintain.
- Homogenized logs for all steps.
- Improvements on Statistics results.
🐛 Bug Fixes
- Fixed #65: Now all supported media files are moved from input folder to output folder. So after running GPTH input folder should only contain .json files and unsupported media types.
- Fixed #76: Now interactive mode ask for album strategy.
4.3.1
🚀 Improvements
- Improve Performance in Remove Duplicates Step
- Change README.md to add Star History & Contributors History
🐛 Bug Fixes
- Added ask for Albums strategy during interactive mode