Skip to content

Paste metadata from copied file#43

Merged
meesoft merged 4 commits intomainfrom
features/PasteMetadata
Jul 6, 2025
Merged

Paste metadata from copied file#43
meesoft merged 4 commits intomainfrom
features/PasteMetadata

Conversation

@meesoft
Copy link
Owner

@meesoft meesoft commented Jun 29, 2025

Summary by CodeRabbit

  • New Features

    • Added the ability to paste metadata from a copied file to the selected photo via a new context menu option.
    • Introduced keyboard shortcut (Shift+Insert) for pasting location data in the photo list.
  • Improvements

    • Enhanced error handling and user feedback when ExifTool is not configured.
    • Refined keyboard input handling for photo selection and metadata operations.
    • Improved performance logging for image resampling.
    • Replaced internal metadata processing with a new external ExifTool integration for improved metadata handling.
  • Bug Fixes

    • Improved validation of camera timezone offsets to prevent invalid values.
  • Tests

    • Added tests to verify metadata transfer functionality, including both file-to-file and in-place updates.
    • Removed outdated tests related to previous internal ExifTool handling.

@meesoft meesoft marked this pull request as ready for review June 29, 2025 19:33
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 29, 2025

Walkthrough

This change introduces a new command for pasting metadata from a copied file into the selected photo, implements the underlying metadata transfer logic using a new external ExifTool class, updates error handling for ExifTool configuration, and refines keyboard and UI interactions. It also removes local ExifTool process handling from ExifHandler and replaces it with calls to the new ExifTool abstraction. Corresponding unit tests were added for the new ExifTool functionality, and obsolete tests related to the old ExifTool handling were removed.

Changes

File(s) Change Summary
PhotoLocator/MainViewModel.cs Added PasteMetadataCommand and ExifToolNotConfigured constant; updated error handling to use new ExifTool.
PhotoLocator/MainWindow.xaml Added Shift+Insert keyboard shortcut and context menu item for pasting metadata from copied file.
PhotoLocator/MainWindow.xaml.cs Refined Insert key handling to exclude Shift; improved image resampling timing and logging granularity.
PhotoLocator/Metadata/ExifHandler.cs Removed all local ExifTool process methods; replaced calls with new ExifTool class methods; tightened timestamp decoding.
PhotoLocator/Metadata/ExifTool.cs Added new static ExifTool class encapsulating ExifTool process invocation, metadata transfer, decoding, and geotagging.
PhotoLocator/PictureItemViewModel.cs Updated calls from ExifHandler to ExifTool for metadata loading and geotag saving.
PhotoLocator/VideoTransformCommands.cs Replaced ExifHandler call with ExifTool for video metadata loading.
PhotoLocatorTest/Metadata/ExifHandlerTest.cs Removed tests related to old ExifTool handling; updated timestamp constant visibility.
PhotoLocatorTest/Metadata/ExifToolTest.cs Added comprehensive tests for new ExifTool class including timestamp adjustment, metadata transfer, geotagging, and decoding.
PhotoLocator/PictureFileFormats/JpegTransformations.cs Added using statement to properly dispose external process in ProcessFile method.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MainWindow (UI)
    participant MainViewModel
    participant ExifTool

    User->>MainWindow (UI): Select "Paste metadata from copied file"
    MainWindow (UI)->>MainViewModel: Execute PasteMetadataCommand
    MainViewModel->>ExifTool: TransferMetadataAsync(sourceFile, selectedFile, targetFile, exifToolPath, ct)
    ExifTool->>ExifTool: RunExifToolAsync with tagsfromfile arguments
    ExifTool-->>MainViewModel: Task completion
    MainViewModel-->>MainWindow (UI): Update UI / notify user
Loading

Possibly related PRs

Poem

🐰 A hop, a skip, a metadata swap,
With ExifTool now at the top!
Paste commands that swiftly flow,
From copied files, tags now show.
Tests to prove the work is sound,
New features leap and bounds abound!
📸✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8715f3d and 18b664f.

📒 Files selected for processing (3)
  • PhotoLocator/Metadata/ExifHandler.cs (4 hunks)
  • PhotoLocator/Metadata/ExifTool.cs (1 hunks)
  • PhotoLocator/PictureFileFormats/JpegTransformations.cs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • PhotoLocator/Metadata/ExifTool.cs
  • PhotoLocator/Metadata/ExifHandler.cs
