github Xentraxx/GooglePhotosTakeoutHelper_Neo v4.0.9
v4.0.9-xentraxx

latest releases: v6.1.5, v6.1.3, v6.1.2...
10 months ago

4.0.9-Xentraxx - Major Architecture Refactor

๐Ÿ›ก๏ธ BREAKING CHANGE: Copy Mode Completely Removed

This release removes the --copy flag and all copy mode functionality to ensure complete input directory safety and eliminate data integrity issues.

Why This Change Was Made

  • Input Directory Protection: Copy mode was modifying files in the input directory during extension fixing and filename sanitization, violating the principle of data safety
  • Simplified Architecture: Removes complex conditional logic that led to inconsistent behavior
  • Clearer User Intent: All operations now clearly move files from input to output, with no ambiguity
  • Enhanced Reliability: Eliminates edge cases where input files could be modified unexpectedly

Breaking Changes

  • โŒ Removed: --copy command line flag
  • โŒ Removed: copyMode from all configuration APIs
  • โŒ Removed: Copy-related conditional logic throughout codebase
  • โœ… New Behavior: All files are always moved from input to output directory

Migration Guide

  • Before: gpth --input source --output dest --copy
  • After: gpth --input source --output dest (copy flag no longer needed or supported)
  • Result: Files will be moved (not copied) from source to destination
  • Behavior: Files are relocated from input to output directory with metadata processing applied

Technical Implementation

  • FileOperationService: Simplified to move-only operations with cross-device copy+delete fallback
  • Moving Strategies: All strategies now use consistent move semantics
  • Album Strategies: Duplicate copy strategy still creates copies in album folders when needed
  • Configuration System: Streamlined without copy mode complexity

Benefits

  • โšก Better Performance: Simplified logic reduces overhead
  • ๐Ÿงน Cleaner Codebase: Removed 400+ lines of conditional copy logic
  • ๐ŸŽฏ Clearer Semantics: Move operations are explicit and predictable

๐Ÿ›ก๏ธ BREAKING CHANGE: fix extension flag renamed

  • Consolidated extension fixing flags into unified --fix-extensions=<mode> option
    • Before: --fix-extensions, --fix-extensions-non-jpeg, --fix-extensions-solo-mode
    • After: --fix-extensions=<mode> with none, standard, conservative, solo modes

๐Ÿ—๏ธ Complete Architecture Overhaul

This release represents a fundamental restructuring of the codebase following Clean Architecture principles, providing better maintainability, testability, and performance.

Tl;dr

  • fix extenstion flag changed to --fix-extensions=<mode>
  • Improved performance.
  • CRITICAL FIX: Nothing mode now processes ALL files, preventing data loss in move mode

Critical Bug Fixes

  • ๐Ÿšจ FIXED: Data loss in Nothing mode - Album-only files are now properly moved in Nothing mode instead of being silently skipped, preventing potential data loss when using move mode with --album-behavior=nothing

Domain-Driven Design Implementation

  • Reorganized codebase into distinct layers: Domain, Infrastructure, and Presentation
  • Introduced service-oriented architecture with dependency injection container
  • Implemented immutable domain entities for better data integrity and performance
  • Added comprehensive test coverage with over 200+ unit and integration tests

Service Consolidation & Modernization

  • Unified service interfaces through consolidated service pattern
  • Implemented ServiceContainer for centralized dependency management
  • Refactored moving logic into strategy pattern with pluggable implementations
  • Enhanced error handling with proper exception hierarchies and logging

๐Ÿš€ Performance & Reliability Improvements

Async Processing Architecture

  • Stream-based file I/O operations replacing synchronous access
  • Persistent ExifTool process management (10-50x faster EXIF operations)
  • Concurrent media processing with race condition protection
  • Memory optimization - up to 99.4% reduction for large file operations

Advanced File Operations

  • Streaming hash calculations (20% faster with reduced memory usage)
  • Optimized directory scanning (50% fewer I/O operations)
  • Parallel file moving operations (40-50% performance improvement)
  • Smart duplicate detection with memory-efficient algorithms
  • Native Win32 creation time updates - Replaced PowerShell with direct Win32 FFI calls (10-100x faster)

Intelligent Extension Correction

  • MIME type validation with file header detection
  • RAW format protection - prevents corruption of TIFF-based files
  • Comprehensive safety modes for different use cases
  • JSON metadata synchronization after extension fixes

๐Ÿ“ Modern File Management

Strategy Pattern Implementation

  • Pluggable moving strategies: Nothing, Copy, Shortcut, Reverse Shortcut
  • Context-aware path generation with date-based organization
  • Atomic file operations with rollback capabilities
  • Smart collision handling with unique filename generation

Cross-Platform Improvements

  • Platform-specific optimizations for Windows, macOS, and Linux
  • Enhanced shortcut creation bypassing PowerShell on Windows
  • Unified disk space management across all platforms
  • Improved encoding handling for international filenames

๐Ÿงช Testing & Quality Assurance

Comprehensive Test Suite

  • 200+ automated tests covering unit, integration, and end-to-end scenarios
  • Mock service infrastructure for reliable testing
  • Performance regression testing with benchmarks
  • Cross-platform validation across all supported systems

Code Quality Improvements

  • Comprehensive documentation with detailed function descriptions
  • Lint rule enforcement following Dart best practices
  • Type safety enhancements with null safety
  • Error logging standardization with structured log levels

๐Ÿ”„ Processing Pipeline Modernization

Eight-Step Pipeline Architecture

  1. Extension Fixing - Intelligent MIME type correction
  2. Media Discovery - Optimized file system scanning
  3. Duplicate Removal - Content-based deduplication
  4. Date Extraction - Multi-source timestamp resolution
  5. EXIF Writing - Metadata synchronization
  6. Album Detection - Smart folder classification
  7. File Moving - Strategy-based organization
  8. Creation Time Updates - Final timestamp alignment

Enhanced Data Processing

  • MediaEntity immutable models for thread-safe operations
  • Coordinate processing with validation and conversion
  • JSON metadata matching with truncated filename support
  • Album relationship management with shortcut strategies

๐Ÿ› ๏ธ Infrastructure Enhancements

External Tool Integration

  • Persistent ExifTool management with automatic discovery
  • Platform service abstraction for system-specific operations
  • Disk space monitoring with real-time calculations
  • Process lifecycle management with proper cleanup

Interactive User Experience

  • Consolidated interactive services with improved prompts
  • Real-time progress reporting for long-running operations
  • Enhanced error messages with actionable guidance
  • ZIP extraction restoration with security improvements

๐Ÿ“‹ Configuration & Usability

Streamlined Configuration

  • Unified command-line interface with consistent flag patterns
  • Interactive configuration validation with user guidance
  • Global configuration service with centralized settings
  • Backward compatibility for existing workflows

Bug Fixes & Stability

  • Race condition elimination in concurrent operations
  • JSON file matching improvements for truncated names
  • Memory leak prevention in long-running processes
  • Cross-platform filename handling improvements

Don't miss a new GooglePhotosTakeoutHelper_Neo release

NewReleases is sending notifications on new releases.