Repository navigation
Conversation
Bumps Serilog.Extensions.Logging from 10.0.0 to 11.0.0 --- updated-dependencies: - dependency-name: Serilog.Extensions.Logging dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: nuget-deps ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Rename to a Free Name on Collision and Pad Odd GIF Dimensions An extension rename in `process` no longer deletes or backs up a file already holding its target name. The renamed file takes the next free `_N` name, the way `import` does, and a warning names both files. This holds with and without `--skipbackup`. The extension-conflict deferral in ProcessCommand only kept same-stem files out of one parallel pass, so it never reserved the name on disk. The re-encode tier pads to even dimensions with `pad=ceil(iw/2)*2:ceil(ih/2)*2`, since libx264 at yuv420p rejects an odd width or height. GUIDE.md drops both known-issue entries, and ARCHITECTURE.md describes the new behaviour. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Keep a Same-Name Conversion Output Under --skipbackup With `--skipbackup` the original stayed on disk while the output name was chosen, so a PCM `.mp4` collided with itself and its output became `_1.mp4`. The original now moves to its `.bak` name in both modes, and `--skipbackup` deletes that `.bak` once its metadata is copied. BackupFile's rename now goes through RenameFile, and the padding comment names a column as well as a row. A test covers a case-only rename on a case-insensitive filesystem, skipped where the filesystem is case-sensitive. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Describe Rename Collisions and GIF Padding in the README The README now says a renamed file takes the next free name when its target is taken, that `--skipbackup` leaves no `.bak` behind, and that the re-encode pads to even dimensions. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Correct the README Mixed-Case Extension Example Only an extension mixing upper and lower case is lowercased, so `.Jpg` becomes `.jpg` and an all-uppercase `.JPG` is kept. Co-Authored-By: Claude Opus 5.5 <[email protected]> * State What the Even-Dimension Pad Keeps A GIF keeps every pixel under the pad. An odd-sized subsampled source, such as a yuv420p AVI, loses its last odd row or column to the pad color, so the docs and the comment no longer claim every pixel is kept. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
* Accept .heif as a Live Photo Companion Still Add .heif to the companion extension list so a still cataloged as .heif and renamed to .heic in the same round still pairs with its video, for both the --db lookup and the same-folder search. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * Name HEIF in the Live Photo Companion Comment Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
* Match by Image-Data Hash for Import Dedup and the Immich Trash Add an opt-in --imagehash option to import and process, and an optional --processdb option to trash, so a copy that differs only in metadata can be matched by its image data hash. Default runs keep whole-file matching. - import --imagehash skips a source whose image data hash is in --db and logs the matched row, and skips one whose hash is in --trashdb. - process --imagehash deletes a file whose cataloged image data hash is in --trashdb. - trash --processdb records each trashed asset's image data hash, looked up by SHA-1 in a read-only process database. - The trash database gains an image_hash column, upgraded in place. - A null or empty image hash never matches. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Address Local Review Findings on Image-Data Hash Matching - trash --processdb backfills every row without an image hash, so rows of assets already purged from the server gain one too. - import claims each hash for the run, so two matching files handled in parallel import once, by SHA-256 and by image hash under --imagehash. - --processdb is a command-line field read by CreateOptions, and a test covers its wiring to Options.DbFile. - Trash and process databases share one column-name helper. - Drop the empty-string guards no writer needs. - Docs warn that a trashed copy's image hash also matches a kept copy, and no longer suggest index for backfilling an import database. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Release an Import Claim When Its File Does Not Import A file that claimed a hash and then failed or proved invalid kept the claim, so a later match in the same run was skipped although nothing was imported. The claims are now released on any outcome but Imported. Drop the unreachable read-only guard from FindPathByImageHashAsync, whose only caller opens the import database read-write and already rejects an empty hash. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Wait on a Claim's Outcome and Share the Existing-File Validator A file that met another file's claim was skipped at once, so a winner that then failed or proved invalid left both files unimported. A file now waits for the claim owner's outcome, skipping when the owner imported and claiming again when the owner released it. SHA-256 is always claimed before the image hash, and no file waits while holding an image hash, so the waits cannot form a cycle. The file-exists validators for --trashdb, --skipdb, --processdb, and --apikey-file move onto one CreateExistingFileOption factory. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Correct Claim Docs and Make the Parallel Claim Test Order-Independent - The parallel case of the claim-release test asserts only the outcome both claim orders share. - Drop a claim branch that no enumerated run can reach. - GUIDE no longer says identical files in one parallel run may both import, since the claim set imports one. - The restored-asset note no longer advises deleting sibling rows, which a later trash sync refills. It says to leave --imagehash off instead. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Add the New Option Names to the Spelling Word List Add imagehash and processdb beside trashdb and skipdb, so the spell check accepts the new --imagehash and --processdb options. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Check ExifTool Up Front for Import Image Hashes and Test Claim Waits - import --imagehash checks the ExifTool version once before the run, so a trash-only import with an old ExifTool stops with one message instead of failing every file. - The claim comment and ARCHITECTURE say only the counts match a sequential run, since which matching file imports depends on timing. - ClaimedByAsync and the extracted ReleaseClaims are internal, and new tests cover a waiter on a running owner that releases and one that imports, and a cancelled waiter. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Test the Trash Upsert Contract and Drop a Timing-Dependent Test Row - A test asserts that a later upsert keeps a stored name and image hash and fills a missing hash. - The claim-release import test runs on one thread only, since its parallel row passed in either claim order; ClaimedByAsync tests cover the wait deterministically. - Correct the GetFileMetaAsync comment, which an image-hash import without a database also reaches. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Correct a Trash Test Comment the Upsert Made Stale The duplicate-hash test said INSERT OR IGNORE deduplicates, but the trash insert is now an upsert on sha1. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Cover Image-Hash Twins When Un-Marking an Import Row The GUIDE step for un-marking files in a seeded import database named only SHA-256 twins. With --imagehash, a row sharing the image hash still skips the file, so the step now says to run that import without the option or delete those rows too. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #289 +/- ##
==========================================
+ Coverage 41.25% 41.73% +0.48%
==========================================
Files 27 27
Lines 4138 4445 +307
Branches 362 390 +28
==========================================
+ Hits 1707 1855 +148
- Misses 2361 2520 +159
Partials 70 70
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
An active finding remains because the Live Photo comment omits the supported .jpg companion format, making the documentation inaccurate.
1 open issue
What changed in this PR
Promotes collision-safe renaming, odd-dimension video padding, HEIF Live Photo pairing, opt-in image-hash matching, trash database backfilling, and the Serilog dependency update to main.
Changes:
- Prevents extension-renaming collisions from displacing existing files and pads odd video dimensions for libx264 conversion.
- Adds
.heifLive Photo pairing and opt-in--imagehashand--processdbworkflows with schema upgrades. - Expands database handling, concurrency claims, tests, and operational documentation for the new features.
- Updates
Serilog.Extensions.Loggingto 11.0.0.
| File | Description |
|---|---|
| README.md | Documents image-hash matching, process collision handling, HEIF pairing, and padded video conversion. |
| PhotoCleanerTests/TrashDatabaseTests.cs | Tests trash schema migration, image-hash lookups, and upsert behavior. |
| PhotoCleanerTests/TrashCommandTests.cs | Tests process-database image-hash recording and backfilling during trash synchronization. |
| PhotoCleanerTests/ProcessTaskTests.cs | Tests collision-safe renames, odd-dimension conversion, skip-backup conversion, and image-hash trash matching. |
| PhotoCleanerTests/LivePhotoCatalogTests.cs | Tests HEIF Live Photo pairing with and without a database. |
| PhotoCleanerTests/ImportTaskTests.cs | Tests image-hash deduplication, trash matching, and coordinated parallel claims. |
| PhotoCleanerTests/DatabaseTests.cs | Tests image-hash queries and legacy read-only database behavior. |
| PhotoCleanerTests/CommandLineTests.cs | Tests parsing and validation of the new command-line options. |
| PhotoCleaner/TrashDatabase.cs | Adds image-hash storage, schema migration, indexing, lookups, and upsert behavior. |
| PhotoCleaner/TrashCommand.cs | Adds process-database image-hash backfilling during trash synchronization. |
| PhotoCleaner/ProcessTask.cs | Adds HEIF pairing, collision-safe renaming, image-hash trash matching, and even-dimension padding. |
| PhotoCleaner/ProcessCommand.cs | Adds image-hash compatibility warnings during processing. |
| PhotoCleaner/ImportTask.cs | Implements image-hash deduplication and in-run claims for matching files. |
| PhotoCleaner/ImportCommand.cs | Adds image-hash support checks and legacy trash database warnings for imports. |
| PhotoCleaner/Database.cs | Adds image-hash lookup support and read-only schema capability detection. |
| PhotoCleaner/CommandLine.cs | Adds and validates the --imagehash and --processdb options. |
| OPERATIONS.md | Documents database schema upgrades and read-only database behavior. |
| GUIDE.md | Updates operational guidance for image-hash matching, trash handling, HEIF pairing, and rename collisions. |
| Directory.Packages.props | Updates Serilog.Extensions.Logging to version 11.0.0. |
| cspell.json | Adds the new image-hash and process-database option terms to the spelling dictionary. |
| ARCHITECTURE.md | Describes the new image-hash flow, database schema handling, rename rules, conversion padding, and HEIF pairing. |
Review effort: Lite

Promotes four feature pull requests and one Dependabot bump from
developtomain.processrenames onto a free_Nname instead of deleting the file holding the target name, and pads odd GIF dimensions to even for libx264.heifcounts as a Live Photo companion still, with and without--db--imagehashmatching for import dedup and the Immich trash match, plustrash --processdbto record image hashesnuget-depsbump ondevelopFixes #276
Fixes #278
Fixes #280
Fixes #281
#277 stays open, blocked on ptr727/ProjectTemplate#4265.
🤖 Generated with Claude Code