🧰 Additional context used
🧠 Learnings (1)
PhotoLocator/PictureFileFormats/JpegTransformations.cs (1)
Learnt from: meesoft
PR: meesoft/PhotoLocator#9
File: PhotoLocator/PictureFileFormats/JpegliEncoder.cs:10-10
Timestamp: 2024-12-07T15:05:08.244Z
Learning: In the `PhotoLocator.PictureFileFormats` namespace, classes like `JpegliEncoder` are intended for internal use only and should remain internal.
🧬 Code Graph Analysis (1)
PhotoLocator/PictureFileFormats/JpegTransformations.cs (1)
PhotoLocator/PictureFileFormats/JpegliEncoder.cs (1)
  • Process (32-88)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Analyze (csharp)
  • GitHub Check: build
  • GitHub Check: build
🔇 Additional comments (1)
PhotoLocator/PictureFileFormats/JpegTransformations.cs (1)

43-43: LGTM! Excellent resource management improvement.

The change to use using var ensures the Process object is properly disposed when it goes out of scope, which is a C# best practice for IDisposable objects. This pattern is consistent with the similar implementation in JpegliEncoder.cs and improves resource cleanup.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in a Comment
  • Commit Unit Tests in branch features/PasteMetadata

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
PhotoLocator/MainViewModel.cs (1)

534-551: Review the clipboard handling logic.

The command implementation has solid error handling and progress reporting. However, consider these potential improvements:

  1. The SingleOrDefault() call on line 540 could throw an exception if multiple files are in the drop list
  2. The file existence check should handle the case where sourceFileName is null from GetText()

Apply this diff to improve robustness:

-            if (Clipboard.ContainsFileDropList())
-                sourceFileName = Clipboard.GetFileDropList().Cast<string>().SingleOrDefault();
-            else
-                sourceFileName = Clipboard.GetText();
-            if (!File.Exists(sourceFileName))
+            if (Clipboard.ContainsFileDropList())
+            {
+                var files = Clipboard.GetFileDropList().Cast<string>().ToArray();
+                if (files.Length != 1)
+                    throw new UserMessageException("Please copy exactly one file to the clipboard.");
+                sourceFileName = files[0];
+            }
+            else
+                sourceFileName = Clipboard.GetText();
+            if (string.IsNullOrEmpty(sourceFileName) || !File.Exists(sourceFileName))
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8ff8961 and d0f82ce.

📒 Files selected for processing (5)
  • PhotoLocator/MainViewModel.cs (3 hunks)
  • PhotoLocator/MainWindow.xaml (2 hunks)
  • PhotoLocator/MainWindow.xaml.cs (2 hunks)
  • PhotoLocator/Metadata/ExifHandler.cs (7 hunks)
  • PhotoLocatorTest/Metadata/ExifHandlerTest.cs (1 hunks)
🔇 Additional comments (16)
PhotoLocator/MainWindow.xaml (2)

141-141: LGTM! Good keyboard accessibility addition.

The Shift+Insert shortcut provides an alternative to Ctrl+V for pasting location, which is consistent with standard Windows clipboard shortcuts.


156-156: LGTM! Well-placed context menu item.

The menu item is logically positioned under the "Metadata / EXIF" submenu, making it discoverable for users working with metadata operations.

PhotoLocator/MainViewModel.cs (2)

33-33: LGTM! Good centralization of error message.

Centralizing the error message as a constant improves maintainability and consistency across the application.


911-912: LGTM! Consistent error handling.

Good refactoring to use the centralized error message constant for consistent user experience.

PhotoLocator/MainWindow.xaml.cs (2)

201-205: LGTM! Proper keyboard shortcut conflict resolution.

The modification correctly excludes Shift keys from the Insert key handling, preventing conflicts with the new Shift+Insert shortcut for PasteLocationCommand. The logic is clear and comprehensive.


502-509: LGTM! Improved logging accuracy.

Moving the Stopwatch start to immediately before the resize operation and adding the log statement right after provides more accurate timing information for the resampling operation.

PhotoLocatorTest/Metadata/ExifHandlerTest.cs (2)

380-398: LGTM! Comprehensive test for metadata transfer.

The test properly validates metadata transfer by:

  • Checking ExifTool availability with Assert.Inconclusive
  • Cleaning up the target file before testing
  • Verifying key metadata fields (Model, DateTimeOriginal, ISO) are transferred correctly

The test methodology is sound and follows good testing practices.


400-418: LGTM! Important in-place operation test.

This test covers the critical in-place metadata transfer scenario where source and target files are the same. The test:

  • Creates a copy of the source file to avoid modifying test data
  • Validates the same metadata fields as the previous test
  • Ensures the operation works correctly when overwriting the original file

