Skip to content

MediaVerify auto update media object names #12610#997

Open
riskysnail wants to merge 1 commit into
gramps-project:maintenance/gramps61from
riskysnail:12610
Open

MediaVerify auto update media object names #12610#997
riskysnail wants to merge 1 commit into
gramps-project:maintenance/gramps61from
riskysnail:12610

Conversation

@riskysnail

@riskysnail riskysnail commented Jul 20, 2026

Copy link
Copy Markdown

Resolves 12610

Updated the MediaVerify plugin so that it sets the media title after the Fix media button is pressed.

Changes

By default media objects inherit the title of the media path filename (without extension). The current behavior of the fix_media() method changes media path filename but not the media title resulting in a mismatch.

This update fixes that by automatically setting the media title to the new path filename but only if the old title matches the old path filename. This ensures that user-modified media titles are never changed accidentally by the MediaVerify tool.

Examples

Repro steps:

  • create a dummy file named photoA.jpg
  • create 2 media objects and assign photoA.jpg to both of them
  • rename 1 of the media objects to Photo A example
  • rename photoA.jpg to photoA_renamed.jpg on your filesystem
  • use the MediaVerify tool to fix the file path of the media objects

Old titles:

  • photoA
  • Photo A example

New titles:

  • photoA_renamed
  • Photo A example

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