* Check for Possible Duplicated Media

Writing and using plugins for Version 5 and above.
Post Reply
User avatar
tatewise
Megastar
Posts: 21358
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Check for Possible Duplicated Media

Post by tatewise » 07 Apr 2021 19:12

Until FH V7.0.4, any GEDCOM imported from RootsMagic, Legacy, etc, would produce multiple duplicate Media records and possibly duplicate Media files. This plugin should cope with those imported Media cases and any others where duplicates arise.
See Import RootsMagic 7 into Family Historian 7 (18386) for the background to this problem.

Attached is a prototype Check for Possible Duplicated Media plugin Version 1.3.3 Date 08 Apr 2021.
In all FH versions, it avoids Lua SQL used in earlier versions by using a simple text file instead. It's probably just as efficient.
( On close inspection, the original plugin never actually used the SQL database anyway due to a small typo :roll: )
It will only merge Media records if identical in all respects, apart from the filename path, which can differ as long as the files themselves are identical.
It does not delete any unlinked duplicate files. Use Check for Unlinked Media to do that for internal Project files.

Perhaps test it on a copy Project initially.
Its effects can be reversed using Edit > Undo Plugin Updates before closing FH or by reverting to a Snapshot.

BTW: I've not yet actually tested it on FH V5/6 as it is primarily needed for FH V7 now.
Attachments
Check for Possible Duplicated Media.fh_lua
Version 1.3.3 Date 08 Apr 2021
(15.75 KiB) Downloaded 9 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
tatewise
Megastar
Posts: 21358
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Check for Possible Duplicated Media

Post by tatewise » 09 Apr 2021 12:05

I've made some minor improvements to this plugin and tested it in both FH V6 and FH V7.
It has better messages and the Result Set is sorted into Record Id order

Try attachment Check for Possible Duplicated Media plugin Version 1.3.4 Date 09 Apr 2021.

Is it merging RM and Legacy imported duplicate Media records as expected?
Attachments
Check for Possible Duplicated Media.fh_lua
Version 1.3.4 Date 09 Apr 2021
(17.68 KiB) Downloaded 8 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
David Potter
Megastar
Posts: 839
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Check for Possible Duplicated Media

Post by David Potter » 14 Apr 2021 15:21

Hi Mike
Did you mean 'until 7.0.3'? I can't see 7.0.4 has been released yet.

David

User avatar
ColeValleyGirl
Megastar
Posts: 2728
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Check for Possible Duplicated Media

Post by ColeValleyGirl » 14 Apr 2021 15:25

Mike means until 7.0.4. It isn't on general release yet, but has been made available for testing for people who reported things that it's meant to address, including that enhancement.

We know that 7.0.5 is in the offing so something in 7.0.4 isn't as it should be, however.

avatar
David Potter
Megastar
Posts: 839
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Check for Possible Duplicated Media

Post by David Potter » 14 Apr 2021 15:27

I see - Thanks Helen.

User avatar
tatewise
Megastar
Posts: 21358
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Check for Possible Duplicated Media

Post by tatewise » 15 Apr 2021 17:12

This plugin has been downloaded 7 times.
It is only useful for the special case of importing media from another product using an FH version earlier than V7.0.4.
However, there has been no feedback from those 7 users about its effectiveness.
Does this plugin need to be published, or can I delete it as an attachment and forget about it?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
ColeValleyGirl
Megastar
Posts: 2728
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Check for Possible Duplicated Media

Post by ColeValleyGirl » 15 Apr 2021 17:19

I'm sure you'd have heard if there was a problem with it, Mike! Why not liaise with Jane about the potential overlap with her (published) plugin -- to avoid confusing users of the plugin store -- and then publish it?

User avatar
tatewise
Megastar
Posts: 21358
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Check for Possible Duplicated Media

Post by tatewise » 15 Apr 2021 18:05

Yes, that was going to be my next step. I did Email Jane earlier this year on this topic but go no reply.
It is just that there were some fairly vocal users who had already imported a Project, cannot use the FH v7.0.4 update, so were keen on the plugin, but everything has gone quiet.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
ColeValleyGirl
Megastar
Posts: 2728
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Check for Possible Duplicated Media

Post by ColeValleyGirl » 15 Apr 2021 18:16

It has been less than a week since you posted it, Mike, and I suspect people who aren't us 'have a life'! :D

Post Reply