This is essential coverage for a potentially risky operation.

PhotoLocator/Metadata/ExifHandler.cs (8)

79-80: Good refactoring practice to centralize error messages.

The introduction of the ExifToolStartError constant improves maintainability and consistency across the codebase.


346-346: Consistent use of centralized error constant.

Good application of the new ExifToolStartError constant for consistent error messaging.


358-358: Consistent with parameter type change.

The removal of the null-coalescing operator is consistent with the parameter type change, but reinforces the breaking change concern flagged above.


369-369: Consistent error handling with centralized constant.

Good use of the ExifToolStartError constant for consistent error messaging.


372-372: Improved consistency in logging pattern.

Moving the logging after WaitForExitAsync aligns with the pattern used in SetGeotagAsync and ensures output is logged after process completion.


618-618: Consistent error handling across methods.

Good use of the centralized ExifToolStartError constant maintains consistency across all ExifTool-related methods.


819-838: Well-implemented metadata transfer functionality.

The new TransferMetadataAsync method follows established patterns in the class with proper:

  • Asynchronous operation handling
  • Error handling and logging
  • Process lifecycle management
  • Consistent use of centralized error constants

The implementation is clean and follows the same structure as other ExifTool integration methods.


354-354: Verify non-null exifToolPath usage in all callers

We’ve confirmed that calls in the app code always supply a non-null path, but you’ll need to ensure the same in your tests:

• PhotoLocator/MainViewModel.cs (around line 918):
Uses Settings.ExifToolPath ?? throw new UserMessageException(...) — guarantees a non-null string.
• PhotoLocatorTest/Metadata/ExifHandlerTest.cs (line 205):
Passes a test fixture field ExifToolPath into AdjustTimeStampAsync; please verify that this is initialized to a non-null value (e.g. a literal or setup in your test’s [SetUp]).

No code changes required in production, but confirm your test initialization cannot produce a null ExifToolPath.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0f82ce and 8715f3d.

📒 Files selected for processing (7)
  • PhotoLocator/MainViewModel.cs (4 hunks)
  • PhotoLocator/Metadata/ExifHandler.cs (4 hunks)
  • PhotoLocator/Metadata/ExifTool.cs (1 hunks)
  • PhotoLocator/PictureItemViewModel.cs (2 hunks)
  • PhotoLocator/VideoTransformCommands.cs (1 hunks)
  • PhotoLocatorTest/Metadata/ExifHandlerTest.cs (9 hunks)
  • PhotoLocatorTest/Metadata/ExifToolTest.cs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • PhotoLocatorTest/Metadata/ExifHandlerTest.cs
  • PhotoLocator/MainViewModel.cs
🧰 Additional context used
🧠 Learnings (4)
PhotoLocator/PictureItemViewModel.cs (1)
Learnt from: meesoft
PR: meesoft/PhotoLocator#9
File: PhotoLocator/PictureFileFormats/JpegliEncoder.cs:10-10
Timestamp: 2024-12-07T15:05:08.244Z
Learning: In the `PhotoLocator.PictureFileFormats` namespace, classes like `JpegliEncoder` are intended for internal use only and should remain internal.
PhotoLocatorTest/Metadata/ExifToolTest.cs (1)
Learnt from: meesoft
PR: meesoft/PhotoLocator#9
File: PhotoLocator/PictureFileFormats/JpegliEncoder.cs:10-10
Timestamp: 2024-12-07T15:05:08.244Z
Learning: In the `PhotoLocator.PictureFileFormats` namespace, classes like `JpegliEncoder` are intended for internal use only and should remain internal.
PhotoLocator/Metadata/ExifTool.cs (1)
Learnt from: meesoft
PR: meesoft/PhotoLocator#9
File: PhotoLocator/PictureFileFormats/JpegliEncoder.cs:10-10
Timestamp: 2024-12-07T15:05:08.244Z
Learning: In the `PhotoLocator.PictureFileFormats` namespace, classes like `JpegliEncoder` are intended for internal use only and should remain internal.
PhotoLocator/Metadata/ExifHandler.cs (1)
Learnt from: meesoft
PR: meesoft/PhotoLocator#9
File: PhotoLocator/PictureFileFormats/JpegliEncoder.cs:10-10
Timestamp: 2024-12-07T15:05:08.244Z
Learning: In the `PhotoLocator.PictureFileFormats` namespace, classes like `JpegliEncoder` are intended for internal use only and should remain internal.
🧬 Code Graph Analysis (1)
PhotoLocator/Metadata/ExifHandler.cs (2)
PhotoLocator/Metadata/ExifTool.cs (6)
  • DateTimeOffset (133-164)
  • ExifTool (14-192)
  • EnumerateMetadata (70-79)
  • Location (98-131)
  • Location (179-191)
  • Rotation (166-177)
PhotoLocator/PictureItemViewModel.cs (3)
  • Task (237-253)
  • Task (349-363)
  • Task (376-409)
🔇 Additional comments (8)
PhotoLocator/VideoTransformCommands.cs (1)

697-697: LGTM!

The refactoring to use ExifTool.LoadMetadata is consistent with the broader codebase changes.

PhotoLocator/PictureItemViewModel.cs (2)

242-242: LGTM!

Correct refactoring to use the new ExifTool.DecodeMetadata method.


353-356: LGTM!

Properly refactored to use ExifTool.SetGeotagAsync while maintaining the same error handling pattern.

PhotoLocatorTest/Metadata/ExifToolTest.cs (1)

1-164: Excellent test coverage!

The test suite comprehensively covers all ExifTool operations with proper handling of missing dependencies using Assert.Inconclusive. Good coverage of edge cases including in-place updates and different metadata formats.

PhotoLocator/Metadata/ExifTool.cs (1)

14-192: Well-structured ExifTool wrapper implementation.

The static class provides a clean abstraction for ExifTool operations with proper async/await patterns, comprehensive error handling, and good separation of concerns. The fallback mechanism in SetGeotagAsync maintains backward compatibility nicely.

PhotoLocator/Metadata/ExifHandler.cs (3)

434-435: Good fix for timezone offset validation.

Using Math.Abs properly handles both positive and negative timezone offsets.


603-603: LGTM!

The visibility change to internal is appropriate since ExifTool.DecodeMetadata needs to call this method.


608-636: Clean refactoring to use ExifTool.

The method properly delegates to ExifTool.DecodeMetadata while maintaining the same error handling and fallback behavior.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (4)
PhotoLocatorTest/Metadata/ExifToolTest.cs (1)

8-8: Consider making ExifToolPath configurable for better portability.

The hardcoded path @"exiftool\exiftool(-m).exe" might not work across different environments or CI systems. Consider loading this from a configuration file or environment variable.

PhotoLocator/Metadata/ExifTool.cs (3)

14-14: Consider adding explicit visibility modifier.

For better code clarity and consistency, consider adding the explicit internal visibility modifier.

-static class ExifTool
+internal static class ExifTool

102-122: Consider extracting metadata string building to improve maintainability.

The metadata string building logic could be extracted to a separate method for better testability and separation of concerns.

Consider extracting lines 102-122 into a separate method:

private static string BuildMetadataString(Dictionary<string, string> metadata)
{
    var metadataStrings = new List<string>();
    if (metadata.TryGetValue("Model", out var value) || metadata.TryGetValue("Encoder", out value))
        metadataStrings.Add(value);
    // ... rest of the string building logic
    return string.Join(", ", metadataStrings);
}

186-188: Consider validating GPS coordinate ranges.

GPS coordinates have valid ranges (latitude: -90 to 90, longitude: -180 to 180). Consider adding validation to ensure data integrity.

             if (parts.Length >= 4 &&
                 double.TryParse(parts[0], CultureInfo.InvariantCulture, out var latitude) &&
-                double.TryParse(parts[2], CultureInfo.InvariantCulture, out var longitude))
+                double.TryParse(parts[2], CultureInfo.InvariantCulture, out var longitude) &&
+                latitude >= -90 && latitude <= 90 &&
+                longitude >= -180 && longitude <= 180)
                 return new Location(latitude, longitude);
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0f82ce and 8715f3d.

📒 Files selected for processing (7)
  • PhotoLocator/MainViewModel.cs (4 hunks)
  • PhotoLocator/Metadata/ExifHandler.cs (4 hunks)
  • PhotoLocator/Metadata/ExifTool.cs (1 hunks)
  • PhotoLocator/PictureItemViewModel.cs (2 hunks)
  • PhotoLocator/VideoTransformCommands.cs (1 hunks)
  • PhotoLocatorTest/Metadata/ExifHandlerTest.cs (9 hunks)
  • PhotoLocatorTest/Metadata/ExifToolTest.cs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • PhotoLocator/MainViewModel.cs
🧰 Additional context used
🧠 Learnings (5)
PhotoLocator/PictureItemViewModel.cs (1)
Learnt from: meesoft
PR: meesoft/PhotoLocator#9
File: PhotoLocator/PictureFileFormats/JpegliEncoder.cs:10-10
Timestamp: 2024-12-07T15:05:08.244Z
Learning: In the `PhotoLocator.PictureFileFormats` namespace, classes like `JpegliEncoder` are intended for internal use only and should remain internal.
PhotoLocator/Metadata/ExifTool.cs (1)
Learnt from: meesoft
PR: meesoft/PhotoLocator#9
File: PhotoLocator/PictureFileFormats/JpegliEncoder.cs:10-10
Timestamp: 2024-12-07T15:05:08.244Z
Learning: In the `PhotoLocator.PictureFileFormats` namespace, classes like `JpegliEncoder` are intended for internal use only and should remain internal.
PhotoLocatorTest/Metadata/ExifToolTest.cs (1)
Learnt from: meesoft
PR: meesoft/PhotoLocator#9
File: PhotoLocator/PictureFileFormats/JpegliEncoder.cs:10-10
Timestamp: 2024-12-07T15:05:08.244Z
Learning: In the `PhotoLocator.PictureFileFormats` namespace, classes like `JpegliEncoder` are intended for internal use only and should remain internal.
PhotoLocatorTest/Metadata/ExifHandlerTest.cs (1)
Learnt from: meesoft
PR: meesoft/PhotoLocator#9
File: PhotoLocator/PictureFileFormats/JpegliEncoder.cs:10-10
Timestamp: 2024-12-07T15:05:08.244Z
Learning: In the `PhotoLocator.PictureFileFormats` namespace, classes like `JpegliEncoder` are intended for internal use only and should remain internal.
PhotoLocator/Metadata/ExifHandler.cs (1)
Learnt from: meesoft
PR: meesoft/PhotoLocator#9
File: PhotoLocator/PictureFileFormats/JpegliEncoder.cs:10-10
Timestamp: 2024-12-07T15:05:08.244Z
Learning: In the `PhotoLocator.PictureFileFormats` namespace, classes like `JpegliEncoder` are intended for internal use only and should remain internal.
🧬 Code Graph Analysis (1)
PhotoLocatorTest/Metadata/ExifToolTest.cs (2)
PhotoLocator/Metadata/ExifTool.cs (3)
  • ExifTool (14-192)
  • Location (98-131)
  • Location (179-191)
PhotoLocator/Metadata/ExifHandler.cs (3)
  • ExifHandler (22-637)
  • Location (353-358)
  • Location (360-393)
🔇 Additional comments (8)
PhotoLocator/VideoTransformCommands.cs (1)

697-697: LGTM!

The method call has been correctly updated to use the new ExifTool class, which is consistent with the PR's refactoring objective.

PhotoLocator/PictureItemViewModel.cs (2)

242-242: LGTM!

Correctly updated to use ExifTool.DecodeMetadata from the new ExifTool class.


353-355: LGTM!

Correctly updated to use ExifTool.SetGeotagAsync from the new ExifTool class.

PhotoLocatorTest/Metadata/ExifToolTest.cs (1)

151-163: Good use of data-driven testing!

The data-driven test for different timestamp formats provides comprehensive coverage for various video metadata formats.

PhotoLocator/Metadata/ExifHandler.cs (2)

482-482: LGTM!

All method calls have been correctly updated to use the new ExifTool class, maintaining the same functionality while delegating to the centralized implementation.

Also applies to: 612-612, 634-634


603-603: LGTM!

Changing visibility from private to internal is appropriate for allowing the method to be used by other classes within the assembly.

PhotoLocatorTest/Metadata/ExifHandlerTest.cs (2)

12-12: LGTM!

Good change to make the field public and follow C# naming conventions for public static fields. This allows the timestamp to be reused in other test classes.


75-75: LGTM!

All references to the timestamp field have been correctly updated to use the new public field name.

Also applies to: 94-94, 114-114, 134-134, 245-245

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 4, 2025

@meesoft meesoft merged commit 86a2ad7 into main Jul 6, 2025
6 checks passed
@meesoft meesoft deleted the features/PasteMetadata branch July 6, 2025 06:41
@coderabbitai coderabbitai bot mentioned this pull request Dec 5, 2025
@coderabbitai coderabbitai bot mentioned this pull request Jan 3, 2026
@coderabbitai coderabbitai bot mentioned this pull request Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant